Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (define (sinx x n)
- (define (sinhulp counter resultaat teller noemer)
- (if(< n counter) (exact->inexact resultaat)
- (let* ((nc (+ 1 counter))
- (nt (* x (* x teller)))
- (nn (* (+ counter (- counter 1)) (* counter noemer) ))
- (no (if (= 0 (modulo counter 2))- +))
- (nr (no resultaat (/ nt nn)))
- )
- (sinhulp nc nr nt nn))
- ))
- (trace sinhulp)
- (sinhulp 2 x x 1)
- )
- (sinx 5 100)
Add Comment
Please, Sign In to add comment