how are logarithms programmed as a function in a calculator or other programmable devices
Generally it's done using a series
The taylor series for example can get you the natural log of x (albeit a bit slowly): \[ln(x) = \sum_{n=1}^\infty \frac{1}{n}(x-1)^n\]
oh wow interesting concept
thats what i was thinking there are more efficient programs they use which will give decent approximations
Whoops, forgot the (-1)^{n+1}
umm but what about square root functions do they just iterate throughtit
until they find a match?
\[ln(x) = \sum_{n=1}^\infty \frac{1}{n}(-1)^{n+1}(x-1)^n\]
No, infinite series can get you good approximations for any function you like.
actually newtons method for finding zeroes can be used to approximate square roots
thankyou polpak and dumbcow
your welcome, actually i take that back i dunno if they would use newtons method in a program because it would have to be recursive
prob infinite series like with logs
Join our real-time social learning platform and learn together with your friends!