Files
Sepp J Morris 31738079c4 Upload
Digital Research
2020-11-06 18:50:37 +01:00

41 lines
1.0 KiB
C
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
Copyright 1983
Alcyon Corporation
8716 Production Ave.
San Diego, Ca. 92121
*/
/*char *version "@(#)fmod.c 1.2 10/19/83";
/* fmod - returns the number f such that x = iy + f, and
0 <= f <= y. */
double
fmod(x,y)
double x;
double y;
{
double z;
double retval;
register long i;
double fabs();
double absx;
double absy;
absx = fabs(x);
absy = fabs(y);
for(z = absx; z - absy >= 0. ; z -= absy)
;
i = z;
if( x < 0.0 )
i *= -1;
retval = i;
return( retval );
}
etval );
}
etval );
}
etval );
}