Java Math.ulp() methodThe java.lang.Math.ulp() returns the size of an ulp of the argument. An ulp is the unit in the last place. An ulp of a float or double value is the positive distance between given value and the next value that is larger in magnitude. Note: For non-NaN x, ulp(-x) == ulp(x).SyntaxParameterReturn
Example 1Test it NowOutput: 1.7763568394002505E-15 Example 2Test it NowOutput: 7.105427357601002E-15 Example 3Test it NowOutput: Infinity Example 4Test it NowOutput: 4.9E-324 Example 5Test it NowOutput: 1.9958403095347198E292 Example 6Test it NowOutput: 2.028241E31 Next TopicJava Math |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India