This shows you the differences between two versions of the page.
c:complex.h:cexp [2013/02/03 19:13] 127.0.0.1 external edit |
c:complex.h:cexp [2024/02/16 01:06] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== cexp ====== | ====== cexp ====== | ||
<code c> | <code c> | ||
+ | double complex cexp(double complex z); | ||
</code> | </code> | ||
==== description of cexp ==== | ==== description of cexp ==== | ||
- | cexp is in work by code-reference.com \\ | + | calculate the complex exponential |
- | 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 z=4.2424 + I*(-2.41231); | ||
+ | double result; | ||
+ | result = cexp(z); | ||
+ | printf("cexp(%f + (%f)*I) = %f + (%f)*I\n",creal(z), cimag(z),creal(result),cimag(result)); | ||
+ | return 0; | ||
+ | } | ||
</code> | </code> | ||
===== output of cexp c example ===== | ===== output of cexp c example ===== | ||
- | no example at the moment | + | cexp(4.242400 + (-2.412310)*I) = -51.878503 + (0.000000)*I |