diff --git a/pkgs/racket-test-core/tests/racket/math.rktl b/pkgs/racket-test-core/tests/racket/math.rktl index fce2674b71..85e1bf459e 100644 --- a/pkgs/racket-test-core/tests/racket/math.rktl +++ b/pkgs/racket-test-core/tests/racket/math.rktl @@ -329,6 +329,7 @@ (test 0 tanh 0) (test #t double=? tanh+1 (tanh 1)) (test 1.0 tanh 20) +(test #t flonum? (tanh (inexact->exact 1/100000000000))) #reader "maybe-single.rkt" (begin diff --git a/racket/collects/racket/math.rkt b/racket/collects/racket/math.rkt index 2f470151ad..50a0919ddc 100644 --- a/racket/collects/racket/math.rkt +++ b/racket/collects/racket/math.rkt @@ -73,7 +73,7 @@ [(real? z) (let loop ([z z]) (cond [(z . < . 0) (- (loop (- z)))] - [(z . < . 1.29047841397589243466D-08) z] + [(z . < . 1.29047841397589243466D-08) (exact->inexact z)] [(z . < . 0.54930614433405484570D+00) (define p0 -0.16134119023996228053D+04) (define p1 -0.99225929672236083313D+02)