We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 86c2a97 commit 17aeb9cCopy full SHA for 17aeb9c
math-lib/math/private/flonum/flonum-brent-dekker.rkt
@@ -88,7 +88,7 @@
88
[(= fb 0.0) b]
89
[(or (flnan? a) (flnan? fa) (flnan? b) (flnan? fb)) +nan.0]
90
;; Check signs
91
- [((* fa fb) . >= . 0.0)
+ [(if (< fa 0.) (< fb 0.) (< 0. fb))
92
(debugf "(f ~v) = ~v and (f ~v) = ~v do not bracket a root~n" a fa b fb)
93
+nan.0]
94
[else
math-test/math/tests/flonum-tests.rkt
@@ -197,3 +197,7 @@ fl2<=
197
(check-equal? (parameterize ([print-fp-test-progress? #f])
198
(test-floating-point 10000))
199
empty)
200
+
201
+;; ===================================================================================================
202
+;; Bracketed root
203
+(check-equal? (flbracketed-root values -1e-200 1e-199) 0.)
0 commit comments