xref: /openbsd/lib/libm/arch/hppa/s_rint.c (revision 76d0caae)
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
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