161f28255Scgd.\" Copyright (c) 1991 The Regents of the University of California. 261f28255Scgd.\" All rights reserved. 361f28255Scgd.\" 461f28255Scgd.\" Redistribution and use in source and binary forms, with or without 561f28255Scgd.\" modification, are permitted provided that the following conditions 661f28255Scgd.\" are met: 761f28255Scgd.\" 1. Redistributions of source code must retain the above copyright 861f28255Scgd.\" notice, this list of conditions and the following disclaimer. 961f28255Scgd.\" 2. Redistributions in binary form must reproduce the above copyright 1061f28255Scgd.\" notice, this list of conditions and the following disclaimer in the 1161f28255Scgd.\" documentation and/or other materials provided with the distribution. 12eb7c1594Sagc.\" 3. Neither the name of the University nor the names of its contributors 1361f28255Scgd.\" may be used to endorse or promote products derived from this software 1461f28255Scgd.\" without specific prior written permission. 1561f28255Scgd.\" 1661f28255Scgd.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1761f28255Scgd.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1861f28255Scgd.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1961f28255Scgd.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2061f28255Scgd.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2161f28255Scgd.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2261f28255Scgd.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2361f28255Scgd.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2461f28255Scgd.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2561f28255Scgd.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2661f28255Scgd.\" SUCH DAMAGE. 2761f28255Scgd.\" 28dfb9caabSmycroft.\" from: @(#)fabs.3 5.1 (Berkeley) 5/2/91 29*310b2e7cSwiz.\" $NetBSD: fabs.3,v 1.17 2016/03/17 09:44:56 wiz Exp $ 3061f28255Scgd.\" 31*310b2e7cSwiz.Dd March 17, 2016 3261f28255Scgd.Dt FABS 3 3361f28255Scgd.Os 3461f28255Scgd.Sh NAME 35f8173630Skleink.Nm fabs , 36cf57e34dSnros.Nm fabsf , 37cf57e34dSnros.Nm fabsl 38cf57e34dSnros.Nd floating-point absolute value functions 39312aca53Sperry.Sh LIBRARY 40312aca53Sperry.Lb libm 4161f28255Scgd.Sh SYNOPSIS 42472351e1Swiz.In math.h 4361f28255Scgd.Ft double 4461f28255Scgd.Fn fabs "double x" 45df8b005fSjtc.Ft float 46df8b005fSjtc.Fn fabsf "float x" 47cf57e34dSnros.Ft long double 48*310b2e7cSwiz.Fn fabsl "long double x" 4961f28255Scgd.Sh DESCRIPTION 5061f28255ScgdThe 51cf57e34dSnros.Fn fabs , 52df8b005fSjtc.Fn fabsf 53cf57e34dSnrosand 54cf57e34dSnros.Fn fabsl 55df8b005fSjtcfunctions compute the absolute value of a floating-point number 5661f28255Scgd.Fa x . 5761f28255Scgd.Sh RETURN VALUES 58cf57e34dSnrosFunctions of the 5961f28255Scgd.Fn fabs 60cf57e34dSnrosfamily return the absolute value of 6161f28255Scgd.Fa x . 6261f28255Scgd.Sh SEE ALSO 6361f28255Scgd.Xr abs 3 , 6461f28255Scgd.Xr ceil 3 , 6561f28255Scgd.Xr floor 3 , 66306d24c5Swiz.Xr math 3 , 67306d24c5Swiz.Xr rint 3 6861f28255Scgd.Sh STANDARDS 6961f28255ScgdThe 7061f28255Scgd.Fn fabs 7161f28255Scgdfunction conforms to 7261f28255Scgd.St -ansiC . 73cf57e34dSnrosThe 74cf57e34dSnros.Fn fabsf 75cf57e34dSnrosand 76cf57e34dSnros.Fn fabsl 77cf57e34dSnrosfunctions conform to 78cf57e34dSnros.St -isoC-99 . 79