xref: /freebsd/lib/msun/man/fabs.3 (revision bdcbfde31e8e9b343f113a1956384bdf30d1ed62)
1.\" Copyright (c) 1991 The Regents of the University of California.
2.\" All rights reserved.
3.\" Redistribution and use in source and binary forms, with or without
4.\" modification, are permitted provided that the following conditions
5.\" are met:
6.\" 1. Redistributions of source code must retain the above copyright
7.\"    notice, this list of conditions and the following disclaimer.
8.\" 2. Redistributions in binary form must reproduce the above copyright
9.\"    notice, this list of conditions and the following disclaimer in the
10.\"    documentation and/or other materials provided with the distribution.
11.\" 3. Neither the name of the University nor the names of its contributors
12.\"    may be used to endorse or promote products derived from this software
13.\"    without specific prior written permission.
14.\"
15.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
16.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
19.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25.\" SUCH DAMAGE.
26.\"
27.Dd October 25, 2003
28.Dt FABS 3
29.Os
30.Sh NAME
31.Nm fabs ,
32.Nm fabsf ,
33.Nm fabsl
34.Nd floating-point absolute value functions
35.Sh LIBRARY
36.Lb libm
37.Sh SYNOPSIS
38.In math.h
39.Ft double
40.Fn fabs "double x"
41.Ft float
42.Fn fabsf "float x"
43.Ft long double
44.Fn fabsl "long double x"
45.Sh DESCRIPTION
46The
47.Fn fabs ,
48.Fn fabsf
49and
50.Fn fabsl
51functions compute the absolute value of a floating-point number
52.Fa x .
53.Sh RETURN VALUES
54The
55.Fn fabs ,
56.Fn fabsf
57and
58.Fn fabsl
59functions return the absolute value of
60.Fa x .
61.Sh SEE ALSO
62.Xr abs 3 ,
63.Xr ceil 3 ,
64.Xr floor 3 ,
65.Xr ieee 3 ,
66.Xr math 3 ,
67.Xr rint 3
68.Sh STANDARDS
69The
70.Fn fabs
71function conforms to
72.St -isoC .
73The
74.Fn fabsf
75and
76.Fn fabsl
77functions conform to
78.St -isoC-99 .
79