summaryrefslogtreecommitdiffstats
path: root/minimize.scm
diff options
context:
space:
mode:
Diffstat (limited to 'minimize.scm')
-rw-r--r--minimize.scm3
1 files changed, 1 insertions, 2 deletions
diff --git a/minimize.scm b/minimize.scm
index 50a7e65..e28568a 100644
--- a/minimize.scm
+++ b/minimize.scm
@@ -48,7 +48,6 @@
;; (lambda (a b c d e f g ) (= g 500)))
;; ==> (816.4965933140557e-3 . -6.088662107903635)
;;@end example
-
(define golden-section-search
(let ((gss 'golden-section-search:)
(r (/ (- (sqrt 5) 1) 2))) ; 1 / golden-section
@@ -91,7 +90,7 @@
(set! fmin (min fa fb)))
((2)
(set! fmin (min fmin fa fb))
- (if (eqv? fmax fa fb) (slib:error gss 'flat? fmax)))
+ (if (= fmax fa fb) (slib:error gss 'flat? fmax)))
(else
(set! fmin (min fmin fa fb))))
(cond ((stop? left right a b fa fb count)