Java tutorial
public class Main { public static void main(String[] args) { float x = 12345.123f; float y = 123.123456f; // print the next floating numbers towards positive infinity System.out.println("Math.nextUp(" + x + ")=" + Math.nextUp(x)); System.out.println("Math.nextUp(" + y + ")=" + Math.nextUp(y)); } }