summaryrefslogtreecommitdiffstats
path: root/lib/libm/man
diff options
context:
space:
mode:
authormartynas <martynas@openbsd.org>2011-05-25 22:19:25 +0000
committermartynas <martynas@openbsd.org>2011-05-25 22:19:25 +0000
commitaa6338367cade2cc77b8c95b28aaa04e773113ba (patch)
treeb7d28fbd6558d9aacc3aaebfbb34aac5f5bab190 /lib/libm/man
parentAlso enclose variable names with external linkage in __BEGIN_DECLS. (diff)
downloadwireguard-openbsd-aa6338367cade2cc77b8c95b28aaa04e773113ba.tar.xz
wireguard-openbsd-aa6338367cade2cc77b8c95b28aaa04e773113ba.zip
Document nearbyint, nearbyintf, nearbyintl.
Diffstat (limited to 'lib/libm/man')
-rw-r--r--lib/libm/man/rint.338
1 files changed, 26 insertions, 12 deletions
diff --git a/lib/libm/man/rint.3 b/lib/libm/man/rint.3
index dea7ed6b16c..caefb072cf7 100644
--- a/lib/libm/man/rint.3
+++ b/lib/libm/man/rint.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: rint.3,v 1.10 2009/08/03 21:26:07 martynas Exp $
+.\" $OpenBSD: rint.3,v 1.11 2011/05/25 22:19:25 martynas Exp $
.\" Copyright (c) 1985, 1991 Regents of the University of California.
.\" All rights reserved.
.\"
@@ -28,10 +28,13 @@
.\"
.\" from: @(#)rint.3 5.1 (Berkeley) 5/2/91
.\"
-.Dd $Mdocdate: August 3 2009 $
+.Dd $Mdocdate: May 25 2011 $
.Dt RINT 3
.Os
.Sh NAME
+.Nm nearbyint ,
+.Nm nearbyintf ,
+.Nm nearbyintl ,
.Nm rint ,
.Nm rintf ,
.Nm rintl
@@ -39,6 +42,12 @@
.Sh SYNOPSIS
.Fd #include <math.h>
.Ft double
+.Fn nearbyint "double x"
+.Ft float
+.Fn nearbyintf "float x"
+.Ft long double
+.Fn nearbyintl "long double x"
+.Ft double
.Fn rint "double x"
.Ft float
.Fn rintf "float x"
@@ -46,19 +55,24 @@
.Fn rintl "long double x"
.Sh DESCRIPTION
The
-.Fn rint
-function returns the integral value (represented as a double precision number)
-nearest to
+.Fn rint ,
+.Fn rintf ,
+and
+.Fn rintl
+functions return the integral value nearest to
.Fa x
according to the prevailing rounding mode.
+.Pp
The
-.Fn rintf
-function is a single precision version of
-.Fn rint .
-The
-.Fn rintl
-function is an extended precision version of
-.Fn rint .
+.Fn nearbyint ,
+.Fn nearbyintf ,
+and
+.Fn nearbyintl
+functions return the integral value nearest to
+.Fa x
+according to the prevailing rounding mode, and without raising the
+.Dq inexact
+floating-point exception.
.Sh SEE ALSO
.Xr abs 3 ,
.Xr ceil 3 ,