Changeset 1391 for branches/GNU/src/gcc/libf2c/libF77/d_mod.c
- Timestamp:
- Apr 27, 2004, 8:39:34 PM (22 years ago)
- Location:
- branches/GNU/src/gcc
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
libf2c/libF77/d_mod.c (modified) (1 diff, 1 prop)
Legend:
- Unmodified
- Added
- Removed
-
branches/GNU/src/gcc
- Property svn:ignore
-
old new 26 26 configure.vr 27 27 configure.vrs 28 28 29 Makefile 29 dir.info30 30 lost+found 31 31 update.out
-
- Property svn:ignore
-
branches/GNU/src/gcc/libf2c/libF77/d_mod.c
-
Property cvs2svn:cvs-rev
changed from
1.1to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 3 #ifdef IEEE_drem 5 double drem(); 6 #else 7 double floor(); 8 #endif 9 double d_mod(x,y) doublereal *x, *y; 10 #else 11 #ifdef IEEE_drem 12 double drem(double, double); 4 double drem (double, double); 13 5 #else 14 6 #undef abs 15 7 #include <math.h> 16 8 #endif 17 double d_mod(doublereal *x, doublereal *y)18 #endif 9 double 10 d_mod (doublereal * x, doublereal * y) 19 11 { 20 12 #ifdef IEEE_drem 21 double xa, ya, z; 22 if ((ya = *y) < 0.) 23 ya = -ya; 24 z = drem(xa = *x, ya); 25 if (xa > 0) { 26 if (z < 0) 27 z += ya; 28 } 29 else if (z > 0) 30 z -= ya; 31 return z; 13 double xa, ya, z; 14 if ((ya = *y) < 0.) 15 ya = -ya; 16 z = drem (xa = *x, ya); 17 if (xa > 0) 18 { 19 if (z < 0) 20 z += ya; 21 } 22 else if (z > 0) 23 z -= ya; 24 return z; 32 25 #else 33 double quotient;34 if((quotient = *x / *y) >= 0)35 quotient = floor(quotient);36 else37 quotient = -floor(-quotient);38 return(*x - (*y) * quotient);26 double quotient; 27 (quotient = *x / *y) >= 0) 28 (quotient); 29 else 30 (-quotient); 31 ); 39 32 #endif 40 33 } -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.
