diff options
Diffstat (limited to 'tests/mandel.bth')
-rw-r--r-- | tests/mandel.bth | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/tests/mandel.bth b/tests/mandel.bth index e75d694..43dc58b 100644 --- a/tests/mandel.bth +++ b/tests/mandel.bth @@ -1,20 +1,20 @@ -(set pxy 0) +(set! pxy 0) (while (< pxy 30) - (set cim (/ (- pxy 15) 15)) - (set pxx 0) + (set! cim (/ (- pxy 15) 15)) + (set! pxx 0) (while (< pxx 60) - (set cre (/ (- pxx 40) 20)) - (set i 0) - (set zim cim) - (set zre cre) + (set! cre (/ (- pxx 40) 20)) + (set! i 0) + (set! zim cim) + (set! zre cre) (while (< i 25) - (set nzre (+ cre (- (* zre zre) (* zim zim)))) - (set nzim (+ cim (* 2 (* zre zim)))) - (set zre nzre) - (set zim nzim) - (set mag (+ (* zre zre) (* zim zim))) - (set i (if (< mag 4) (+ i 1) 999))) + (set! nzre (+ cre (- (* zre zre) (* zim zim)))) + (set! nzim (+ cim (* 2 (* zre zim)))) + (set! zre nzre) + (set! zim nzim) + (set! mag (+ (* zre zre) (* zim zim))) + (set! i (if (< mag 4) (+ i 1) 999))) (write (if (< mag 4) "#" ".")) - (set pxx (+ pxx 1))) + (set! pxx (+ pxx 1))) (say "") - (set pxy (+ pxy 1))) + (set! pxy (+ pxy 1))) |