Table of Contents

creal

double creal(double complex z);

description of creal

calculate the complex real part

#include <stdio.h>
#include <complex.h>
 
int main( void )
{
 
   double complex zdouble=(double complex)4.24 + I*1.34;
   printf("creal(%f)\n", creal(zdouble));
   return 0;
}

output of creal c example

  creal(4.240000)