ciabatta/code/math/fmod.c

19 lines
224 B
C
Raw Normal View History

2022-06-08 04:34:37 +00:00
double fmod(double x, double y) {
int n = 0;
while(y < x*n) {
++n;
}
return y - n*x;
}
float fmodf(float x, float y) {
int n = 0;
while(y < x*n) {
++n;
}
return y - n*x;
}