You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The fix28 values Zre_sq + Zim_sq can overflow, resulting in artifacts.
You can mitigate the problem a little by
if ((unsigned)(Zre_sq + Zim_sq) > (unsigned)FOURfix28) break;
(or using fix27, but losing precision).
However some points remain for which the iterates will overflow.
Probably better to check for potential overflow before the escape check (affects only iterates outside the circle)
if (Zre < -TWOfix28 || Zre > TWOfix28) break;
if (Zim < -TWOfix28 || Zim > TWOfix28) break;
if ((unsigned)(Zre_sq + Zim_sq) > (unsigned)FOURfix28) break;
In principle the rectangle check is an escape check, so it would also work (the rectangle contains the circle), but the contour lines outside the Mandelbrot set would look different.
The text was updated successfully, but these errors were encountered:
VGA_Graphics/Mandelbrot_Set/mandelbrot_fixvfloat.c
Hunter-Adams-RP2040-Demos/VGA_Graphics/Mandelbrot_Set/mandelbrot_fixvfloat.c
Line 188 in f5f85ba
The fix28 values
Zre_sq + Zim_sq
can overflow, resulting in artifacts.You can mitigate the problem a little by
(or using fix27, but losing precision).
However some points remain for which the iterates will overflow.
Probably better to check for potential overflow before the escape check (affects only iterates outside the circle)
In principle the rectangle check is an escape check, so it would also work (the rectangle contains the circle), but the contour lines outside the Mandelbrot set would look different.
The text was updated successfully, but these errors were encountered: