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
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