Math.getExponent : Floating Point Number « JDK 6 « Java






Math.getExponent

 

public class FloastPointDemo {
    public static void main (String[] args) {
      // Returns the unbiased exponent value of a double,
      // where 2^exp <= d. In this case, 2^4 <= 17
      int exp = Math.getExponent (17.0);
      System.out.println ("Math.getExponent (17.0) = " + exp);

    }
}

//Math.getExponent (17.0) = 4

        








Related examples in the same category

1.Math.scalb
2.Math.nextAfter
3.Math.nextUp
4.Math.copySign