1cabs(3) Library Functions Manual cabs(3)
2
3
4
6 cabs, cabsf, cabsl - absolute value of a complex number
7
9 Math library (libm, -lm)
10
12 #include <complex.h>
13
14 double cabs(double complex z);
15 float cabsf(float complex z);
16 long double cabsl(long double complex z);
17
19 These functions return the absolute value of the complex number z. The
20 result is a real number.
21
23 For an explanation of the terms used in this section, see at‐
24 tributes(7).
25
26 ┌────────────────────────────────────────────┬───────────────┬─────────┐
27 │Interface │ Attribute │ Value │
28 ├────────────────────────────────────────────┼───────────────┼─────────┤
29 │cabs(), cabsf(), cabsl() │ Thread safety │ MT-Safe │
30 └────────────────────────────────────────────┴───────────────┴─────────┘
31
33 C11, POSIX.1-2008.
34
36 glibc 2.1. C99, POSIX.1-2001.
37
39 The function is actually an alias for hypot(a, b) (or, equivalently,
40 sqrt(a*a + b*b)).
41
43 abs(3), cimag(3), hypot(3), complex(7)
44
45
46
47Linux man-pages 6.05 2023-07-20 cabs(3)