Something went wrong. Try again.
Cider Isn't Darwin Emulation, Really
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960.\" Copyright (c) 2006 Apple Computer.\".Dd December 11, 2006.Dt CREAL 3.Os BSD 4.Sh NAME.Nm creal.Nd complex real-part function.br.Nm cimag.Nd complex imaginary-part function.Sh SYNOPSIS.Fd #include <complex.h>.Ft double.Fn creal "double complex z".Ft long double.Fn creall "long double complex z".Ft float.Fn crealf "float complex z".Pp.Ft double.Fn cimag "double complex z".Ft long double.Fn cimagl "long double complex z".Ft float.Fn cimagf "float complex z".Sh DESCRIPTION.Fn creal "z"extracts the real part of the complex floating-point number.Fa z ..Fn cimag "z"extracts the imaginary part of the complex floating-point number.Fa z ..PpIf .Fa z= x+iy, then.Fn creal "z"= x and.Fn cimag "z"= y..Sh EXAMPLESThe function foo defined in the example below returns its complexargument with the imaginary part scaled by a factor of 2..Bd -literal -offset indent#include <complex.h>
double complex foo(double complex z) { return creal(z) + 2.0*cimag(z)*I;}.Ed.Sh SEE ALSO.Xr complex 3.Sh STANDARDSThe.Fn crealand.Fn cimagfunctions conform to ISO/IEC 9899:1999(E).