1. The java.lang.Math class provides a static method log(x), which returns the logarithm of x with a base that is approximately 2.71828. This base is written 2.7e, and the logarithms with this base are called natural logarithms or Napierian logarithms, after the Scottish mathematician John Napier (1550 –1617) who invented these logarithms. The numberemay seem like a strange choice for the base of a logarithm, but the choice is motivated by the fact that natural logarithms are easy to approximate as the sum of a series. Anyway, in this project, you are to write a method:
double log10(double x)
The method returns the base 10 logarithm of x. Make use of the java.lang.Math.log method and the formulas in Section 10.4. You can also use the fact that log10eis about 0.4342944819032.
By the way, Napier also invented a calculator called “Napier’s bones.” The device performed multiplication and division through a series of connected rods with tables marked on them.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here