summaryrefslogtreecommitdiff
path: root/lib/libm/arch/hppa/e_remainder.c
blob: 15db821d42c2058e9920d6becf3528c91cedb13f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/*
 * Written by Michael Shalayeff. Public Domain
 */

#if defined(LIBM_SCCS) && !defined(lint)
static char rcsid[] = "$OpenBSD: e_remainder.c,v 1.1 2002/05/22 21:34:56 mickey Exp $";
#endif

#include "math.h"

double
__ieee754_remainder(double x, double p)
{
	__asm__ __volatile__("frem,dbl %0,%1,%0" : "+f" (x) : "f" (p));

	return (x);
}