summaryrefslogtreecommitdiffstats
path: root/lib/libm/arch/hppa/s_rint.c
blob: bca46032b56c3d7cb8aa47b7b37d49d8d4a37dbd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*
 * Written by Michael Shalayeff. Public Domain
 */

/* LINTLIBRARY */

#include <sys/cdefs.h>
#include <float.h>
#include <math.h>

double
rint(double x)
{
	__asm__ __volatile__("frnd,dbl %0,%0" : "+f" (x));

	return (x);
}

#ifdef	lint
/* PROTOLIB1 */
long double rintl(long double);
#else	/* lint */
__weak_alias(rintl, rint);
#endif	/* lint */