Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

public class Main {

    public static void main(String[] args) {

        double d1 = 1.2, d2 = -2.3, d3 = 0.0;

        System.out.println("Size of ulp of " + d1 + " = " + StrictMath.ulp(d1));

        System.out.println("Size of ulp of " + d2 + " = " + StrictMath.ulp(d2));

        System.out.println("Size of ulp of " + d3 + " = " + StrictMath.ulp(d3));
    }
}