From 2a0168fea37b68ad14e2cb60bf215111e49d4870 Mon Sep 17 00:00:00 2001 From: xleroy Date: Wed, 23 Jul 2014 08:54:56 +0000 Subject: Merge of "newspilling" branch: - Support single-precision floats as first-class values - Introduce chunks Many32, Many64 and types Tany32, Tany64 to support saving and restoring registers without knowing the exact types (int/single/float) of their contents, just their sizes. - Memory model: generalize the opaque encoding of pointers to apply to any value, not just pointers, if chunks Many32/Many64 are selected. - More properties of FP arithmetic proved. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2537 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e --- test/c/fftsp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test/c') diff --git a/test/c/fftsp.c b/test/c/fftsp.c index 42ae905..3c7c23c 100644 --- a/test/c/fftsp.c +++ b/test/c/fftsp.c @@ -52,17 +52,17 @@ int dfft(float x[], float y[], int np) for (k = 1; k <= m-1; k++ ) { n2 = n2 / 2; n4 = n2 / 4; - e = tpi / (double)n2; + e = tpi / (float)n2; a = 0.0; for (j = 1; j<= n4 ; j++) { - a3 = 3.0 * a; + a3 = 3.0f * a; cc1 = cosf(a); ss1 = sinf(a); cc3 = cosf(a3); ss3 = sinf(a3); - a = e * (double)j; + a = e * (float)j; is = j; id = 2 * n2; @@ -162,7 +162,7 @@ int main(int argc, char ** argv) xi = calloc(np, sizeof(float)); pxr = xr; pxi = xi; - *pxr = (enp - 1.0) * 0.5; + *pxr = (enp - 1.0) * 0.5f; *pxi = 0.0; n2 = np / 2; *(pxr+n2) = -0.5; @@ -171,8 +171,8 @@ int main(int argc, char ** argv) j = np - i; *(pxr+i) = -0.5; *(pxr+j) = -0.5; - z = t * (double)i; - y = -0.5*(cosf(z)/sinf(z)); + z = t * (float)i; + y = -0.5f*(cosf(z)/sinf(z)); *(pxi+i) = y; *(pxi+j) = -y; } -- cgit v1.2.3