Bug? Power function errors.

tigrot

Well-Known Member
Licensed User
Longtime User
Hi everybody,
Seems power function's error strikes again. Many years ago I wrote an epilator firmware on a mega32 Atmel in assembly. I found some issue in power function. The results were non ok. Now I find that power(10,2) gives 99 as result. Maybe library is the same?
Advice: avoid power functions!. You can live without...
 

tigrot

Well-Known Member
Licensed User
Longtime User
I was not able to reproduce the error. The power was inserted in a larger function. I used to convert a string to an integer value, but in case of number larger than 99 the result was always 1 less the expected result.
I have already solved using an incremental multiply, but it was a surprize when I saw the log with value 99!
 
Top