tan method
Calculates the complex tangent function (tan(z)).
Formula: tan(z) = sin(z) / cos(z). Raises ArgumentError if cos(z) is zero
Implementation
Complex tan() {
final s = sin();
final c = cos();
if (c == zero) {
throw ArgumentError('Tangent is undefined: division by zero.');
}
return s / c;
}