I am working on a new version of the Mandelbrot Screensaver , and I am running out of floating point precision - just double values ββdo not have enough numbers for my needs.
More significant numbers = higher fractal scaling levels
Back when I wrote a version of this screensaver in Delphi 7, I used an extended floating point type, 80 bits in size.
In .NET, I could switch to decimal , but the performance hit for this is terrible, slowing down fractal generation by a factor of 20 or so.
Is there any equivalent advanced for .NET? Or, alternatively, are there numeric types with higher precision than double , which still use FPUs for evaluation and, therefore, do not have a high decimal hit?
Update
My intruder already manages to scale the fractal in many (many!) Orders; at present, it is reset to the base fractal only when the numerical type used cannot separate the ordinates from adjacent pixels. The extra 16 bits of precision from the enhanced dual expansion will let me get closer to another 16 size doublings.
As for performance, my algorithm already allows you to eliminate 95-99% of the required mathematics (compared to a naive implementation that calculates many pixels), while maintaining the integrity of the fractal.
Bevan
source share