~ chicken-core (chicken-5) e96c2d20fba5f41e6ec2948a047dd855389c9485
commit e96c2d20fba5f41e6ec2948a047dd855389c9485 Author: Peter Bex <peter@more-magic.net> AuthorDate: Sun Sep 6 21:09:42 2015 +0200 Commit: Peter Bex <peter@more-magic.net> CommitDate: Sun Sep 6 21:09:42 2015 +0200 Don't use exact comparison for inexact result diff --git a/tests/numbers-test.scm b/tests/numbers-test.scm index 6a211c26..fb556295 100644 --- a/tests/numbers-test.scm +++ b/tests/numbers-test.scm @@ -706,7 +706,8 @@ (test-error "inexact->exact -NaN" (inexact->exact +nan.0)) (test-equal "sqrt (integer result)" (sqrt 16) 4) (test-equal "sqrt (exact result)" (sqrt 1/4) 1/2) - (test-equal "sqrt (inexact result)" (sqrt 2) 1.4142135623730951) + (parameterize ((current-test-epsilon 1e-10)) + (test-equal "sqrt (inexact result)" (sqrt 2) 1.4142135623730951)) (test-equal "sqrt (inexact input)" (sqrt 4.0) 2.0) (test-equal "sqrt (exact large number)" (sqrt (* max-fix max-fix)) max-fix) (test-error "exact-integer-sqrt (nonint flonum)" (exact-integer-sqrt 1.5))Trap