summaryrefslogtreecommitdiffstats
path: root/minimize.scm
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:05:29 -0800
committerBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:05:29 -0800
commit8466d8cfa486fb30d1755c4261b781135083787b (patch)
treec8c12c67246f543c3cc4f64d1c07e003cb1d45ae /minimize.scm
parent87b82b5822ca54228cfa6df29be3ad9d4bc47d16 (diff)
downloadslib-8466d8cfa486fb30d1755c4261b781135083787b.tar.gz
slib-8466d8cfa486fb30d1755c4261b781135083787b.zip
Import Upstream version 3a1upstream/3a1
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)