private Cosh_Basic ( double real, double imaginary ) : void | ||
real | double | |
imaginary | double | |
return | void |
public static void Cosh_Basic(double real, double imaginary)
{
// The product formula: cosh (x+iy) = cosh(x)*cos(y) + isinh(x)*sin(y)
// The verification formula: Cosh (z) = (Exp(z) + Exp(-z))/2
// The verification formula is used not for the boundary values
var complex = new Complex(real, imaginary);
Complex expected = 0.5 * (Complex.Exp(complex) + Complex.Exp(-complex));
Cosh_Advanced(real, imaginary, expected.Real, expected.Imaginary);
}