2 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
4 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
6 .\" References consulted:
7 .\" Linux libc source code
8 .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
10 .\" Modified Sat Jul 24 19:42:04 1993 by Rik Faith (faith@cs.unc.edu)
11 .\" Added fabsl, fabsf, aeb, 2001-06-07
13 .TH fabs 3 (date) "Linux man-pages (unreleased)"
15 fabs, fabsf, fabsl \- absolute value of floating-point number
18 .RI ( libm ", " \-lm )
23 .BI "double fabs(double " x );
24 .BI "float fabsf(float " x );
25 .BI "long double fabsl(long double " x );
29 Feature Test Macro Requirements for glibc (see
30 .BR feature_test_macros (7)):
36 _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
37 || /* Since glibc 2.19: */ _DEFAULT_SOURCE
38 || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
41 These functions return the absolute value of the floating-point
45 These functions return the absolute value of
50 is a NaN, a NaN is returned.
54 is \-0, +0 is returned.
58 is negative infinity or positive infinity, positive infinity is returned.
62 For an explanation of the terms used in this section, see
70 Interface Attribute Value
75 T} Thread safety MT-Safe
81 C99, POSIX.1-2001, POSIX.1-2008.