tan

xod/math/tan

Calculates tangent of an angle.
tan
@/tan
Calculates tangent of an angle.
RADnumber
Angle in radians.
tan
OUT
RAD
OUTnumber

C++ implementation

#pragma XOD dirtieness disable

node {
    void evaluate(Context ctx) {
        Number x = getValue<input_RAD>(ctx);
        emitValue<output_OUT>(ctx, tan(x));
    }
}

Tabular tests

RADOUT
00
3.14-1.2~
-3.141.2~
0.7851~
-0.785-1~
0.52350.577~
-0.5235-0.577~
NaNNaN
InfNaN
-InfNaN