CMPLX(), CMPLXF(), CMPLXL()

Create a complex number from its real and imaginary parts

Synopsis:

#include <complex.h>

#define CMPLX(r, i) ...
#define CMPLXF(r, i) ...
#define CMPLXL(r, i) ...

Arguments:

r
The real part of the complex number.
i
The imaginary part of the complex number.

Description:

The CMPLX(), CMPLXF(), and CMPLXL() macros create a the complex number from the given real and imaginary parts. The type of the resulting number depends on the macro:

Macro Type
CMPLX() double complex
CMPLXF() float complex
CMPLXL() long double complex

Returns:

The complex number.

Classification:

C11

Safety:  
Cancellation point No
Interrupt handler Yes
Signal handler Yes
Thread Yes