CMPLXF, CMPLX, CMPLXL - cppreference.com

##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# CMPLXF, CMPLX, CMPLXL

From cppreference.com
< c‎ | numeric‎ | complex

Defined in header `<complex.h>` |  |
float complex CMPLXF( float real, float imag ); |  | (since C11)
double complex CMPLX( double real, double imag ); |  | (since C11)
long double complex CMPLXL( long double real, long double imag ); |  | (since C11)

Returns a complex number composed of `real` as the real part and `imag` as the imaginary part. The functions are implemented as macros.

The returned value is suitable for use as an initializer for variables with static or thread storage duration, but only if `real` and `imag` are also suitable.

### [edit] Parameters

real | - | the real part of the complex number to return
imag | - | the imaginary part of the complex number to return

### [edit] Return value

A complex number composed of `real` and `imag` as the real and imaginary parts.

### [edit] Example

| This section is incomplete Reason: no example

### [edit] See also

I (C99) | the complex or imaginary unit constant i (macro constant) [edit]
C++ documentation for complex

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=c/numeric/complex/CMPLX&oldid=71291"
Category:

- Todo no example