From 2ec5b3fb2ccb0120be641e077089f3da5e53d8a3 Mon Sep 17 00:00:00 2001 From: xleroy Date: Sun, 17 Sep 2006 12:04:56 +0000 Subject: Davantage de tests git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@104 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e --- test/c/mandelbrot.c | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 test/c/mandelbrot.c (limited to 'test/c/mandelbrot.c') diff --git a/test/c/mandelbrot.c b/test/c/mandelbrot.c new file mode 100644 index 00000000..93aa8acb --- /dev/null +++ b/test/c/mandelbrot.c @@ -0,0 +1,92 @@ +/* The Computer Language Shootout + http://shootout.alioth.debian.org/ + + contributed by Greg Buchholz + + for the debian (AMD) machine... + compile flags: -O3 -ffast-math -march=athlon-xp -funroll-loops + + for the gp4 (Intel) machine... + compile flags: -O3 -ffast-math -march=pentium4 -funroll-loops +*/ + +#include +#include + +int main (int argc, char **argv) +{ + int w, h, bit_num = 0; + char byte_acc = 0; + int i, iter = 50; + double x, y, limit = 2.0; + double Zr, Zi, Cr, Ci, Tr, Ti; + + if (argc < 2) { + w = h = 3000; + } else { + w = h = atoi(argv[1]); + } + + printf("P4\n%d %d\n",w,h); + + for(y=0;y