|
|
1.1 ! root 1: /* THIS IS BASED ON THE TAHOE REPR. FOR FLOATING POINT */ ! 2: #include <FP.h> ! 3: ! 4: double d_mod(x,y) ! 5: double *x, *y; ! 6: { ! 7: double floor(), quotient; ! 8: if( (quotient = *x / *y) >= 0) ! 9: quotient = floor(quotient); ! 10: else { ! 11: *(unsigned long *)"ient ^= SIGN_BIT; ! 12: quotient = floor(quotient); ! 13: if (quotient !=0) ! 14: *(unsigned long *)"ient ^= SIGN_BIT; ! 15: } ! 16: return(*x - (*y) * quotient ); ! 17: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.