summaryrefslogtreecommitdiffstats
path: root/lib/libm/arch/hppa/s_rint.c
blob: cbc56cc4881960856f1db9d0303b34f9c91edd5d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/*	$OpenBSD: s_rint.c,v 1.12 2016/09/12 19:47:01 guenther Exp $	*/
/*
 * Written by Michael Shalayeff. Public Domain
 */

#include <float.h>
#include <math.h>

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

	return (x);
}
DEF_STD(rint);
LDBL_CLONE(rint);