diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:29 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:29 -0800 |
commit | 8466d8cfa486fb30d1755c4261b781135083787b (patch) | |
tree | c8c12c67246f543c3cc4f64d1c07e003cb1d45ae /minimize.scm | |
parent | 87b82b5822ca54228cfa6df29be3ad9d4bc47d16 (diff) | |
download | slib-8466d8cfa486fb30d1755c4261b781135083787b.tar.gz slib-8466d8cfa486fb30d1755c4261b781135083787b.zip |
Import Upstream version 3a1upstream/3a1
Diffstat (limited to 'minimize.scm')
-rw-r--r-- | minimize.scm | 3 |
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) |