English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Java Math mathematical methods
La méthode getExponent() de Math en Java renvoie l'exponentiel non biaisé utilisé dans la représentation double ou float.
Autrement dit, convertir un nombre à virgule flottante ou double en forme exponentielle. Cette méthode renvoie la partie exponentielle de l'expression.
La syntaxe de la méthode getExponent() est :
Math.getExponent(value)
Note: The getExponent() method is a static method. Therefore, we can call this method directly using the class name Math.
value -To return the number whose exponent is to be returned
Note: The value can be float or double.
Returns the unbiased exponent of the floating-point representation of the value
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 } }