problem with Trigonometric functions ( cos, sin...)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

problem with Trigonometric functions ( cos, sin...)

Jump to solution
615 Views
ferasq
Contributor I

Hey, I have HCS08JM32, I just, created a new project using floating point & #include <math.h>...

double x = cos(3.14) or any other value like cos(1), cos(1.5)... I don't get any correct answer!

for example:

double x = 0.5; // I get in the debugger x = 0.5

x = cos(3.14); // the x still equal to 0.5 in the debugger!

but when I do the same on MCF51AC256A, I get the right answers.

 

can you help me please!

thanks.

Labels (1)
1 Solution
441 Views
bigmac
Specialist III

Hello,

Did you increase the stack size from the default setting for the 'JM32.  The trigonometric functions will require copious amounts of stack space.

Regards,

Mac


View solution in original post

0 Kudos
4 Replies
441 Views
admin
Specialist II

Hey :smileyhappy:

that works now :smileyhappy: it was related to the stack size as suggested by bigmac!

thank u very much.

441 Views
Monica
Senior Contributor III

AWESOME! :smileygrin:

0 Kudos
441 Views
Monica
Senior Contributor III

Feras,

please let us know if this suggestion is helpful, keep us posted! :smileyhappy:

Regards.

0 Kudos
442 Views
bigmac
Specialist III

Hello,

Did you increase the stack size from the default setting for the 'JM32.  The trigonometric functions will require copious amounts of stack space.

Regards,

Mac


0 Kudos