tanh method
Calculates the complex hyperbolic tangent function (tanh(z)).
Throws ArgumentError if cosh(z) is zero.
Implementation
Complex tanh() {
final s = sinh();
final c = cosh();
if (c == zero) {
throw ArgumentError('Hyperbolic tangent is undefined: division by zero.');
}
return s / c;
}