PDA

View Full Version : Trying to use Logs in code



civicgundam
- 25th January 2008, 06:42
Is there a way to use logarithims in picbasic. How would you go around doing so? im trying to do something like this in my code:

w = log*(s/(s-u)) where w is a declared var and so is s and u and trying to take the log and store that value into the varialble W

Acetronics2
- 27th January 2008, 11:09
Is there a way to use logarithims in picbasic. How would you go around doing so? im trying to do something like this in my code:

w = log*(s/(s-u))



You REALLY sure of your formula ???

not me !!!



you can write "log" as a Tailor's series ... ( Log 1+x ) = x - x^2/2 + x^3/3 - ...

No,no ... Darrel didn't write this one ... ( LOL )

but the easiest way is to use a co-processor ( http://www.micromegacorp.com/pbp.html )

Alain