1 .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
3 .\" SPDX-License-Identifier: GPL-1.0-or-later
5 .TH CABS 3 2021-03-22 GNU "Linux Programmer's Manual"
7 cabs, cabsf, cabsl \- absolute value of a complex number
10 .RI ( libm ", " \-lm )
13 .B #include <complex.h>
15 .BI "double cabs(double complex " z );
16 .BI "float cabsf(float complex " z );
17 .BI "long double cabsl(long double complex " z );
20 These functions return the absolute value of the complex number
22 The result is a real number.
24 These functions first appeared in glibc in version 2.1.
26 For an explanation of the terms used in this section, see
34 Interface Attribute Value
39 T} Thread safety MT-Safe
45 C99, POSIX.1-2001, POSIX.1-2008.
47 The function is actually an alias for
50 .IR "sqrt(a*a\ +\ b*b)" ).