From: Ramakrishnan Muthukrishnan Date: Thu, 25 Mar 2010 04:05:11 +0000 (+0530) Subject: changed the name `cubert' to a saner name `cuberoot'. X-Git-Url: https://git.rkrishnan.org/vdrive/%5B/%5D%20/uri/cyclelanguage?a=commitdiff_plain;h=342b9572600a6fb4c302a8c963593794aef34456;p=sicp.git changed the name `cubert' to a saner name `cuberoot'. --- diff --git a/chapter1/ch1_1.clj b/chapter1/ch1_1.clj index 118022e..d5eb731 100644 --- a/chapter1/ch1_1.clj +++ b/chapter1/ch1_1.clj @@ -248,17 +248,17 @@ user> (sqrt 81) (cubert-iter new-guess (improve new-guess x) x))) -(defn cubert [x] +(defn cuberoot [x] (cubert-iter x 1.0 x)) -user> (cubert (cube 2)) +user> (cuberoot (cube 2)) 2.000000000012062 -user> (cubert (cube 10)) +user> (cuberoot (cube 10)) 10.000000000000002 -user> (cubert (cube 9)) +user> (cuberoot (cube 9)) 9.000000000053902 -user> (cubert (cube 0.001)) +user> (cuberoot (cube 0.001)) 0.001000000000000962 -user> (cubert (cube 0.0001)) +user> (cuberoot (cube 0.0001)) 1.000000000000001E-4 -user> \ No newline at end of file +user>