Timestamp:
Apr 27, 2004, 8:39:34 PM (22 years ago)
Author:
bird
Message:

GCC v3.3.3 sources.

Location:
branches/GNU/src/gcc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/GNU/src/gcc

    • Property svn:ignore
      •  

        old new  
        2626configure.vr
        2727configure.vrs
         28
        2829Makefile
        29 dir.info
        3030lost+found
        3131update.out
  • branches/GNU/src/gcc/libf2c/libF77/d_mod.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    43#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);
     4double drem (double, double);
    135#else
    146#undef abs
    157#include <math.h>
    168#endif
    17 double d_mod(doublereal *x, doublereal *y)
    18 #endif
     9double
     10d_mod (doublereal * x, doublereal * y)
    1911{
    2012#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;
    3225#else
    33         double quotient;
    34         if( (quotient = *x / *y) >= 0)
    35                 quotient = floor(quotient);
    36         else
    37                 quotient = -floor(-quotient);
    38         return(*x - (*y) * quotient );
     26double quotient;
     27(quotient = *x / *y) >= 0)
     28(quotient);
     29else
     30(-quotient);
     31);
    3932#endif
    4033}
Note: See TracChangeset for help on using the changeset viewer.