Andy Black wrote:

> Well, I wouldn't mind doing that but I am a bit mathematically challenged :)
> Also, I need to be able to raise e to the x where x is a signed, floating
> point number. Not as easy as dealing with unsigned integer values.

recall e^(a+b) == e^a * e^b

call a the integer part and b the fractional part.

code has already been posted to do the integer part

The fractional part can be done with a lookup table, and a simple linear 
interpolation, or maybe a polynomial regression would work,

all depending on how accurate you need to be.

Just for giggles, I opened up excel and did a quick curve (every .01 from 0 to 1) and 
third order polynomial regression.

e^b (where b >= 0 and b <= 1)   =~  0.2787 b^3 + 0.4214 b^2 + 1.0181 b + 0.9991

Results here are probably good for about 3 significant figures

How accurate do you need to be?

--
Adam Wozniak                     Chief Architect
                                 Surveyor Corporation
[EMAIL PROTECTED]                4548 Broad Street
[EMAIL PROTECTED]        San Luis Obispo, CA 93401



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to