tan

Trigonometric functions on complex numbers.

  1. int ceqrel(Complex!T x, Complex!T y)
  2. Complex!T tan(Complex!T z)
    @safe pure nothrow @nogc
    tan
    (
    T
    )

Return Value

Type: Complex!T

The sine, cosine and tangent of z, respectively.

Examples

static import std.math;
assert(ceqrel(tan(complex(1.0, 0.0)), complex(std.math.tan(1.0), 0.0)) >= double.mant_dig - 2);
assert(ceqrel(tan(complex(0.0, 1.0)), complex(0.0, std.math.tanh(1.0))) >= double.mant_dig - 2);

Meta

Suggestion Box / Bug Report