How to Find Logs: Algorithms & Binary Search

  • Context: Undergrad 
  • Thread starter Thread starter madmike159
  • Start date Start date
Click For Summary
SUMMARY

This discussion focuses on the methods used by computers to find logarithmic values, specifically highlighting the use of algorithms and binary search techniques. A reference to a Python implementation of the logarithm function is provided, which can be found at the URL: http://en.literateprograms.org/Logarithm_Function_(Python). The conversation also touches on the historical context of floating point operations and mentions potential legacy code in the math.h source file that may not be utilized in modern compilers.

PREREQUISITES
  • Understanding of logarithmic functions and their applications
  • Familiarity with binary search algorithms
  • Basic knowledge of Python programming
  • Awareness of floating point arithmetic and its historical context
NEXT STEPS
  • Explore the implementation of logarithm functions in Python
  • Research binary search algorithms and their efficiency
  • Examine the math.h source code for legacy floating point operations
  • Learn about the evolution of coprocessors and their impact on computational efficiency
USEFUL FOR

Software developers, computer scientists, and anyone interested in numerical methods and algorithm optimization will benefit from this discussion.

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.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
Replies
6
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
1
Views
1K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 26 ·
Replies
26
Views
4K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K