It was thus said that the Great Eric Smith once stated:
On Thu, Aug 8, 2013 at 4:21 PM, Sean Conner <spc at
conman.org> wrote:
Oh crap! Well, for the values given, that *is*
the correct output, but
the one lines that reads:
printf("%d\n",mainloop(A,B,4.0,4.0));
should read:
printf("%d\n",mainloop(A,B,-0.8659,4.0));
So about half of the output lines are 32767.
Sounds about right.
$ time ./prog >output
real 0m0.201s
user 0m0.196s
sys 0m0.003s
$ grep -v 32767 output | wc -l
127187
The timings seem right for a modern system.
I tried changing MAX to 256, sticking a PGM header on
it ("P5 500 500
255"), converting it to a png, and viewing it, but it didn't seem very
interesting. Maybe my expectations were too high.
The result, when drawn, will look like the image at
http://boston.conman.org/2013/08/06.1
It's basically a map of chaotic attractors---more about it at
http://boston.conman.org/2013/08/04.1
Generally, when I originally ran this code (or code like it---I'm having
to recreate some of this) twenty-some years ago, it took a year to generate
the 500 images. I'm just curious if I missed some obvious optimizations
back then (and I think I did).
-spc