From f0f25eabe5b374f20a5db30f652f6e994fff3fb3 Mon Sep 17 00:00:00 2001 From: Cyril SIX Date: Fri, 13 Sep 2019 14:32:25 +0200 Subject: Scaling down most of c/ CompCert tests --- test/c/perlin.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'test/c/perlin.c') diff --git a/test/c/perlin.c b/test/c/perlin.c index e7bbd22d..b853aeed 100644 --- a/test/c/perlin.c +++ b/test/c/perlin.c @@ -63,13 +63,16 @@ static void init(void) { p[256+i] = p[i] = permutation[i]; } +#define INCREMENT 0.5 +#define MIN -5.0 +#define MAX 5.0 int main(int argc, char ** argv) { init(); double x, y, z, sum = 0.0; - for (x = -5.0; x < 5.0; x += 0.1) - for (y = -5.0; y < 5.0; y += 0.1) - for (z = -5.0; z < 5.0; z += 0.1) + for (x = MIN; x < MAX; x += INCREMENT) + for (y = MIN; y < MAX; y += INCREMENT) + for (z = MIN; z < MAX; z += INCREMENT) sum += noise(x, y, z); printf("%.4e\n", sum); -- cgit