Skip Menu |

This queue is for tickets about the SQL-Statement CPAN distribution.

Report information
The Basics
Id: 81926
Status: resolved
Priority: 0/
Queue: SQL-Statement

People
Owner: Nobody in particular
Requestors: sferencik [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.402_001
Fixed in: (no value)



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
From: Sam
Perhaps this is another issue related to obsolete core modules. (I'm on 5.8.8, i.e. Math-Complex 1.35.) When I compare the beginning of the latest Math::Complex, as seen here: http://cpansearch.perl.org/src/ZEFRAM/Math-Complex- 1.59/lib/Math/Complex.pm (see the BEGIN block about DBL_MAX) to my Math::Complex (1.35), they are very different. If this is the case, it would be good to specify which version of Math::Trig is needed in 06virtual.t.
From: Sam
... and also specify the version required in SQL/Statement/Functions.pm, for that matter. (Sorry for delivering this in chunks.)
Please try again with Math::Complex >= 1.56 (svn Makefile.PL now contains it as build require).
From: Sam Ferencik
I confirm this works with Math::Complex 1.59. Thanks. Sam
Delivered with 1.402