1 /* 2 * Written by Michael Shalayeff. Public Domain 3 */ 4 5 #if defined(LIBM_SCCS) && !defined(lint) 6 static char rcsid[] = "$OpenBSD: e_remainder.c,v 1.2 2008/09/07 20:36:08 martynas Exp $"; 7 #endif 8 9 #include "math.h" 10 11 double 12 remainder(double x, double p) 13 { 14 __asm__ __volatile__("frem,dbl %0,%1,%0" : "+f" (x) : "f" (p)); 15 16 return (x); 17 } 18