Math.nextUp : Floating Point Number « JDK 6 « Java






Math.nextUp

 


public class FloastPointDemo {
  public static void main(String[] args) {
    // Returns the greater adjacent of a double
    double greaterAdjacent = Math.nextUp(123.0);
    System.out.println("Math.nextUp (123.0) = " + greaterAdjacent);
  }
}

// Math.nextUp (123.0) = 123.00000000000001

        








Related examples in the same category

1.Math.scalb
2.Math.getExponent
3.Math.nextAfter
4.Math.copySign