Subscribe

RSS Feed (xml)

Powered By

Skin Design:
Free Blogger Skins

Powered by Blogger

Wednesday, November 21, 2007

code for Math.nextAfter in java

public class FloastPointDemo {
public static void main(String[] args) {
// Returns the lesser adjacent of a double
double lesserAdjacent = Math.nextAfter(123.0, 120.0);
System.out.println("Math.nextAfter (123.0, 120.0) = " + lesserAdjacent);
}
}

// Math.nextAfter (123.0, 120.0) = 122.99999999999999

No comments: