Java tutorial
public class Main { public static void main(String[] args) { double d1 = 123.4d, d2 = 0.0d; System.out.println(StrictMath.nextAfter(d1, 9.2d)); System.out.println(StrictMath.nextAfter(d2, 9.2d)); System.out.println(StrictMath.nextAfter(d2, 0.0d)); } }