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

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

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

ソリューションへジャンプ
1,389件の閲覧回数
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.

ラベル(1)
1 解決策
1,215件の閲覧回数
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 件の賞賛
返信
4 返答(返信)
1,215件の閲覧回数
admin
Specialist II

Hey :smileyhappy:

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

thank u very much.

1,215件の閲覧回数
Monica
Senior Contributor III

AWESOME! :smileygrin:

0 件の賞賛
返信
1,215件の閲覧回数
Monica
Senior Contributor III

Feras,

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

Regards.

0 件の賞賛
返信
1,216件の閲覧回数
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 件の賞賛
返信