by ocfnash · 7y ago · 0 comments
def N(eps):
c = -0.75 + eps*1j
n = 0
z = 0
while abs(z) < 2:
z = z*z + c
n += 1
return n
[N(eps) for eps in [0.1, 0.01, 0.001, 0.0001, 0.00001, 0.000001]]There's a neat video explaining it here: https://www.youtube.com/watch?v=d0vY0CKYhPY
$ pypy3 man.py
[33, 315, 3143, 31417, 314160, 3141593, 31415927, 7853981629]I believe you are just running into the limits of double precision arithmetic; indeed log_2((10^8)^2) > 53.