Subject: | tests with hyperbolic functions fail for -100000 |
06virtual.t is failing with the following:
ok 62 - execute INSERT INTO log VALUES (16, 'ernie', 'sshd',
'Server listening on 0.0.0.0 port 22.', 1355287564) on SQL::Statement
ok 63 - prepare INSERT INTO log VALUES (17, 'ernie', 'sshd',
'Received SIGHUP; restarting.', 1355283964) on SQL::Statement
ok 64 - execute INSERT INTO log VALUES (17, 'ernie', 'sshd',
'Received SIGHUP; restarting.', 1355283964) on SQL::Statement
sech(-100000): Division by zero.
(Because in the definition of sech(-100000), the divisor cosh(-100000)
is 0)
I stepped into this, and Math::Complex::cosh(-100000) really returns
"Inf" (as a string), which is then interpreted as == 0 in
Math::Complex::sech(), which then chooses to return "Division by zero"
rather than 0 (which is what one would expect from division by Inf).
This is arguably a problem in Math::Complex, but I'm raising it here
since it's crashing SQL-Statement's tests.
The same happens for the subsequent 3 tests (csch, tanh, coth) when run
with -100000 as param.
The tests pass when -100 is used.
Thanks,
Sam