This shows you the differences between two versions of the page.
c:complex.h:creal [2013/02/03 19:13] 127.0.0.1 external edit |
c:complex.h:creal [2024/02/16 01:06] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== creal ====== | ====== creal ====== | ||
<code c> | <code c> | ||
+ | double creal(double complex z); | ||
</code> | </code> | ||
==== description of creal ==== | ==== description of creal ==== | ||
- | creal is in work by code-reference.com \\ | + | calculate the complex real part |
- | if you are faster... don't hasitate and add it | + | |
<code c> | <code c> | ||
- | no example at the moment | + | #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; | ||
+ | } | ||
</code> | </code> | ||
===== output of creal c example ===== | ===== output of creal c example ===== | ||
- | no example at the moment | + | creal(4.240000) |