tan

Returns tangent of x. x is in radians.

Special Values
xtan(x)invalid?
NaNNaNyes
±0.0±0.0no
$(PLUSMNINF)NaNyes
  1. real tan(real x)
    @trusted pure nothrow @nogc
    real
    tan
    (
    real x
    )
  2. double tan(double x)
  3. float tan(float x)

Examples

assert(isIdentical(tan(0.0), 0.0));
assert(tan(PI).approxEqual(0));
assert(tan(PI / 3).approxEqual(sqrt(3.0)));

Meta

Suggestion Box / Bug Report