--- 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@
>

> 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 brian_myers888●November 26, 20082008-11-26

> scale_level = powf(level_inp, 1,20242);

Doesn't powf() take two arguments, not three ?

Reply by 42Bastian●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@...

Reply by "r.jensenm"●November 26, 20082008-11-26

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);
***********************************