[archives] [homepage]

Problem 2.12
Friday, August 23, 2019; ago; Download .md

SICP Exercise 2.13

Straightforward solution:

(define (make-center-percent c p)
  (let ((tolerance (* c (/ p 100))))
    (make-interval (+ c tolerance)
                   (- c tolerance))))

(define (percent x)
  (* (/ abs(- (center x) (car x)) (center x)) 100))