diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libm/Makefile | 5 | ||||
-rw-r--r-- | lib/libm/man/rint.3 | 38 |
2 files changed, 30 insertions, 13 deletions
diff --git a/lib/libm/Makefile b/lib/libm/Makefile index 0fa0487405c..c985132344f 100644 --- a/lib/libm/Makefile +++ b/lib/libm/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.79 2011/05/25 21:28:43 martynas Exp $ +# $OpenBSD: Makefile,v 1.80 2011/05/25 22:19:25 martynas Exp $ # $NetBSD: Makefile,v 1.28 1995/11/20 22:06:19 jtc Exp $ # # @(#)Makefile 5.1beta 93/09/24 @@ -216,6 +216,7 @@ MLINKS+=logb.3 significand.3 MLINKS+=lrint.3 llrint.3 MLINKS+=lround.3 llround.3 MLINKS+=remainder.3 drem.3 remainder.3 remquo.3 +MLINKS+=rint.3 nearbyint.3 MLINKS+=scalbn.3 scalbln.3 MLINKS+=sqrt.3 cbrt.3 @@ -271,6 +272,7 @@ MLINKS+=lround.3 llroundf.3 MLINKS+=lround.3 lroundf.3 MLINKS+=math.3 mathf.3 MLINKS+=nan.3 nanf.3 +MLINKS+=nearbyint.3 nearbyintf.3 MLINKS+=nextafter.3 nextafterf.3 MLINKS+=remainder.3 dremf.3 MLINKS+=remainder.3 remainderf.3 @@ -302,6 +304,7 @@ MLINKS+=fmax.3 fminl.3 MLINKS+=ilogb.3 ilogbl.3 MLINKS+=logb.3 logbl.3 MLINKS+=nan.3 nanl.3 +MLINKS+=nearbyint.3 nearbyintl.3 MLINKS+=rint.3 rintl.3 MLINKS+=scalbln.3 scalblnl.3 MLINKS+=scalbn.3 scalbnl.3 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 , |