Mercurial > projects > dstress
annotate run/d/double_27_C.d @ 1279:23fe17e22a63
partial review
author | thomask |
---|---|
date | Mon, 25 Dec 2006 15:07:48 +0000 |
parents | 9dcac8d4e97f |
children |
rev | line source |
---|---|
897 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 // based on: gcc.c-torture/execute/ieee/acc1.c | |
6 | |
7 module dstress.run.d.double_27_C; | |
8 | |
9 double func (double *array){ | |
10 double d = *array; | |
1091 | 11 |
897 | 12 if (d == 0.0){ |
13 return d; | |
14 }else{ | |
15 return d + func (array + 1); | |
16 } | |
17 } | |
18 | |
19 int main (){ | |
20 const double values[] = [0.1e-100, 1.0, -1.0, 0.0]; | |
21 | |
1279 | 22 if(func(values.ptr) != 0.1e-100){ |
897 | 23 assert(0); |
24 } | |
1091 | 25 |
897 | 26 return 0; |
27 } |