giving parameters into math function
If I call in C, math function `”trunc” in math library is define as:
extern double trunc _PARAMSdouble;
and in my main file call it:
int i = (int)trunc(2.5);
It works fine, no problems. But if I try to pass double passively, like:
double d = 2.5;
int i = (int)trunc(d);
It won’t work?!? In my microprocessor STM32F4 IDE it goes in debugger mode into:
Infinite_Loop:
b Infinite_Loop
and it stuck there. I also change double and try float, int, unit8_t,... no one isn’t working.
Also other math functions will work fine as I call them like this:
i = sin(1);
i = cos(1);
But, it will crashed the same, if called like this:
int a = 1;
i = sin(a);
i = cos(a);
I am running this code on microprocessor STM32F4 Discovery,IDE is Eclipse Ac6