| Return | Method | Summary |
|---|---|---|
| static double | ulp(double d) | Returns the size of an ulp of the argument. |
| static float | ulp(float f) | Returns the size of an ulp of the argument. |
public class Main {
public static void main(String[] args) {
System.out.println(Math.ulp(1.2));
System.out.println(Math.ulp(-1.2));
}
}
The output:
2.220446049250313E-16
2.220446049250313E-16java2s.com | | Contact Us | Privacy Policy |
| Copyright 2009 - 12 Demo Source and Support. All rights reserved. |
| All other trademarks are property of their respective owners. |