tan

 

Contents

Description

Calculates the complex tangent of a complex value.


Calculates the trigonometric tangent of a double value.

Syntax

complex tan( complex z )

double tan( double x )

Parameters

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

x
[input] independent variable which is in radians

Return

tan(z)


tan(x)

Examples

EX1

void    run_complex_tan()
{
    complex        cc(0.5, 0.8);
    
    out_complex("tan = ", tan(cc));  //Result is "tan = 0.269895+0.761945i"
}


EX2

void    tan_ex1()
{
    double        x = 0.78;
    double        val = tan(x);
    
    printf("tan(%f) = %f\n", x, val);
}

Remark

See Also

atan

header to Include

origin.h

Reference