AnsweredAssumed Answered

Trigonometric functions in CodeWarrior

Question asked by lukas hrecko on Jan 19, 2013
Latest reply on Jan 24, 2013 by Richard Balogh

Hello,

I have problem with trigonometric functions on MPC5604B board.

I've found something on this link http://cache.freescale.com/files/soft_dev_tools/doc/ref_manual/EWL_C_Reference.pdf , but it don't work.

Can you help me?

 

My code:

 

#include <math.h>

#define PI 3.14159

 

void COSINE(uint16_t angle){

 

  double radians;

  double value;

 

  radians = angle/180*PI;

  value = acos(radians);

 

}

 

Output:

Link Error   : undefined: 'acos'

Referenced from 'COSINE' in track.o

 

Link failed.

Outcomes