precision - Fast, arbitrary floating points in Python -
so i'm trying compute mandelbrot set @ large magnifications, , have run bit of brick wall.
using pythons own float paired jit gave me plenty of speed.
but after having switched on use decimal instead, function started returning 0 fields. turning off numba's jit solved problem, performance of software has plummetted unusable(~30 seconds 100 iterations on 64x64 field floating point precision of 6).
my code:
def mandelbrot_point(creal, cimag, maxiter): real=creal imag=cimag n in range(maxiter): real2=real*real imag2=imag*imag if real2+imag2>4.0: return n imag=2*real*imag+cimag real=real2-imag2+creal return 0
Comments
Post a Comment