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 x = 123.456;
        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));

    }
}