|
|
Power 6/32 Unix version 1.21
/* THIS IS BASED ON THE TAHOE REPR. FOR FLOATING POINT */
#include <FP.h>
double d_mod(x,y)
double *x, *y;
{
double floor(), quotient;
if( (quotient = *x / *y) >= 0)
quotient = floor(quotient);
else {
*(unsigned long *)"ient ^= SIGN_BIT;
quotient = floor(quotient);
if (quotient !=0)
*(unsigned long *)"ient ^= SIGN_BIT;
}
return(*x - (*y) * quotient );
}
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.