AnsweredAssumed Answered

MPC5674F Standard Math Libraries are not working

Question asked by Robert Hodson on Oct 3, 2012
Latest reply on Oct 25, 2012 by Robert Hodson

Any Suggestions?

building a project for mpc5674F in Codewarrior 10.2

Using Software floating point support and default options from project

 

I did add #define _EWL_FLOATING_POINT 1 in MPC5674F_INT_RAM.prefix otherwise it won't compile.

 

The following function should return 45 in test... instead it returns 0.737107076324373

#include "MPC5674F.h"

#include <stdio.h>

#include <math.h>

 

#define PI 3.14159265

 

double test;

int main(void) {

  volatile int i = 0;

 

  test = atan(1.0f) * 180 / PI;

 

 

  /* Loop forever */

  for (;;) {

    i++;

  }

}

 

 


Outcomes