Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Calculation of Logaritms

Author
Message
Ernest0x
21
Years of Service
User Offline
Joined: 2nd Feb 2004
Location:
Posted: 3rd Feb 2004 01:49
Hello!
How can I calculate the log10 of a real number in Dark Basic? Is there any command or function to do that?
Thank you in advance.
kevil
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: Netherlands
Posted: 3rd Feb 2004 13:53
No, there isn't. Create your own function. (Use either Newton-Raphson or Taylor method) Unless you only need an integer result, then it can be done easier.

Kevil
hexGEAR
22
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Naytonia
Posted: 3rd Feb 2004 15:26 Edited at: 3rd Feb 2004 15:27
a long time ago, in a galaxy far far away, kevin wrote this code:



hey, isn't kevil = kevin?
hope it helps

kevil
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: Netherlands
Posted: 3rd Feb 2004 18:03 Edited at: 3rd Feb 2004 18:08
Lol, kevil = kevin <> Kevin Picone.

It seems that the function uses the Newton-Raphson method (which is faster than using a Taylor polynomial in this case).

Edit: Though that looks like it could be my code (my coding style )

Kevil
hexGEAR
22
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Naytonia
Posted: 3rd Feb 2004 19:54
hmm, it could be yours... i have this habbit of labeling code i download of the forum so i can give credit to it's author if i ever use it. i may have mistake you for kevin picone (if he exists) and put his name instead, dunno

Login to post a reply

Server time is: 2025-05-22 18:42:33
Your offset time is: 2025-05-22 18:42:33