template<class T>
complex<T> fabs(complex<T>& x);
The fabs function computes the complex absolute
value of x.
From
IBM® XL
C/C++ for AIX®, V12.1, you
can use C99 library facilities in your C++ code. This new TR1 template
function
fabs produces the same results as the
existing C99 functions, as indicated in the following table.
| TR1 template function |
Corresponding C99 function |
template <> complex<float>
fabs(complex<float>& x);
|
float complex cabsf(float complex z);
|
template <> complex<double>
fabs(complex<double>& x);
|
double complex cabs(double complex z);
|
template <> complex<long double>
fabs(complex<long double>& x);
|
long double complex
cabsl(long double complex z);
|
Note: To enable the TR1 headers, you must define
the macro __IBMCPP_TR1__ as 1.