X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=functions%2Fmath%2Fmod.c;h=70f1ebc3fbcf5926e4bb94495767777bc2895ec9;hp=9e002cf4dfc98891ca9f734ff8a92c32eec30824;hb=0a5395faab237ba9008352b0f4bee9659bbd3d5f;hpb=34893ecc2200dc7017c36a54cb6c5f4c2378b5ec diff --git a/functions/math/mod.c b/functions/math/mod.c index 9e002cf..70f1ebc 100644 --- a/functions/math/mod.c +++ b/functions/math/mod.c @@ -18,6 +18,19 @@ long double modf( long double x, long double * integer ) { /* TODO */ }; // Standard C double fmod( double x, double y ) { /* TODO */ }; + +/* Therx code +{ + return (int) ( ( ( ( x / y ) - ( (int) ( x / y ) ) ) * y ) + 0.5 ); +} +*/ + +/* PDPC code - unreviewed +{ + return (x / y); +} +*/ + float fmodf( float x, float y ) { /* TODO */ }; long double fmodl( long double x, long double y ) { /* TODO */ };