exp

 

Description

Calculate the exponent exp(z) of the complex value.


Calculate the exponential (the base of natural logarithm to the power x)

Syntax

complex exp( complex z )

double exp( double x )

Parameters

z
[input] the complex value whose exponent is sought.

x
[input] independent variable

Return

exp(z)


exp(x)

Examples

EX1

void    run_complex_exp()
{
    complex        cc(0.5, 0.3);
    
    out_complex("exp = ", exp(cc)); // Result is "exp = 1.575084+0.487230i"
}


EX2

void    exp_ex1()
{
    double    rExp = 2.;
    double    val = exp(rExp);
    
    printf("exp(%f) = %f\n", rExp, val);
}

Remark

See Also

header to Include

origin.h

Reference