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/spectral.c | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 test/c/spectral.c (limited to 'test/c/spectral.c') diff --git a/test/c/spectral.c b/test/c/spectral.c new file mode 100644 index 00000000..68579d9e --- /dev/null +++ b/test/c/spectral.c @@ -0,0 +1,81 @@ +/* -*- mode: c -*- + * + * The Great Computer Language Shootout + * http://shootout.alioth.debian.org/ + * + * Contributed by Sebastien Loisel + */ + +#include +#include +#include + +double eval_A(int i, int j) { return 1.0/((i+j)*(i+j+1)/2+i+1); } + +void eval_A_times_u(int N, const double u[], double Au[]) +{ + int i,j; + for(i=0;i