sigaction.2: Minor clean-ups to Peter Collingbourne's patch
[man-pages.git] / man3 / cabs.3
blob9c1140cea035c231a4248f20860b5c60191ea3a3
1 .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
2 .\"
3 .\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
4 .\" Distributed under GPL
5 .\" %%%LICENSE_END
6 .\"
7 .TH CABS 3 2021-03-22 "" "Linux Programmer's Manual"
8 .SH NAME
9 cabs, cabsf, cabsl \- absolute value of a complex number
10 .SH SYNOPSIS
11 .nf
12 .B #include <complex.h>
13 .PP
14 .BI "double cabs(double complex " z );
15 .BI "float cabsf(float complex " z );
16 .BI "long double cabsl(long double complex " z );
17 .PP
18 Link with \fI\-lm\fP.
19 .fi
20 .SH DESCRIPTION
21 These functions return the absolute value of the complex number
22 .IR z .
23 The result is a real number.
24 .SH VERSIONS
25 These functions first appeared in glibc in version 2.1.
26 .SH ATTRIBUTES
27 For an explanation of the terms used in this section, see
28 .BR attributes (7).
29 .ad l
30 .nh
31 .TS
32 allbox;
33 lbx lb lb
34 l l l.
35 Interface       Attribute       Value
37 .BR cabs (),
38 .BR cabsf (),
39 .BR cabsl ()
40 T}      Thread safety   MT-Safe
41 .TE
42 .hy
43 .ad
44 .sp 1
45 .SH CONFORMING TO
46 C99, POSIX.1-2001, POSIX.1-2008.
47 .SH NOTES
48 The function is actually an alias for
49 .I "hypot(a,\ b)"
50 (or, equivalently,
51 .IR "sqrt(a*a\ +\ b*b)" ).
52 .SH SEE ALSO
53 .BR abs (3),
54 .BR cimag (3),
55 .BR hypot (3),
56 .BR complex (7)