Hi everybody,

I use the function powf (that is supposed to return a float), included in the library

This is the definition of the function in math.h :

When I run this code:

The result is 125410439 instead of 125410439.217423

I use the function powf (that is supposed to return a float), included in the library

`#include <math.h>`

This is the definition of the function in math.h :

`float`

`powf _PARAMS((`

`float`

`, `

`float`

`));`

When I run this code:

`float`

`EXPONENT_BASE_2;`

`EXPONENT_BASE_2 = powl(4.73, 12.0);`

The result is 125410439 instead of 125410439.217423

Powf don't return a float but a int. Do you have any idea of what happens? i also tried pow and powl but it's the same result...Thanks a lot!

This is the definition of the function in math.h :

`float`

`powf _PARAMS((`

`float`

`,`

`float`

`));`

When I run this code:

`float`

`EXPONENT_BASE_2;`

`EXPONENT_BASE_2 = powl(4.73, 12.0);`

Perhaps you should use a different character font in your editor, otherwise you would realized that you call the wrong function. No wonder the function returns an integral number.

Edit:

BTW, I would not expect such a numerical resolution from a float variable ...The result is 125410439 instead of 125410439.217423