aboutsummaryrefslogtreecommitdiffstats
path: root/test/c/perlin.c
diff options
context:
space:
mode:
authorCyril SIX <cyril.six@kalray.eu>2019-09-13 14:32:25 +0200
committerCyril SIX <cyril.six@kalray.eu>2019-09-13 14:32:25 +0200
commitf0f25eabe5b374f20a5db30f652f6e994fff3fb3 (patch)
treebbf790a23bc9a3f75195e7adc5505bfe80649a33 /test/c/perlin.c
parent70cc8540ed308d26b4c211a291fef66f942b8431 (diff)
downloadcompcert-kvx-f0f25eabe5b374f20a5db30f652f6e994fff3fb3.tar.gz
compcert-kvx-f0f25eabe5b374f20a5db30f652f6e994fff3fb3.zip
Scaling down most of c/ CompCert tests
Diffstat (limited to 'test/c/perlin.c')
-rw-r--r--test/c/perlin.c9
1 files changed, 6 insertions, 3 deletions
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);