test/java/lang/Math/HyperbolicTests.java
Print this page
*** 26,37 ****
* @bug 4851625 4900189 4939441
* @summary Tests for {Math, StrictMath}.{sinh, cosh, tanh}
* @author Joseph D. Darcy
*/
- import sun.misc.DoubleConsts;
-
public class HyperbolicTests {
private HyperbolicTests(){}
static final double NaNd = Double.NaN;
--- 26,35 ----
*** 340,350 ****
failures += testSinhCaseWithUlpDiff(input, expected, 4.0);
}
// 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);
--- 338,348 ----
failures += testSinhCaseWithUlpDiff(input, expected, 4.0);
}
// sinh(x) overflows for values greater than 710; in
// particular, it overflows for all 2^i, i > 10.
! for(int i = 10; i <= Double.MAX_EXPONENT; i++) {
double d = Math.scalb(2.0, i);
// Result and expected are the same.
failures += testSinhCaseWithUlpDiff(d,
Double.POSITIVE_INFINITY, 0.0);
*** 699,709 ****
failures += testCoshCaseWithUlpDiff(input, expected, 4.0);
}
// 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);
--- 697,707 ----
failures += testCoshCaseWithUlpDiff(input, expected, 4.0);
}
// cosh(x) overflows for values greater than 710; in
// particular, it overflows for all 2^i, i > 10.
! for(int i = 10; i <= Double.MAX_EXPONENT; i++) {
double d = Math.scalb(2.0, i);
// Result and expected are the same.
failures += testCoshCaseWithUlpDiff(d,
Double.POSITIVE_INFINITY, 0.0);
*** 994,1004 ****
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);
}
--- 992,1002 ----
for(int i = 22; i < 32; i++) {
failures += testTanhCaseWithUlpDiff(i, 1.0, 2.5);
}
! for(int i = 5; i <= Double.MAX_EXPONENT; i++) {
double d = Math.scalb(2.0, i);
failures += testTanhCaseWithUlpDiff(d, 1.0, 2.5);
}