1 /* 2 * Written by Michael Shalayeff. Public Domain 3 */ 4 5 #include <math.h> 6 7 double 8 remainder(double x, double p) 9 { 10 __asm__ volatile("frem,dbl %0,%1,%0" : "+f" (x) : "f" (p)); 11 12 return (x); 13 } 14 DEF_STD(remainder); 15 LDBL_UNUSED_CLONE(remainder); 16