aboutsummaryrefslogtreecommitdiffstats
path: root/libm/man/lround.3
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2013-01-30 19:06:37 -0800
committerElliott Hughes <enh@google.com>2013-02-01 14:51:19 -0800
commita0ee07829a9ba7e99ef68e8c12551301cc797f0f (patch)
treefefc432ee572779579a16d2868d4181a33399281 /libm/man/lround.3
parenta990cf5b3392c5aef767aee1e67b4d7ef651afc6 (diff)
downloadandroid_bionic-a0ee07829a9ba7e99ef68e8c12551301cc797f0f.tar.gz
android_bionic-a0ee07829a9ba7e99ef68e8c12551301cc797f0f.tar.bz2
android_bionic-a0ee07829a9ba7e99ef68e8c12551301cc797f0f.zip
Upgrade libm.
This brings us up to date with FreeBSD HEAD, fixes various bugs, unifies the set of functions we support on ARM, MIPS, and x86, fixes "long double", adds ISO C99 support, and adds basic unit tests. It turns out that our "long double" functions have always been broken for non-normal numbers. This patch fixes that by not using the upstream implementations and just forwarding to the regular "double" implementation instead (since "long double" on Android is just "double" anyway, which is what BSD doesn't support). All the tests pass on ARM, MIPS, and x86, plus glibc on x86-64. Bug: 3169850 Bug: 8012787 Bug: https://code.google.com/p/android/issues/detail?id=6697 Change-Id: If0c343030959c24bfc50d4d21c9530052c581837
Diffstat (limited to 'libm/man/lround.3')
-rw-r--r--libm/man/lround.3112
1 files changed, 0 insertions, 112 deletions
diff --git a/libm/man/lround.3 b/libm/man/lround.3
deleted file mode 100644
index d3e53c22f..000000000
--- a/libm/man/lround.3
+++ /dev/null
@@ -1,112 +0,0 @@
-.\" Copyright (c) 2005 David Schultz <das@FreeBSD.org>
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" $FreeBSD: src/lib/msun/man/lround.3,v 1.4 2005/06/15 19:04:04 ru Exp $
-.\"
-.Dd April 7, 2005
-.Dt LROUND 3
-.Os
-.Sh NAME
-.Nm llround ,
-.Nm llroundf ,
-.Nm llroundl ,
-.Nm lround ,
-.Nm lroundf ,
-.Nm lroundl
-.Nd "convert to nearest integral value"
-.Sh LIBRARY
-.Lb libm
-.Sh SYNOPSIS
-.In math.h
-.Ft "long long"
-.Fn llround "double x"
-.Ft "long long"
-.Fn llroundf "float x"
-.Ft "long long"
-.Fn llroundl "long double x"
-.Ft long
-.Fn lround "double x"
-.Ft long
-.Fn lroundf "float x"
-.Ft long
-.Fn lroundl "long double x"
-.Sh DESCRIPTION
-The
-.Fn lround
-function returns the integer nearest to its argument
-.Fa x ,
-rounding away from zero in halfway cases.
-If the rounded result is too large to be represented as a
-.Vt long
-value, an invalid exception is raised and the return value is undefined.
-Otherwise, if
-.Fa x
-is not an integer,
-.Fn lround
-may raise an inexact exception.
-When the rounded result is representable as a
-.Vt long ,
-the expression
-.Fn lround x
-is equivalent to
-.Po Vt long Pc Ns Fn round x
-(although the former may be more efficient).
-.Pp
-The
-.Fn llround ,
-.Fn llroundf ,
-.Fn llroundl ,
-.Fn lroundf
-and
-.Fn lroundl
-functions differ from
-.Fn lround
-only in their input and output types.
-.Sh SEE ALSO
-.Xr lrint 3 ,
-.Xr math 3 ,
-.Xr rint 3 ,
-.Xr round 3
-.Sh STANDARDS
-The
-.Fn llround ,
-.Fn llroundf ,
-.Fn llroundl ,
-.Fn lround ,
-.Fn lroundf ,
-and
-.Fn lroundl
-functions conform to
-.St -isoC-99 .
-.Sh HISTORY
-The
-.Vt float
-and
-.Vt double
-versions of these routines first appeared in
-.Fx 5.4 .
-The
-.Vt "long double"
-versions appeared in
-.Fx 6.0 .