This is an important floating point math routine, documented in many places. Example code utilizing this routine: - https://codebase64.org/doku.php?id=base:mandelbrot