Wednesday, 15 February 2017

Math : UlpMethod

public class UlpMethod {

    public static void main(String[] args) {

        // get two double numbers numbers        double x = 956.294;        double y = 123.1;
        // print the ulp of these doubles        System.out.println("Math.ulp(" + x + ")=" + Math.ulp(x));        System.out.println("Math.ulp(" + y + ")=" + Math.ulp(y));    }
}

No comments:

Post a Comment