summaryrefslogtreecommitdiff
path: root/lib/libm/arch/hppa/e_remainderf.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libm/arch/hppa/e_remainderf.c')
-rw-r--r--lib/libm/arch/hppa/e_remainderf.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/libm/arch/hppa/e_remainderf.c b/lib/libm/arch/hppa/e_remainderf.c
new file mode 100644
index 00000000000..366be878631
--- /dev/null
+++ b/lib/libm/arch/hppa/e_remainderf.c
@@ -0,0 +1,17 @@
+/*
+ * Written by Michael Shalayeff. Public Domain
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$OpenBSD: e_remainderf.c,v 1.1 2002/05/22 21:34:56 mickey Exp $";
+#endif
+
+#include "math.h"
+
+float
+__ieee754_remainder(float x, float p)
+{
+ __asm__ __volatile__("frem,sgl %0,%1,%0" : "+f" (x) : "f" (p));
+
+ return (x);
+}