Debian Codegraph @

upstream/debian-unstable/man3/cabs.3

raw
1 '\" t
2 .\" Copyright 2002, Walter Harms <[email protected]>
3 .\" Copyright, the authors of the Linux man-pages project
4 .\"
5 .\" SPDX-License-Identifier: GPL-1.0-or-later
6 .\"
7 .TH cabs 3 2026-02-08 "Linux man-pages 6.18"
8 .SH NAME
9 cabs, cabsf, cabsl \- absolute value of a complex number
10 .SH LIBRARY
11 Math library
12 .RI ( libm ,\~ \-lm )
13 .SH SYNOPSIS
14 .nf
15 .B #include <complex.h>
16 .P
17 .BI "double cabs(double complex " z );
18 .BI "float cabsf(float complex " z );
19 .BI "long double cabsl(long double complex " z );
20 .fi
21 .SH DESCRIPTION
22 These functions return the absolute value of the complex number
23 .IR z .
24 The result is a real number.
25 .SH ATTRIBUTES
26 For an explanation of the terms used in this section, see
27 .BR attributes (7).
28 .TS
29 allbox;
30 lbx lb lb
31 l l l.
32 Interface Attribute Value
33 T{
34 .na
35 .nh
36 .BR cabs (),
37 .BR cabsf (),
38 .BR cabsl ()
39 T} Thread safety MT-Safe
40 .TE
41 .SH STANDARDS
42 C11, POSIX.1-2008.
43 .SH HISTORY
44 glibc 2.1.
45 C99, POSIX.1-2001.
46 .SH NOTES
47 The function is actually an alias for
48 .I "hypot(a,\ b)"
49 (or, equivalently,
50 .IR "sqrt(a*a\ +\ b*b)" ).
51 .SH SEE ALSO
52 .BR abs (3),
53 .BR cimag (3),
54 .BR hypot (3),
55 .BR complex (7)