diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2002-05-22 21:34:57 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2002-05-22 21:34:57 +0000 |
commit | 3f07829b93ace0640205e778f058729bcf9408b0 (patch) | |
tree | 06ccd5cad1e461f301cef520c9b08b06fee26986 /lib/libm/arch/hppa/s_rintf.c | |
parent | 9edcf43eec38251e9ff35a8f9831f9ba3ad7a042 (diff) |
add reminder and roundings
Diffstat (limited to 'lib/libm/arch/hppa/s_rintf.c')
-rw-r--r-- | lib/libm/arch/hppa/s_rintf.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/libm/arch/hppa/s_rintf.c b/lib/libm/arch/hppa/s_rintf.c new file mode 100644 index 00000000000..f3d0a60235c --- /dev/null +++ b/lib/libm/arch/hppa/s_rintf.c @@ -0,0 +1,17 @@ +/* + * Written by Michael Shalayeff. Public Domain + */ + +#if defined(LIBM_SCCS) && !defined(lint) +static char rcsid[] = "$OpenBSD: s_rintf.c,v 1.1 2002/05/22 21:34:56 mickey Exp $"; +#endif + +#include "math.h" + +float +__ieee754_rint(float x) +{ + __asm__ __volatile__("frnd,dbl %0,%0" : "+f" (x)); + + return (x); +} |