The java.lang.Math class provides a static method log(x), which returns the logarithm of x with a base

Question:

The java.lang.Math class provides a static method log(x), which returns the logarithm of x with a base that is approximately 2.718282..7This base is written e, 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 number e may 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 log10 e is 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.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: