From 151a7fd11fa4b30dec75fdcebdc30d95c76f7960 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Fri, 21 Jun 2024 16:37:41 +0100 Subject: optimize mandelbrot --- tests/mandel.bth | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/mandel.bth') 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 "") -- cgit v1.2.3