[sci.math] High precision Mandelbrot set

shaw@pegasus.com (Sandy Shaw) (01/08/91)

     When one does a "zoom" on parts of the Mandelbrot set one reaches a 
point when due to the limitations of precision of the machine(usually
64 bit IEEE floating point) one can gain no further detail from the image.
My question is : Is there there a way short of using an extended precision
math package to gain further detail upon continuing the zoom? Perhaps some 
sort of renormalization? Any thoughts on this question or references would
be greatly appreciated.

shaw@pegasus.com
 

rspangle@jarthur.Claremont.EDU (Froot Loop) (01/09/91)

In article <1991Jan8.142354.1732@pegasus.com> shaw@pegasus.com (Sandy Shaw) writes:
>My question is : Is there there a way short of using an extended precision
>math package to gain further detail upon continuing the zoom? Perhaps some 
>sort of renormalization? Any thoughts on this question or references would
>be greatly appreciated.

Well, I can think of two alternatives.

One would be using Mathematica, which supports arbitrary precision.  I hope
you have a fast computer, though.

Another would be to write your own floating point routines in assembly.
(So take a 20-byte structure, use 1 bit for sign, 15 bits for implied base-16
exponent, and use the other 144 bits for the mantissa.  All you have to
do are multiplies and adds, which aren't too difficult.

If you REALLY don't care about speed, you can do routines which use an
array of say 100 characters as a 100-digit mantissa, and an integer as the
exponent.  So your number would look like this as a C structure:

struct really_f___ing_big {
	char mantissa[100];
	int exponent;
	char sign;	/* +1 if positive, -1 if negative */

I wrote a package that did something like the latter in Turbo Pascal 2.0
about 7 years ago; it's slow, but not terribly hard to code.


-- 
 --------------------------------------------------------------------------
|   Randy Spangler                   |   Get your mind out of the gutter   |
|   rspangle@jarthur.claremont.edu   |   you're blocking my periscope      |
 --------------------------------------------------------------------------

burley@geech.ai.mit.edu (Craig Burley) (01/09/91)

In article <1991Jan8.142354.1732@pegasus.com> shaw@pegasus.com (Sandy Shaw) writes:

	When one does a "zoom" on parts of the Mandelbrot set one reaches a 
   point when due to the limitations of precision of the machine(usually
   64 bit IEEE floating point) one can gain no further detail from the image.
   My question is : Is there there a way short of using an extended precision
   math package to gain further detail upon continuing the zoom? Perhaps some 
   sort of renormalization? Any thoughts on this question or references would
   be greatly appreciated.

Why can't you simply scale up the values (and the math accordingly)?  I
remember thinking up this approach a few years ago when first playing
with the formulas, but now I can't really remember even the formulas,
so I can't think through whether this is a stupid idea or not.
--

James Craig Burley, Software Craftsperson    burley@ai.mit.edu

doug@eris.berkeley.edu (Doug Merritt) (01/10/91)

In article <BURLEY.91Jan9085810@geech.ai.mit.edu> burley@geech.ai.mit.edu (Craig Burley) writes:
>In article <1991Jan8.142354.1732@pegasus.com> shaw@pegasus.com (Sandy Shaw) writes:
>
>   My question is : Is there there a way short of using an extended precision
>   math package to gain further detail upon continuing the zoom?
>
>Why can't you simply scale up the values (and the math accordingly)?

Doesn't work; the values do not always vanish -- i.e. they are sometimes
in the form z = (a + b), where a >> b. Scaling would help only for
a = 0, 0 <= b << 1, and floating point arithmetic always does appropriate
scaling for this case anyway.

The above is actually overly simplistic; the recurrence formula can be
expanded after N steps into a polynomial of degree 2N, having N (as I recall)
non-zero terms, each of which might contribute significantly to the
final result (worst case assumption unless you know of some result on
the subject). Thus N numeric values in the range |z^2n| <= |a| <= |z|
must be summed for the final result, and this is what imposes the requirement
for a lot of precision in the mantissa.
	Doug
--
	Doug Merritt		doug@eris.berkeley.edu (ucbvax!eris!doug)
			or	uunet.uu.net!crossck!dougm

davidsen@sixhub.UUCP (Wm E. Davidsen Jr) (01/11/91)

In article <1991Jan8.142354.1732@pegasus.com> shaw@pegasus.com (Sandy Shaw) writes:
| 
| 	When one does a "zoom" on parts of the Mandelbrot set one reaches a 
|    point when due to the limitations of precision of the machine(usually
|    64 bit IEEE floating point) one can gain no further detail from the image.

  Well, you can go a little more if you have an FPU. I took one of my
early mandelbrot calculators, which output a dataset for viewing
elsewhere, and redid the innermost loop in assembler. Not only did
rewriting that part (about 11 instructions) make the overall program 40%
faster, but by doing all of the calculations in the stack of the 80287 I
was able to use the IEEE 80 bit "intermediate result" accuracy which
gave me another 16 bits!

  I have discovered that good books on programming the [23]87, or 68882
are non-existant. There are a few usable books around, but that's about
it. It's a cheap way to do it, and at the time UNICOS (Cray2) C didn't
have double, so I actually got better precision on an AT than a Cray2,
just a few orders of magnitude slower.
-- 
bill davidsen - davidsen@sixhub.uucp (uunet!crdgw1!sixhub!davidsen)
    sysop *IX BBS and Public Access UNIX
    moderator of comp.binaries.ibm.pc and 80386 mailing list
"Stupidity, like virtue, is its own reward" -me