sicp

sicp sandbox.
git clone git://git.ricketyspace.net/sicp.git
Log | Files | Refs

commit 8d6bb0aee4679f874ddfb6f7edd8945852cb9c99
parent 04fcdb04e2983f9b0ad0cfdb5e36ba04511bc121
Author: rsiddharth <s@ricketyspace.net>
Date:   Sat,  7 Jan 2017 04:35:55 +0000

one/fifteen.scm: fix log function.

Diffstat:
one/fifteen.scm | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/one/fifteen.scm b/one/fifteen.scm @@ -10,7 +10,7 @@ (let ((out "")) (define (log angle) (set! out (string-append out " (p (sine " - (number->string angle)))) + (number->string (/ angle 3.0))))) (define (close-parens s) (string-trim (string-append s (fold-matches "\\([p,s]" s "" @@ -28,4 +28,4 @@ (close-parens out))) ;; ;; (sine 12.15) -;; $24 = "(p (sine 12.15 (p (sine 4.05 (p (sine 1.3499999999999999 (p (sine 0.44999999999999996 (p (sine 0.15))))))))))" +;; $25 = "(p (sine 4.05 (p (sine 1.3499999999999999 (p (sine 0.44999999999999996 (p (sine 0.15 (p (sine 0.049999999999999996))))))))))"