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) {

        // get two double float numbers
        float x = 123.456f;
        float y = 123.1f;

        // print the ulp of these floats
        System.out.println("Math.ulp(" + x + ")=" + Math.ulp(x));
        System.out.println("Math.ulp(" + y + ")=" + Math.ulp(y));

    }
}