thfm [matrix] [matrix]
USAGE  y = thfm ( x, MODE )

trigonometric/hyperbolic functions of square matrix x

MODE	cos   sin   tan   sec   csc   cot
cosh  sinh  tanh  sech  csch  coth
acos  asin  atan  asec  acsc  acot
acosh asinh atanh asech acsch acoth
sqrt  log   exp

NOTE		--- IMPORTANT ---
This algorithm does  NOT USE an eigensystem
similarity transformation. It maps the MODE
functions to functions of expm, logm and sqrtm,
which are known to be robust with respect to
non-diagonalizable ('defective') x

EXA	thfm( x ,'cos' )  calculates  matrix cosinus
EVEN IF input matrix x IS NOT DIAGONALIZABLE

ASSOC	expm, sqrtm, logm, funm
Copyright	(C) 2001 Rolf Fabian 
010213
published under current GNU GENERAL PUBLIC LICENSE