xref: /openbsd-src/lib/libm/arch/hppa/s_rint.c (revision 2f2c00629eff6a304ebffb255fc56f4fa7a1833b)
1 /*	$OpenBSD: s_rint.c,v 1.12 2016/09/12 19:47:01 guenther Exp $	*/
2 /*
3  * Written by Michael Shalayeff. Public Domain
4  */
5 
6 #include <float.h>
7 #include <math.h>
8 
9 double
rint(double x)10 rint(double x)
11 {
12 	__asm__ volatile("frnd,dbl %0,%0" : "+f" (x));
13 
14 	return (x);
15 }
16 DEF_STD(rint);
17 LDBL_CLONE(rint);
18