Annotation of cci/usr/src/usr.lib/libF77/d_mod.c, revision 1.1

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 *)&quotient ^= SIGN_BIT;
        !            12:        quotient = floor(quotient);
        !            13:        if (quotient !=0)
        !            14:                *(unsigned long *)&quotient ^= SIGN_BIT;
        !            15:       }
        !            16: return(*x - (*y) * quotient );
        !            17: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.