Languages
[Edit]
EN

Java - Math.log10() method example

0 points
Created by:
Frank-van-Puffelen
439

The Math.log10() method returns the logarithm with base 10 of a number. 

The Math.log10() method is presented on the following chart:

Math.log10(x) function visualization - Java Math Object.
Math.log10(x) function visualization - Java Math Object.

1. Documentation

Edit
Syntax

Note: Classes in the java.lang package are imported automatically, so it is not necessary to do it manually - we use just Math.log10() call.

Parametersx - double value in the range 0 to +Infinity (primitive value).
Result

number value calculated as log_10(x) mathematical function (primitive value).

If x is negative it returns NaN.

If x is equal to 0 it returns -Infinity.

If x is equal to +Infinity it returns -Infinity.

Description

log10 is a static method that takes one parameter and returns an approximation of the log_10(x) mathematical function (logarithm with base 10). log10 is called a common logarithm.

References

Edit
  1. Logarithm - Wikipedia

1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

Java - Math object

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join