From f50882a24d6d5dc61f09bf8421f15e256e0ce00b Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 30 Dec 2022 00:55:48 -0800 Subject: [PATCH] maybe --- mandel.s | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/mandel.s b/mandel.s index 4b6ad10..c61d409 100644 --- a/mandel.s +++ b/mandel.s @@ -226,26 +226,31 @@ positive_result: .proc iter ; (cx and cy should be pre-scaled to 6.26 fixed point) - ; zx = 0 - ; zx_2 = 0 ; zy = 0 ; zx_2 = 0 + ; zy_2 = 0 + ; zx_zy = 0 loop: ; iters++ - ; zx_next = zx_2 + zy_2 + cx - ; zy_next = 2 * zx * zy + cy - ; (detect overflows to -4 or +4 and break if necessary) - ; (re-downshift into zx and zy as 3.13 fixed point; round.) + ; 6.26: + ; zx = zx_2 + zy_2 + cx + ; zy = zx_zy + zx_zy + cy + ; round to 6.10. + ; 12.20: ; zx_2 = zx * zx ; zy_2 = zy * zy ; dist = zx_2 + zy_2 - ; if dist >= 4 break, else continue iterating + ; round zx_2, zy_2, dist to 6.26 + + ; if may be in the lake, look for looping output with a small buffer + ; as an optimization vs running to max iters + .endproc .proc start