Skip Menu |
 

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

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

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.407
Fixed in: 1.409

Attachments


Subject: t/06virtual.t fails with -Duselongdouble
Download (untitled) / with headers
text/plain 911b
I see the following failure on freebsd with a -Duselongdouble-enabled perl: # Failed test 'exp' # at t/06virtual.t line 1483. # Structures begin differing at: # $got->[0][0] = '2.71828182845904509' # $expected->[0][0] = '2.71828182845904524' # Failed test 'exp' # at t/06virtual.t line 1483. # Structures begin differing at: # $got->[0][0] = '2.71828182845904509' # $expected->[0][0] = '2.71828182845904524' # Failed test 'exp' # at t/06virtual.t line 1483. # Structures begin differing at: # $got->[0][0] = '2.71828182845904509' # $expected->[0][0] = '2.71828182845904524' # Looks like you failed 3 tests of 1969. t/06virtual.t ... Dubious, test returned 3 (wstat 768, 0x300) Failed 3/1969 subtests (9 TODO tests unexpectedly succeeded) This might be a freebsd-only problem; it seems that the same problem does not happen on linux systems.
Download (untitled) / with headers
text/plain 305b
I tested that with Darwin (has FBSD5 userland) and Linux (Debian 7). On Darwin even with the 5.21 compiled with icc. No problems at all ... So I assume there is a dedicated issue on your test system you should investigate. Once identified, I'm happy to fix the appropriate failures, if any. Cheers, Jens
Download (untitled) / with headers
text/plain 1.2k
On 2016-02-28 05:19:53, REHSACK wrote: Show quoted text
> I tested that with Darwin (has FBSD5 userland) and Linux (Debian 7). > On Darwin even with the 5.21 compiled with icc. No problems at all ... > > So I assume there is a dedicated issue on your test system you should > investigate. Once identified, I'm happy to fix the appropriate > failures, if any.
The issue seems to be that powl() is not implemented on freebsd yet and just fallbacks to the imprecise pow(). Some pointers: * https://rt.cpan.org/Ticket/Display.html?id=101265 * https://github.com/rurban/Cpanel-JSON-XS/commit/ad1efccb5dd10dc67ce198d1b8d9cc58290f5371 * https://wiki.freebsd.org/Numerics (powl status: not yet started) * https://github.com/freebsd/freebsd/blob/0f2211c30ded7871b441bfaa1647843f1b4fd0c2/lib/msun/src/imprecise.c The problem is that this equation does not hold here: $ perl5.20.1D -MMath::Trig -MTest::More=no_plan -e 'is((sinh(1)+cosh(1))**1, sinh(1)+cosh(1))' not ok 1 # Failed test at -e line 1. # got: '2.71828182845904509' # expected: '2.71828182845904524' 1..1 # Looks like you failed 1 test of 1. Easiest solution: add "**1" to the expression in the failing test. This should not change anything on other systems, and helps in this situation. See the attached patch. Regards, Slaven
Subject: 0001-workaround-for-RT-112530.patch
From 37225b34b14800f245cf83b0dd8014ccae9a89a9 Mon Sep 17 00:00:00 2001 From: Slaven Rezic <slaven@rezic.de> Date: Sun, 28 Feb 2016 12:12:28 +0100 Subject: [PATCH] workaround for RT #112530 The exp(1) in t/06virtual.t used to fail on system with imprecise pow (e.g. on freebsd systems with perl compiled with -Duselongdouble). Fix this issue by adding a "**1" to the expected value. --- t/06virtual.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/06virtual.t b/t/06virtual.t index 4b40cc5..ca2fff3 100644 --- a/t/06virtual.t +++ b/t/06virtual.t @@ -735,7 +735,7 @@ foreach my $test_dbd (@test_dbds) { test => 'exp', sql => "SELECT EXP(1)", - result => [ [sinh(1)+cosh(1)] ], + result => [ [(sinh(1)+cosh(1))**1] ], }, { test => 'log as log10', -- 2.6.0
Pushed fix to github to let travis work
Resolved with uploading 1.409


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.