Hi all,
I have tried to use the math function powf but my float
var "scale_level" stays zero.
I have tried several other math function a get strange results aswell
any idea ?
part of my code********************
float scale_level, level_inp;
level_inp = 100;
scale_level = powf(level_inp, 1,20242);
***********************************
Regards M
math.h not working in Crossstudio
Started by ●November 26, 2008
Reply by ●November 26, 20082008-11-26
r.jensenm schrieb:
> I have tried to use the math function powf but my float
> var "scale_level" stays zero.
>
> I have tried several other math function a get strange results aswell
>
> any idea ?
You did check your stack-usage, didn't you ?
Customer of us reported that the stack must be aligned to 8 bytes.
--
42Bastian
Note: SPAM-only account, direct mail to bs42@...
> I have tried to use the math function powf but my float
> var "scale_level" stays zero.
>
> I have tried several other math function a get strange results aswell
>
> any idea ?
You did check your stack-usage, didn't you ?
Customer of us reported that the stack must be aligned to 8 bytes.
--
42Bastian
Note: SPAM-only account, direct mail to bs42@...
Reply by ●November 26, 20082008-11-26
Reply by ●November 26, 20082008-11-26
Hi,
> Hi all,
>
> I have tried to use the math function powf but my float
> var "scale_level" stays zero.
>
> I have tried several other math function a get strange results aswell
>
> any idea ?
>
> part of my code********************
> float scale_level, level_inp;
> level_inp = 100;
> scale_level = powf(level_inp, 1,20242);
> ***********************************
All these functions are tested and known to work. Make sure you #include
and you'll need 1.20242 (maybe with a suffix F if you're a pedant).
--
Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk
CrossWorks for ARM, MSP430, AVR, MAXQ, and now Cortex-M3 processors
> Hi all,
>
> I have tried to use the math function powf but my float
> var "scale_level" stays zero.
>
> I have tried several other math function a get strange results aswell
>
> any idea ?
>
> part of my code********************
> float scale_level, level_inp;
> level_inp = 100;
> scale_level = powf(level_inp, 1,20242);
> ***********************************
All these functions are tested and known to work. Make sure you #include
and you'll need 1.20242 (maybe with a suffix F if you're a pedant).
--
Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk
CrossWorks for ARM, MSP430, AVR, MAXQ, and now Cortex-M3 processors
Reply by ●November 27, 20082008-11-27
Thanks 42Bastian,
How can I monitor the stack usage in CrossStudio?
--- In l..., 42Bastian wrote:
>
> r.jensenm schrieb:
>
> > I have tried to use the math function powf but my float
> > var "scale_level" stays zero.
> >
> > I have tried several other math function a get strange results
aswell
> >
> > any idea ?
>
> You did check your stack-usage, didn't you ?
>
> Customer of us reported that the stack must be aligned to 8 bytes.
>
> --
> 42Bastian
>
> Note: SPAM-only account, direct mail to bs42@
>
How can I monitor the stack usage in CrossStudio?
--- In l..., 42Bastian wrote:
>
> r.jensenm schrieb:
>
> > I have tried to use the math function powf but my float
> > var "scale_level" stays zero.
> >
> > I have tried several other math function a get strange results
aswell
> >
> > any idea ?
>
> You did check your stack-usage, didn't you ?
>
> Customer of us reported that the stack must be aligned to 8 bytes.
>
> --
> 42Bastian
>
> Note: SPAM-only account, direct mail to bs42@
>