test/java/lang/Math/HyperbolicTests.java
Print this page
*** 264,274 ****
// subsequent terms of the Taylor series expansion will get
// rounded away since |n-n^3| > 53, the binary precision of a
// double significand.
for(int i = DoubleConsts.MIN_SUB_EXPONENT; i < -27; i++) {
! double d = FpUtils.scalb(2.0, i);
// Result and expected are the same.
failures += testSinhCaseWithUlpDiff(d, d, 2.5);
}
--- 264,274 ----
// subsequent terms of the Taylor series expansion will get
// rounded away since |n-n^3| > 53, the binary precision of a
// double significand.
for(int i = DoubleConsts.MIN_SUB_EXPONENT; i < -27; i++) {
! double d = Math.scalb(2.0, i);
// Result and expected are the same.
failures += testSinhCaseWithUlpDiff(d, d, 2.5);
}
*** 342,352 ****
}
// sinh(x) overflows for values greater than 710; in
// particular, it overflows for all 2^i, i > 10.
for(int i = 10; i <= DoubleConsts.MAX_EXPONENT; i++) {
! double d = FpUtils.scalb(2.0, i);
// Result and expected are the same.
failures += testSinhCaseWithUlpDiff(d,
Double.POSITIVE_INFINITY, 0.0);
}
--- 342,352 ----
}
// sinh(x) overflows for values greater than 710; in
// particular, it overflows for all 2^i, i > 10.
for(int i = 10; i <= DoubleConsts.MAX_EXPONENT; i++) {
! double d = Math.scalb(2.0, i);
// Result and expected are the same.
failures += testSinhCaseWithUlpDiff(d,
Double.POSITIVE_INFINITY, 0.0);
}
*** 623,633 ****
// For powers of 2 less than 2^(-27), the second and
// subsequent terms of the Taylor series expansion will get
// rounded.
for(int i = DoubleConsts.MIN_SUB_EXPONENT; i < -27; i++) {
! double d = FpUtils.scalb(2.0, i);
// Result and expected are the same.
failures += testCoshCaseWithUlpDiff(d, 1.0, 2.5);
}
--- 623,633 ----
// For powers of 2 less than 2^(-27), the second and
// subsequent terms of the Taylor series expansion will get
// rounded.
for(int i = DoubleConsts.MIN_SUB_EXPONENT; i < -27; i++) {
! double d = Math.scalb(2.0, i);
// Result and expected are the same.
failures += testCoshCaseWithUlpDiff(d, 1.0, 2.5);
}
*** 701,711 ****
}
// cosh(x) overflows for values greater than 710; in
// particular, it overflows for all 2^i, i > 10.
for(int i = 10; i <= DoubleConsts.MAX_EXPONENT; i++) {
! double d = FpUtils.scalb(2.0, i);
// Result and expected are the same.
failures += testCoshCaseWithUlpDiff(d,
Double.POSITIVE_INFINITY, 0.0);
}
--- 701,711 ----
}
// cosh(x) overflows for values greater than 710; in
// particular, it overflows for all 2^i, i > 10.
for(int i = 10; i <= DoubleConsts.MAX_EXPONENT; i++) {
! double d = Math.scalb(2.0, i);
// Result and expected are the same.
failures += testCoshCaseWithUlpDiff(d,
Double.POSITIVE_INFINITY, 0.0);
}
*** 982,992 ****
// subsequent terms of the Taylor series expansion will get
// rounded away since |n-n^3| > 53, the binary precision of a
// double significand.
for(int i = DoubleConsts.MIN_SUB_EXPONENT; i < -27; i++) {
! double d = FpUtils.scalb(2.0, i);
// Result and expected are the same.
failures += testTanhCaseWithUlpDiff(d, d, 2.5);
}
--- 982,992 ----
// subsequent terms of the Taylor series expansion will get
// rounded away since |n-n^3| > 53, the binary precision of a
// double significand.
for(int i = DoubleConsts.MIN_SUB_EXPONENT; i < -27; i++) {
! double d = Math.scalb(2.0, i);
// Result and expected are the same.
failures += testTanhCaseWithUlpDiff(d, d, 2.5);
}
*** 996,1006 ****
for(int i = 22; i < 32; i++) {
failures += testTanhCaseWithUlpDiff(i, 1.0, 2.5);
}
for(int i = 5; i <= DoubleConsts.MAX_EXPONENT; i++) {
! double d = FpUtils.scalb(2.0, i);
failures += testTanhCaseWithUlpDiff(d, 1.0, 2.5);
}
return failures;
--- 996,1006 ----
for(int i = 22; i < 32; i++) {
failures += testTanhCaseWithUlpDiff(i, 1.0, 2.5);
}
for(int i = 5; i <= DoubleConsts.MAX_EXPONENT; i++) {
! double d = Math.scalb(2.0, i);
failures += testTanhCaseWithUlpDiff(d, 1.0, 2.5);
}
return failures;