1CABS(3)                    Linux Programmer's Manual                   CABS(3)
2
3
4

NAME

6       cabs, cabsf, cabsl - absolute value of a complex number
7

SYNOPSIS

9       #include <complex.h>
10
11       double cabs(double complex z);
12       float cabsf(float complex z);
13       long double cabsl(long double complex z);
14
15       Link with -lm.
16

DESCRIPTION

18       These functions return the absolute value of the complex number z.  The
19       result is a real number.
20

VERSIONS

22       These functions first appeared in glibc in version 2.1.
23

ATTRIBUTES

25       For an  explanation  of  the  terms  used  in  this  section,  see  at‐
26       tributes(7).
27
28       ┌────────────────────────────────────────────┬───────────────┬─────────┐
29Interface                                   Attribute     Value   
30       ├────────────────────────────────────────────┼───────────────┼─────────┤
31cabs(), cabsf(), cabsl()                    │ Thread safety │ MT-Safe │
32       └────────────────────────────────────────────┴───────────────┴─────────┘
33

CONFORMING TO

35       C99, POSIX.1-2001, POSIX.1-2008.
36

NOTES

38       The  function  is  actually an alias for hypot(a, b) (or, equivalently,
39       sqrt(a*a + b*b)).
40

SEE ALSO

42       abs(3), cimag(3), hypot(3), complex(7)
43

COLOPHON

45       This page is part of release 5.12 of the Linux  man-pages  project.   A
46       description  of  the project, information about reporting bugs, and the
47       latest    version    of    this    page,    can     be     found     at
48       https://www.kernel.org/doc/man-pages/.
49
50
51
52                                  2021-03-22                           CABS(3)
Impressum