Java Math.log10() method21 Mar 2025 | 2 min read The java.lang.Math.log10() is used to find out the Logarithmic of a number when the base is 10. This method returns the base 10 logarithm of a double value. SyntaxParameterReturn
Example 1Output: 1.5899496013257077 Example 2Output: 5.0 Example 3Output: Infinity Example 4Output: NaN Example 5Output: -Infinity Next TopicJava Math |
Java method The java.lang. returns the negation of the argument. It will throw an exception if the result overflows either int or long. Syntax public static int negateExact (int a) public static long negateExact (long a) Parameter a = the value to negate Return It returns the negation of the argument. If...
2 min read
Java method The java.lang. is used to find the largest integer value which is less than or equal to the argument and is equal to the mathematical integer of a double value. Syntax public static double floor(double a) Parameter x= a value Return This method returns largest floating-point value that is...
2 min read
Java method The java.lang. is used round of the decimal numbers to the nearest value. This method is used to return the closest long to the argument, with ties rounding to positive infinity. Syntax public static int round(float x) public static long round(double x) Parameter x= It is a floating-point...
2 min read
Java method The java.lang. is used to return the square root of a number. Syntax public static double sqrt(double x) Parameter x= a value Return This method returns the square root of x. If the argument is positive double value, this method will return the square root of a given value. If the...
2 min read
Java method The java.lang. is used to return the hyperbolic cosine of a value. The hyperbolic cosine of any value x can be defined as (ex + e -x)/2, where e is an Euler's number. Syntax public static double cosh(double x) Parameter x = the number whose hyperbolic cosine...
2 min read
Java method The java.lang. returns the size of an ulp of the argument. An ulp is the unit in the last place. An ulp of a float or double value is the positive distance between given value and the value that is larger in...
2 min read
Java Math.After() method The java.lang.Math.After() returns the floating-point number adjacent to the first argument in the direction of the second argument. If both first argument and second argument are same then this method will return second argument. Syntax: public static double After(double a, double b) public static float After(float...
2 min read
Java Math.Down() method The java.lang.Math.Down() is a built-in math method in java. It returns the floating-point value adjacent to the user specified parameter (d) in the direction of negative infinity. This method is equivalent to After(d, Double.NEGATIVE_INFINITY) method. Implementation of Down may run faster than its equivalent...
2 min read
Java method The java.lang. is used to round the argument to nearest mathematical integer. Syntax public static double rint(double x) Parameter x= a double value Return It returns closest floating-point value to x that is equal to a mathematical integer. If the argument is positive or negative number, this method will return...
2 min read
Java method The java.lang.Math.mutliplyExact() returns the product of the arguments. It will throw an exception if the result overflows either int or long. Syntax public static int multiplyExact(int a, int b) public static long multiplyExact(long a, long b) public static long multiplyExact(long a, int b) Parameter a = the first...
2 min read
We request you to subscribe our newsletter for upcoming updates.
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India