the reference needs to be computed in arbitrary precision, but storing it in low precision for perturbation computations is fine. KF uses 3x low precision values, caching the constant*|z|^2 for glitch detection as well as the real and imaginary parts. so 24-48 bytes per iteration (still need to fully investigate whether the extra range of long double or floatexp is needed for low precision reference orbits, or if double precision should always be ok)

Extra range is needed on a few specific iterations,

*if* zooming past e300 and doing flybys past minibrots below e300.

Nanoscope stores a similar array to KF, 3x double with re, im, and a mag value used for glitch detection. It also stores a pointer that is either null or points to a wide-exponent copy of those three values. If the double precision values underflow (denorm or zero) these get set for that iteration during reference orbit computation. Otherwise the pointer is null. During iteration, if the pointer is not null the next iteration is done using 52-bit mantissa wide-exponent calculations (significantly slower, but for only one iteration).

The circumstances that trigger this are instances like this. Say there's a period-73174 mini at about e380. If the zoom goes very close to that mini, then for images near and deeper than that mini, every 73174th reference orbit iteration is within 1e-380 of zero or so, so it underflows in a double. So wide exponent calculations must be done on those iterations, and those reference orbit entries must be stored with a wide exponent.

For every other iteration below e300, Nanoscope does the calculations with rescaled values that don't need a wide exponent. The rescaling is changed every 500 or so iterations -- this works because until a point is on the verge of escape, its orbit dynamics are dominated by the effects of repelling points in the Julia set nearby, and that typically means its magnitude doubles each iteration. The exponent width of doubles is 11 bits, so from about -1000 to about 1000, representing powers of 2 (not 10), so easily accommodates 500 doublings with plenty of margin for error. Re-rescaling is also done after every iteration that needed a wide-exponent reference point, because the orbit has jumped much closer to 0 again on such iterations.

On "final approach" an escape-bound critical orbit moves faster, with the magnitude squaring each iteration, but by the time this happens the unscaled magnitude is above the e-300 threshold and Nanoscope has switched to bog-standard perturbation calculations without any rescaling or other sneaky tricks. And escape is usually within the next 500 iterations anyway.