summaryrefslogtreecommitdiff
path: root/test/c
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2014-07-23 08:54:56 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2014-07-23 08:54:56 +0000
commit2a0168fea37b68ad14e2cb60bf215111e49d4870 (patch)
tree2f59373790d8ce3a5df66ef7a692271cf0666c6c /test/c
parent00805153cf9b88aa07cc6694b17d93f5ba2e7de8 (diff)
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
Diffstat (limited to 'test/c')
-rw-r--r--test/c/fftsp.c12
1 files changed, 6 insertions, 6 deletions
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;
}