]>
Commit | Line | Data |
---|---|---|
fea681da | 1 | .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) |
2297bf0e | 2 | .\" |
95fb8859 | 3 | .\" SPDX-License-Identifier: GPL-1.0-or-later |
fea681da | 4 | .\" |
1ae6b2c7 | 5 | .TH CABS 3 2021-03-22 GNU "Linux Programmer's Manual" |
fea681da | 6 | .SH NAME |
c13182ef | 7 | cabs, cabsf, cabsl \- absolute value of a complex number |
2af19291 AC |
8 | .SH LIBRARY |
9 | Math library | |
8fc3b2cf | 10 | .RI ( libm ", " \-lm ) |
fea681da | 11 | .SH SYNOPSIS |
c7db92b9 | 12 | .nf |
fea681da | 13 | .B #include <complex.h> |
68e4db0a | 14 | .PP |
fea681da | 15 | .BI "double cabs(double complex " z ); |
fea681da | 16 | .BI "float cabsf(float complex " z ); |
fea681da | 17 | .BI "long double cabsl(long double complex " z ); |
c7db92b9 | 18 | .fi |
fea681da | 19 | .SH DESCRIPTION |
5600f73a | 20 | These functions return the absolute value of the complex number |
daac0b39 | 21 | .IR z . |
ca7b3c18 | 22 | The result is a real number. |
f0d7ce1d MK |
23 | .SH VERSIONS |
24 | These functions first appeared in glibc in version 2.1. | |
1c4f38c6 MS |
25 | .SH ATTRIBUTES |
26 | For an explanation of the terms used in this section, see | |
27 | .BR attributes (7). | |
c466875e MK |
28 | .ad l |
29 | .nh | |
1c4f38c6 MS |
30 | .TS |
31 | allbox; | |
c466875e | 32 | lbx lb lb |
1c4f38c6 MS |
33 | l l l. |
34 | Interface Attribute Value | |
35 | T{ | |
36 | .BR cabs (), | |
37 | .BR cabsf (), | |
38 | .BR cabsl () | |
39 | T} Thread safety MT-Safe | |
40 | .TE | |
c466875e MK |
41 | .hy |
42 | .ad | |
43 | .sp 1 | |
47297adb | 44 | .SH CONFORMING TO |
9a74e018 | 45 | C99, POSIX.1-2001, POSIX.1-2008. |
2b2581ee | 46 | .SH NOTES |
daac0b39 MK |
47 | The function is actually an alias for |
48 | .I "hypot(a,\ b)" | |
49 | (or, equivalently, | |
50 | .IR "sqrt(a*a\ +\ b*b)" ). | |
47297adb | 51 | .SH SEE ALSO |
fea681da MK |
52 | .BR abs (3), |
53 | .BR cimag (3), | |
54 | .BR hypot (3), | |
a8bda636 | 55 | .BR complex (7) |