title | description | ms.date | api_name | api_location | api_type | topic_type | f1_keywords | helpviewer_keywords | ms.assetid | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
creal, crealf, creall | API reference for creal, crealf, creall; which retrieve the real part of a complex number. | 9/2/2020 |
|
|
|
|
|
| fa3ac62f-7aa3-4238-a71f-d6b00cd0c7c8 |
Retrieves the real part of a complex number.
doublecreal( _Dcomplexz ); floatcrealf( _Fcomplexz ); long doublecreall( _Lcomplexz ); #definecreal(X) // Requires C11 or higherfloatcreal( _Fcomplexz ); // C++ onlylong doublecreal( _Lcomplexz ); // C++ only
z
A complex number.
The real part of z
.
Because C++ allows overloading, you can call overloads of creal
that take _Fcomplex
or _Lcomplex
values, and return float
or long double
values. In a C program, unless you're using the <tgmath.h> macro to call this function, creal
always takes a _Dcomplex
value and returns a double
value.
If you use the <tgmath.h> creal()
macro, the type of the argument determines which version of the function is selected. See Type-generic math for details.
Routine | C header | C++ header |
---|---|---|
creal , crealf , creall | <complex.h> | <ccomplex> |
creal macro | <tgmath.h> |
The _Fcomplex
, _Dcomplex
, and _Lcomplex
types are Microsoft-specific equivalents of the unimplemented native C99 types float _Complex, double _Complex, and long double _Complex, respectively. For more compatibility information, see Compatibility.
Alphabetical function reference_Cbuild
, _FCbuild
, _LCbuild
norm
, normf
, norml
cproj
, cprojf
, cprojl
conj
, conjf
, conjl
cimag
, cimagf
, cimagl
carg
, cargf
, cargl
cabs
, cabsf
, cabsl