Java tutorial
public class Main { public static void main(String[] args) { float f1 = 1.23f, f2 = -4.3f, f3 = 0.0f; System.out.println("Size of ulp of " + f1 + " : " + StrictMath.ulp(f1)); System.out.println("Size of ulp of " + f2 + " : " + StrictMath.ulp(f2)); System.out.println("Size of ulp of " + f3 + " : " + StrictMath.ulp(f3)); } }