Wednesday, 15 February 2017

Math : getExponent




public class GetExponentMethod {

    public static void main(String[] args) {

        // get two double numbers        double x = 60984.1;        double y = -497.99;
        // 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));    }
}

No comments:

Post a Comment