1
0

fmodf.c 229 B

12345678910
  1. #include <math.h>
  2. float fmodf(float x, float y)
  3. {
  4. unsigned short fpsr;
  5. // fprem does not introduce excess precision into x
  6. do __asm__ ("fprem; fnstsw %%ax" : "+t"(x), "=a"(fpsr) : "u"(y));
  7. while (fpsr & 0x400);
  8. return x;
  9. }