The java.lang.Math.getExponent() is a built-in math function which returns the unbiased exponent used in the representation of a float.
- If the argument is NaN or infinite, then the result is Float.MAX_EXPONENT + 1.
- If the argument is zero or subnormal, then the result is Float.MIN_EXPONENT -1.
public static int getExponent(float val) Parameter: val - a float value
The method returns the unbiased exponent of the argument.
Example: To show working of java.lang.Math.getExponent() function
12 9 -127
Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.
- Java Math getExponent() method with Example
- StrictMath getExponent() Method In Java
- Java.math.BigInteger.probablePrime() method in Java
- Java.math.BigInteger.modInverse() method in Java
- Math pow() method in Java with Example
- Java Math exp() method with Example
- Java Math log() method with example
- Java Math ulp() method with Examples
- Java Math expm1() method with Example
- Java Math hypot() method with Example
- Java Math sin() method with Examples
- Math scalb() Method in Java
- Java Math round() method with Example
- Java Math tan() method with Examples
- Java Math cos() method with Examples
- Java Math nextAfter() method with Example
- Java Math abs() method with Examples
- Java Math decrementExact() method
- Java Math incrementExact() method
- Java Math asin() method with Example
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.