only use memcpy realloc to shrink if an exact-sized free chunk exists
[oweals/musl.git] / src / math / i386 / fmodl.c
1 #include <math.h>
2
3 long double fmodl(long double x, long double y)
4 {
5         unsigned short fpsr;
6         do __asm__ ("fprem; fnstsw %%ax" : "+t"(x), "=a"(fpsr) : "u"(y));
7         while (fpsr & 0x400);
8         return x;
9 }