Quick Search:

View

Revision:
Expand:  
Changeset: MAIN:ragge:20120922150726

Diff

Diff from 1.4 to:

Annotations

Annotate by Age | Author | Mixed | None
/fisheye/browse/pcc/pcc-tests/regress/c99/arith002.c

Annotated File View

faceless
1.2
1 /* IEEE-754 floating-point arithmetic */
2
3 #include <stdio.h>
4 #include <math.h>
5
plunky
1.3
6 int main(int argcchar *argv[])
faceless
1.1
7 {
ragge
1.4
8
9 #ifndef __vax__
faceless
1.2
10         double f1 = 1/0.0
11                         f2 = -1/0.0
12                         f3 = 0.0/0.0
13                         f4 = sqrt(-1.0),
14                         f5 = INFINITY/INFINITY ;
15
16         //printf("f1:%f\n",f1);
17         if ( f1 != INFINITY )
18                 return 1
19
20         //printf("f2:%f\n",f2);
21         if ( f2 != -INFINITY )
22                 return 2
23
24         //printf("f3:%f\n",f3);
25         if ( ! isnan(f3) )
26                 return 3
27         
28         //printf("f4:%f\n",f4);
29         if ( ! isnan(f4) )
30                 return 4
31         
32         //printf("f5:%f\n",f5);
33         if ( ! isnan(f5) )
34                 return 5
ragge
1.4
35 #endif
faceless
1.1
36
faceless
1.2
37         return 0;
faceless
1.1
38 }
FishEye: Open Source License registered to PCC.
Your maintenance has expired. You can renew your license at http://www.atlassian.com/fisheye/renew
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-09-17 07:35 +0200