summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2024-06-21 16:37:41 +0100
committerubq323 <ubq323@ubq323.website>2024-06-21 16:48:23 +0100
commit151a7fd11fa4b30dec75fdcebdc30d95c76f7960 (patch)
treec983f46f377647f577a03bd3e96e1a89dee5d195 /tests
parentd6ce4e22ad9b98ab06812506f5bec2d4226ee7d2 (diff)
optimize mandelbrot
Diffstat (limited to 'tests')
-rw-r--r--tests/mandel.bth4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/mandel.bth b/tests/mandel.bth
index 5eb3fcd..ffe49c7 100644
--- a/tests/mandel.bth
+++ b/tests/mandel.bth
@@ -13,8 +13,8 @@
(set nzim (+ cim (* 2 (* zre zim))))
(set zre nzre)
(set zim nzim)
- (set i (+ i 1)))
- (set mag (+ (* zre zre) (* zim zim)))
+ (set mag (+ (* zre zre) (* zim zim)))
+ (set i (if (< mag 4) (+ i 1) 999)))
(print (if (< mag 4) "#" "."))
(set pxx (+ pxx 1)))
(puts "")