develooper Front page | perl.perl5.porters | Postings from October 2013

[perl #120405] Wrong results for unpack "f"

Thread Previous
From:
slaven@rezic.de via RT
Date:
October 29, 2013 18:37
Subject:
[perl #120405] Wrong results for unpack "f"
Message ID:
rt-4.0.18-24530-1383071846-1875.120405-15-0@perl.org
Dana Uto 29. Lis 2013, 10:47:50, doughera reče:
> On Tue, Oct 29, 2013 at 09:45:27PM +1100, Tony Cook wrote:
> > On Tue, Oct 29, 2013 at 10:06:30AM +0100, Lukas Mai wrote:
> > > On 29.10.2013 10:00, slaven@rezic.de (via RT) wrote:
> > > > # New Ticket Created by  slaven@rezic.de
> > > > # Please include the string:  [perl #120405]
> > > > # in the subject line of all future correspondence about this
> > > > issue.
> > > > # <URL: https://rt.perl.org/Ticket/Display.html?id=120405 >
> > > >
> > > >
> > > > The problem is described in the StackOverflow article
> > > > http://stackoverflow.com/questions/18969702/perl-strange-
> > > > behaviour-on-unpack-of-floating-value
> > >
> > > Short version (copied into this bug for easier access):
> > > -----------------------------------------------------------------------
> > >
> > > $ perl -e "print unpack('f>', pack ('f>', 279.117156982422));"
> > > 279.617156982422
> 
> Is this the same as [perl #86534]?  That was fixed by
> 
> commit cd07c537987a76c934f141ca5bc0309e5a6b2609
> Author: David Mitchell <davem@iabyn.com>
> Date:   Mon Mar 21 14:14:52 2011 +0000
> 
> pack test failures with long doubles on x86/gcc
> 

I don't think so. The commit above is part of 5.14.0, but the problem appears with 5.14.2 and 5.18.1.


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=120405

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About