How to Find Logs: Algorithms & Binary Search

  • Context: Undergrad 
  • Thread starter Thread starter madmike159
  • Start date Start date
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 3K views
madmike159
Gold Member
Messages
369
Reaction score
0
How do computers find log values, is there some sort of algorithm to find it or do they just use binary search?
 
Last edited:
Mathematics news on Phys.org
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.
 
Ok thanks.