From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- devdocs/c/numeric%2Fcomplex%2Fcimag.html | 41 ++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 devdocs/c/numeric%2Fcomplex%2Fcimag.html (limited to 'devdocs/c/numeric%2Fcomplex%2Fcimag.html') diff --git a/devdocs/c/numeric%2Fcomplex%2Fcimag.html b/devdocs/c/numeric%2Fcomplex%2Fcimag.html new file mode 100644 index 00000000..4218e76c --- /dev/null +++ b/devdocs/c/numeric%2Fcomplex%2Fcimag.html @@ -0,0 +1,41 @@ +

cimagf, cimag, cimagl

Defined in header <complex.h>
float       cimagf( float complex z );
+
(1) (since C99)
double      cimag( double complex z );
+
(2) (since C99)
long double cimagl( long double complex z );
+
(3) (since C99)
Defined in header <tgmath.h>
#define cimag( z )
+
(4) (since C99)
+1-3) Returns the imaginary part of z.
+4) Type-generic macro: if z has type long double complex, long double imaginary, or long double, cimagl is called. If z has type float complex, float imaginary, or float, cimagf is called. If z has type double complex, double imaginary, double, or any integer type, cimag is called.

Parameters

+ +
z - complex argument

Return value

The imaginary part of z.

+

This function is fully specified for all possible inputs and is not subject to any errors described in math_errhandling

+

Notes

For any complex variable z, z == creal(z) + I*cimag(z).

+

Example

#include <stdio.h>
+#include <complex.h>
+ 
+int main(void)
+{    
+    double complex z = 1.0 + 2.0*I;
+    printf("%f%+fi\n", creal(z), cimag(z));
+}

Output:

+
1.000000+2.000000i

References

See also

+ +
+
(C99)(C99)(C99)
computes the real part of a complex number
(function)
C++ documentation for imag
+

+ © cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
+ https://en.cppreference.com/w/c/numeric/complex/cimag +

+
-- cgit v1.2.3