Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

How to find logs

  1. Nov 25, 2008 #1

    madmike159

    User Avatar
    Gold Member

    How do computers find log values, is there some sort of algorithm to find it or do they just use binary search?
     
    Last edited: Nov 25, 2008
  2. jcsd
  3. Nov 25, 2008 #2
    I found this by Google which seemed interesting:

    http://en.literateprograms.org/Logarithm_Function_(Python)

    You might be able to find the code in the math.h source code. Most floating point operations are going to go through the processor, but there's probably some legacy junk in there that gets left out at compile time for computers that existed before coprocessors became common.
     
  4. Dec 15, 2008 #3

    madmike159

    User Avatar
    Gold Member

    Ok thanks.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?