Searched refs:ulp (Results 1 - 13 of 13) sorted by relevance

/openjdk7/jdk/src/share/classes/java/lang/
H A DMath.java55 * a given floating-point format, an ulp of a specific real number
67 * with a 1 ulp error bound, when the exact result is a representable
74 * important. Therefore, most methods with more than 0.5 ulp errors
79 * have 1 ulp accuracy will automatically meet the monotonicity
114 * <p>The computed result must be within 1 ulp of the exact result.
129 * <p>The computed result must be within 1 ulp of the exact result.
146 * <p>The computed result must be within 1 ulp of the exact result.
164 * <p>The computed result must be within 1 ulp of the exact result.
180 * <p>The computed result must be within 1 ulp of the exact result.
197 * <p>The computed result must be within 1 ulp o
965 public static double ulp(double d) { method in class:Math
992 public static float ulp(float f) { method in class:Math
[all...]
H A DStrictMath.java413 * away any fractional portion of a since ulp(twoToThe52) ==
935 * Returns the size of an ulp of the argument. An ulp of a
939 * <code>ulp(-<i>x</i>) == ulp(<i>x</i>)</code>.
952 * @param d the floating-point value whose ulp is to be returned
953 * @return the size of an ulp of the argument
957 public static double ulp(double d) { method in class:StrictMath
958 return sun.misc.FpUtils.ulp(d);
962 * Returns the size of an ulp o
984 public static float ulp(float f) { method in class:StrictMath
[all...]
/openjdk7/jdk/test/java/lang/Math/
H A DLog10Tests.java112 if( Math.abs(((result=Math.log10(input)) - expected)/Math.ulp(expected)) > 3) {
120 if( Math.abs(((result=StrictMath.log10(input)) - expected)/Math.ulp(expected)) > 3) {
174 if ( Math.abs(neighbors[i] - expected ) > 3*Math.ulp(expected) ) {
182 if ( Math.abs(neighborsStrict[i] - expected ) > 3*Math.ulp(expected) ) {
H A DIeeeRecommendedTests.java1352 /* ************************* ulp tests ******************************* */
1356 * Test Math.ulp and StrictMath.ulp with +d and -d.
1362 failures+=Tests.test("Math.ulp(float)", f,
1363 Math.ulp(f), expected);
1364 failures+=Tests.test("Math.ulp(float)", minus_f,
1365 Math.ulp(minus_f), expected);
1366 failures+=Tests.test("StrictMath.ulp(float)", f,
1367 StrictMath.ulp(f), expected);
1368 failures+=Tests.test("StrictMath.ulp(floa
[all...]
H A DTests.java219 // answer. This would cause the ulp size to be half as large
233 !(Math.abs( difference/Math.ulp(expected) ) <= Math.abs(ulps)) ) {
251 "\tdifference greater than ulp tolerance " + ulps);
266 "\tdifference greater than ulp tolerance " + ulps);
271 // For a successful test, the result must be within the ulp bound of
290 "\tdifference greater than ulp tolerance " + ulps +
296 // For a successful test, the result must be within the ulp bound of
315 "\ndifference greater than ulp tolerance " + ulps +
/openjdk7/jdk/src/share/classes/sun/misc/
H A DFpUtils.java1072 * Returns the size of an ulp of the argument. An ulp of a
1076 * <code>ulp(-<i>x</i>) == ulp(<i>x</i>)</code>.
1089 * @param d the floating-point value whose ulp is to be returned
1090 * @return the size of an ulp of the argument
1094 public static double ulp(double d) { method in class:FpUtils
1107 // ulp(x) is usually 2^(SIGNIFICAND_WIDTH-1)*(2^ilogb(x))
1123 * Returns the size of an ulp of the argument. An ulp o
1145 public static float ulp(float f) { method in class:FpUtils
[all...]
H A DFormattedFloatingDecimal.java250 private static double ulp( double dval, boolean subtracting ){ method in class:FormattedFloatingDecimal
1440 // halfUlp is 1/2 an ulp of bigB, except for special cases
1457 // For our purposes, ulp is the ulp of the
1461 // rats. Cannot de-scale ulp this far.
1486 dValue += 0.5*ulp( dValue, overvalue );
1497 dValue += ulp( dValue, overvalue );
H A DFloatingDecimal.java242 private static double ulp( double dval, boolean subtracting ){ method in class:FloatingDecimal
1534 // halfUlp is 1/2 an ulp of bigB, except for special cases
1551 // For our purposes, ulp is the ulp of the
1555 // rats. Cannot de-scale ulp this far.
1580 dValue += 0.5*ulp( dValue, overvalue );
1591 dValue += ulp( dValue, overvalue );
/openjdk7/jdk/src/share/classes/java/awt/geom/
H A DCubicCurve2D.java36 import static java.lang.Math.ulp;
1151 double err = 1200000000*ulp(abs(uv) + abs(sub));
1271 if (iszero(fx, 10000000*ulp(x))) {
1300 if (within(t, origt, 1000*ulp(origt)) && inInterval(t, min, max)) {
1395 M += ulp(M) + 1;
/openjdk7/jdk/src/share/classes/sun/java2d/pisces/
H A DStroker.java30 import static java.lang.Math.ulp;
569 final boolean p1eqp2 = within(x1,y1,x2,y2, 6 * ulp(y2));
570 final boolean p3eqp4 = within(x3,y3,x4,y4, 6 * ulp(y4));
586 if (Helpers.within(dotsq, l1sq * l4sq, 4 * ulp(dotsq))) {
H A DPiscesRenderingEngine.java367 return Math.abs(num) < nulps * Math.ulp(num);
/openjdk7/jdk/test/java/math/BigDecimal/
H A DZeroScalingTests.java437 if (! (result=zero.ulp()).equals(expected) ) {
439 System.err.println("Unexpected ulp value for zero value " +
/openjdk7/jdk/src/share/classes/java/math/
H A DBigDecimal.java169 * than one unit in the last place, one <i>{@linkplain #ulp() ulp}</i>.
1229 * This is the estimated scale of an ulp of the result; it
3140 * Returns the size of an ulp, a unit in the last place, of this
3141 * {@code BigDecimal}. An ulp of a nonzero {@code BigDecimal}
3144 * same number of digits. An ulp of a zero value is numerically
3150 * @return the size of an ulp of {@code this}
3153 public BigDecimal ulp() { method in class:BigDecimal

Completed in 63 milliseconds