Permalink
Browse files

Move the example function from the textbook to the library of helpers

  • Loading branch information...
1 parent a8a82b9 commit f38a8e80a2e76837d17bcbe5b000745b004b6080 Andreas Pauley committed Aug 2, 2010
Showing with 4 additions and 4 deletions.
  1. +3 −0 Chapter1/helpers.scm
  2. +1 −4 Chapter1/secant.scm
View
@@ -13,3 +13,6 @@ the value where the line intersects with the x-axis"
(define tolerance 0.00001)
(define (close-enough-to-zero? x)
(<= (abs x) tolerance))
+
+(define (example-f x)
+ (+ (* 3 x) (sin x) (- (exp x))))
View
@@ -15,7 +15,4 @@
x2
(secant f x1 x2)))
-(define (fx x)
- (+ (* 3 x) (sin x) (- (exp x))))
-
-(println (secant fx 1 0))
+(println (secant example-f 1 0))

0 comments on commit f38a8e8

Please sign in to comment.