Skip to content

Commit

Permalink
Add expm1 test case to cover the k==1024 case (#4508)
Browse files Browse the repository at this point in the history
-7.095e+02 won't trigger the  k==1024 case, so we didn't add it into the test list

JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo [email protected]
  • Loading branch information
lygstate authored Jan 18, 2021
1 parent cb85797 commit d97540e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/unit-math/test-math.inc.h
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ check_double ("expm1 (INFINITY)", expm1 (INFINITY), INF);
check_double ("expm1 (-INFINITY)", expm1 (-INFINITY), -1.00000000000000000000E+00);
check_double ("expm1 (NAN)", expm1 (NAN), NAN);
check_double ("expm1 (7.08e+02)", expm1 (7.08e+02), 3.02338314427605515848E+307);
check_double ("expm1 (7.095e+02)", expm1 (7.095e+02), 1.35498631931463283283E+308);
check_double ("expm1 (7.10e+02)", expm1 (7.10e+02), INF);
check_double ("expm1 (-7.40e+02)", expm1 (-7.40e+02), -1.00000000000000000000E+00);
check_double ("expm1 (-7.50e+02)", expm1 (-7.50e+02), -1.00000000000000000000E+00);
Expand Down
1 change: 1 addition & 0 deletions tools/unit-tests/gen-test-math.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ main (int argc, char **args)
GEN_DBL_TEST (expm1 (-INFINITY));
GEN_DBL_TEST (expm1 (NAN));
GEN_DBL_TEST (expm1 (7.08e+02));
GEN_DBL_TEST (expm1 (7.095e+02));
GEN_DBL_TEST (expm1 (7.10e+02));
GEN_DBL_TEST (expm1 (-7.40e+02));
GEN_DBL_TEST (expm1 (-7.50e+02));
Expand Down

0 comments on commit d97540e

Please sign in to comment.