Programiz
programiz.com › java-programming › library › math › getexponent
Java Math getExponent()
class Main { public static void main(String[] args) { // Math.getExponent() with float variable float a = 50.8f; System.out.println(Math.getExponent(a)); // 5 // Math.getExponent with double variable double b = 89.3d; System.out.println(Math.getExponent(b)); // 6 } }
W3Schools
w3schools.com › java › ref_math_getexponent.asp
Java Math getExponent() Method
Java Examples Java Videos Java Compiler Java Exercises Java Quiz Java Code Challenges Java Server Java Syllabus Java Study Plan Java Interview Q&A Java Certificate · ❮ Math Methods · Get the exponent of different floating point numbers: System.out.println(Math.getExponent(1)); System.out.println(Math.getExponent(2)); System.out.println(Math.getExponent(-8)); System.out.println(Math.getExponent(10)); System.out.println(Math.getExponent(0.5)); System.out.println(Math.getExponent(-0.33)); Try it Yourself » ·
Videos
Tutorialspoint
tutorialspoint.com › java › lang › math_getexponent_double.htm
Java - Math getExponent(double) Method
package com.tutorialspoint; public class MathDemo { public static void main(String[] args) { // get a double number double x = 60984.1; // print the unbiased exponent of the number System.out.println("Math.getExponent(" + x + ")=" + Math.getExponent(x)); } }
Tutorialspoint
tutorialspoint.com › java › lang › math_getexponent_float.htm
Java - Math getExponent(float) Method
package com.tutorialspoint; public class MathDemo { public static void main(String[] args) { // get a float number float x = 60984.1f; // print the unbiased exponent of the number System.out.println("Math.getExponent(" + x + ")=" + Math.getExponent(x)); } }
BeginnersBook
beginnersbook.com › 2022 › 10 › java-math-getexponent-method
Java Math.getExponent() Method
October 19, 2022 - Java Math.getExponent() method returns unbiased exponent used in the representation of the argument. This method can accept double and float arguments. public class JavaExample { public static void main(String[] args) { double x = Double.POSITIVE_INFINITY; // Returns Double.MAX_EXPONENT+1 ...
Javatpoint
javatpoint.com › java-math-getexponent-method
Java Math.getExponent() Method with Examples - Javatpoint
Java Math.getExponent() Method with Examples on abs(), min(), max(), avg(), round(), ceil(), floor(), pow(), sqrt(), sin(), cos(), tan(), exp() etc.
Java Tutorial HQ
javatutorialhq.com › java tutorial › java.lang › math › getexponent() method example
Java Math getExponent() method example
September 30, 2019 - package com.javatutorialhq.java.examples; import java.util.Scanner; /* * This example source code demonstrates the use of * getExponent() method of Math class */ public class MathGetExponentExample { public static void main(String[] args) { // Ask for user input System.out.print("Enter an input:"); // use scanner to read the console input Scanner scan = new Scanner(System.in); // Assign the user to String variable String s = scan.nextLine(); // close the scanner object scan.close(); // convert the string input to double double value = Double.parseDouble(s); // get the result of decrementExact int exponent = Math.getExponent(value); System.out.println("Result of the operation is " + exponent); } }
Oracle
docs.oracle.com › javase › 8 › docs › api › java › lang › Math.html
Math (Java Platform SE 8 )
2 weeks ago - Java™ Platform Standard Ed. 8 ... The class Math contains methods for performing basic numeric operations such as the elementary exponential, logarithm, square root, and trigonometric functions.
Tpoint Tech
tpointtech.com › java-math-getexponent-method
Java Math.getExponent() method - Tpoint Tech
The java.lang.Math.getExponent() return the unbiased exponent used in the representation of double or float. Syntax public static int getExponent(float x) pu...
Tabnine
tabnine.com › home page › code › java › java.lang.math
java.lang.Math.getExponent java code examples | Tabnine
static long getSignificand(double d) { checkArgument(isFinite(d), "not a normal value"); int exponent = getExponent(d); long bits = doubleToRawLongBits(d); bits &= SIGNIFICAND_MASK; return (exponent == MIN_EXPONENT - 1) ? bits << 1 : bits | IMPLICIT_BIT; } ... /** * Returns {@code true} if {@code x} represents a mathematical integer. * * <p>This is equivalent to, but not necessarily implemented as, the expression {@code * !Double.isNaN(x) && !Double.isInfinite(x) && x == Math.rint(x)}. */ @GwtIncompatible // java.lang.Math.getExponent, com.google.common.math.DoubleUtils public static boolean isMathematicalInteger(double x) { return isFinite(x) && (x == 0.0 || SIGNIFICAND_BITS - Long.numberOfTrailingZeros(getSignificand(x)) <= getExponent(x)); }
Programiz
programiz.com › java-programming › library › math › exp
Java Math exp()
Java Math.getExponent() Java Math.hypot() Java Math.IEEEremainder() Java Math.log() Java Math.log10() Java Math.log1p() Java Math.nextAfter() Java Math.nextUp() Java Math.nextDown() Java Math.rint() Java Math.random() Java Math expm1() Java Math log10() Java Math sinh() Java Math getExponent() Java Math log1p() Java Math cosh() That is, Math.exp(4.0) = e4.0.
Educative
educative.io › answers › what-is-the-mathgetexponent-method-in-java
What is the Math.getExponent() method in Java?
November 29, 2021 - The getExponent() function from the math library returns the unbiased exponent of the argument x.
Apache
pig.apache.org › docs › r0.17.0 › api › org › apache › pig › piggybank › evaluation › math › getExponent.html
getExponent (Pig 0.17.0 API)
java.lang.Object · org.apache... implements a binding to the Java function Math.getExponent(double). Given a single data atom it returns the unbiased exponent used in the representation of a double ·...
Java2s
java2s.com › Tutorials › Java › java.lang › Math › Java_Math_getExponent_double_d_.htm
Java Tutorial - Java Math.getExponent(double d)
//from ww w .jav a 2 s .c o m public class Main { public static void main(String[] args) { double x = 123456.7; double y = -123.45; // print the unbiased exponent of them System.out.println("Math.getExponent(" + x + ")=" + Math.getExponent(x)); System.out.println("Math.getExponent(" + y + ")=" + Math.getExponent(y)); System.out.println("Math.getExponent(0)=" + Math.getExponent(0)); } } The code above generates the following result. Next » · « Previous · Home » Java Tutorial » java.lang » ·