public static Complex Cos(Complex a)
{
Complex result = Zero;
if (a.Im == 0.0)
{
result.Re = System.Math.Cos(a.Re);
result.Im = 0.0;
}
else
{
result.Re = System.Math.Cos(a.Re)*System.Math.Cosh(a.Im);
result.Im = -System.Math.Sin(a.Re)*System.Math.Sinh(a.Im);
}
return result;
}