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