I'm developing code for an embedded controller. I need to calculate the value of 10^x where x is a floating point number between -4 and 0.
I've tried using the built in C functions but they take too long.
I'm aware of a trick for whole values of x where you perform one calculation if x is odd and a different one if x is even. Afterward, you divide the binary value of x by 2 (shift x to the right one position) and repeat until x is 0.
Are there other tricks to calculate this value?
2007-08-16
08:13:25
·
6 answers
·
asked by
Anonymous
in
Science & Mathematics
➔ Mathematics