| luams-3.c |
luams-3.c is a UNIX program to measure the area of the Mandelbrot Set by pixel counting.
The source code is here.
How to compile:
MacOS:
gcc -DMACOSX -O3 -fomit-frame-pointer -ffast-math -o luams -lm luams-3.c
Linux on x86:
gcc -m486 -malign-double -DLINUX -O3 -fomit-frame-pointer -ffast-math -o luams -lm luams-3.c
or, if you wish, replace "-m486" with "-mcpu=pentium" (which will work on most, but not all, non-Intel processors)
If you run Windows, remove it (-: or install CygWin and use a compile line like that for Linux.
How to run:
./luams
It will create a directory within the current directory called "cache". Within this directory, it will save its work so that if you abort it (or if the machine gets rebooted) it will be able to continue from where it left off. The cache is in the form of a lot of little files, each corresponding to a single pixel-counting run. The files are given names that indicate the number of pixels and dwell limit used for the count in that file. The contents of the file are in binary (not text) so you can't make much use of it except to just delete a file if you want luams-3 to recompute that one.
The output looks like this:
For each gridsize it is giving the width of the grid, total number of pixels in the grid, and iteration limit. The dots "...................." are printed as it completes each individual grid. After it has computed all 20 grids of a given size it prints the statistics.
Area 1.502262045 +- 0.019566193 : The average area of the 20 runs, and the standard error of the mean, which is the standard deviation of the 20 area values divided by sqrt(19).
Center of gravity -0.2876303644 +- 0.0046187808 : Average of the center-of-gravity value, and standard error of the mean.
Its: 167508374 : Number of iterations it would have taken to do the 20 runs, if period detection had not been used.
Actual: 1230747 : Actual number of iterations performed.
215380 KFLOPs : Amount of floating point operations per second your computer was able to achieve while doing the pixel counting.
Robert Munafo's home pages on VistaPages
© 1996-2008 Robert P. Munafo.
email me
more info
This work is licensed under a Creative Commons Attribution 2.5 License. Details here
Back to my main page
s.13