Subject: | coth() can't handle values with a large absolute value |
The following should return the real value -1, but instead gives an error:
$ perl -MMath::Complex -wle '$x = Math::Complex->new(-1e+40); $z = coth($x); print $z'
Math::Complex::make: Cannot take real part of '-Inf'.
The following should return the real value 1, but instead gives an error:
$ perl -MMath::Complex -wle '$x = Math::Complex->new(1e+40); $z = coth($x); print $z'
Math::Complex::make: Cannot take imaginary part of 'NaN'.