java.lang.Math.ulp(float f)


java.lang.Math.ulp(float f)

package com.codingdict;



import java.lang.*;



public class MathDemo {



   public static void main(String[] args) {



      // get two double float numbers

      float x = 956.294f;

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

   }

}