Y = tan(X)Y = tanh(X)
tan(X) is the circular tangent of each element of X.
tanh(X) is the hyperbolic tangent of each element of X.
tan(pi/2)= 1.6332e+16 is not infinite, but rather a value the size of the reciprocal of the floating-point accuracy eps, because pi is only a floating-point approximation to the exact value.

acos,asin,atan,cos,exp,expm,funm,sin
(c) Copyright 1994 by The MathWorks, Inc.