D Documentation  
tan
real tan(real x)

Returns the tangent of x (radians).

If x is ±INFINITY, the function returns ±NAN.

Example:
//don't forget to import std.stdio and std.math :-)

writefln("tan(0)    is %f",tan(0));
writefln("tan(PI/2) is %f",tan(PI/2));
writefln("tan(PI/4) is %f",tan(PI/4));
writefln("tan(INF)  is %f",tan(float.infinity));
writefln("tan(-INF) is %f",tan(-float.infinity));

Output:
tan(0)    is 0.000000
tan(PI/2) is 16331778728383843.837
tan(PI/4) is 1.000000
tan(INF)  is nan
tan(-INF) is nan

See also:
std.math - Constants (PI)
Created using PHP docwiki written by Markus Dangl. Best viewed with Mozilla Firefox.