]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/cabs.3
alloca.3: Prevent any misunderstanding about when allocated memory is released
[thirdparty/man-pages.git] / man3 / cabs.3
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 2015-04-19 "" "Linux Programmer's Manual"
8 .SH NAME
9 cabs, cabsf, cabsl \- absolute value of a complex number
10 .SH SYNOPSIS
11 .B #include <complex.h>
12 .PP
13 .BI "double cabs(double complex " z );
14 .br
15 .BI "float cabsf(float complex " z );
16 .br
17 .BI "long double cabsl(long double complex " z );
18 .PP
19 Link with \fI\-lm\fP.
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 .TS
30 allbox;
31 lbw24 lb lb
32 l l l.
33 Interface Attribute Value
34 T{
35 .BR cabs (),
36 .BR cabsf (),
37 .BR cabsl ()
38 T} Thread safety MT-Safe
39 .TE
40 .SH CONFORMING TO
41 C99, POSIX.1-2001, POSIX.1-2008.
42 .SH NOTES
43 The function is actually an alias for
44 .I "hypot(a,\ b)"
45 (or, equivalently,
46 .IR "sqrt(a*a\ +\ b*b)" ).
47 .SH SEE ALSO
48 .BR abs (3),
49 .BR cimag (3),
50 .BR hypot (3),
51 .BR complex (7)