(define (cube x) (* x x x)) (define (p x) (- (* 3 x) (* 4 (cube x)))) (define (sine angle) (if (< (abs angle) 0.1) angle (p (sine (/ angle 3.0))))) ; (sine 12.15) ; (p (sine 4.05)) ; (p (p (sine 1.35))) ; (p (p (p (sine 0.45)))) ; (p (p (p (p (sine 0.15))))) ; (p (p (p (p (sine 0.05))))) ; (p (p (p (p 0.05)))) ; ... ; => p is applied four times ; (sin a) ; linear recursive process ; O(log(a)) time and space complexity ; ~log(a/0.1)/log(3) steps