Quick Search:

View

Revision:
Expand:  
Changeset: MAIN:plunky:20111109103607

Diff

Diff from 1.3 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 {
faceless
1.2
8         double f1 = 1/0.0
9                         f2 = -1/0.0
10                         f3 = 0.0/0.0
11                         f4 = sqrt(-1.0),
12                         f5 = INFINITY/INFINITY ;
13
14         //printf("f1:%f\n",f1);
15         if ( f1 != INFINITY )
16                 return 1
17
18         //printf("f2:%f\n",f2);
19         if ( f2 != -INFINITY )
20                 return 2
21
22         //printf("f3:%f\n",f3);
23         if ( ! isnan(f3) )
24                 return 3
25         
26         //printf("f4:%f\n",f4);
27         if ( ! isnan(f4) )
28                 return 4
29         
30         //printf("f5:%f\n",f5);
31         if ( ! isnan(f5) )
32                 return 5
faceless
1.1
33
faceless
1.2
34         return 0;
faceless
1.1
35 }
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-10-01 18:20 +0200