Front page | perl.perl5.porters |
Postings from April 2013
Re: Blead on s390x
Thread Previous
|
Thread Next
From:
H.Merijn Brand
Date:
April 7, 2013 08:28
Subject:
Re: Blead on s390x
Message ID:
20130407102755.1c24d07a@pc09.procura.nl
On Sun, 7 Apr 2013 08:16:56 +0100, Nicholas Clark <nick@ccl4.org> wrote:
> Did you mean to remove the list from the To: or Cc: ?
No, I replied and added Henri.
List back in.
> On Sun, Apr 07, 2013 at 09:00:37AM +0200, H.Merijn Brand wrote:
> > On Sat, 6 Apr 2013 22:05:16 +0200, Henri Kuiper
>
> > > In that, we've not had any bug reports about this before, and for a lot of
> > > these somewhat esoteric platforms I'm sort of wondering at what point do
> > > they stop being "fun", and start being "work". Right now, I think it's more
> > > at the "fun" level, and it might be telling us something interesting about
> > > portability, as it might be that all these tests failing are down to the
> > > same problem.
> >
> > At the moment, for me it is indeed withing the "fun" range, but with a
> > definite hint towards portability tests and sanity checks for
> > Configure. It already showed the use of good documentation of known
>
> Yes, at the moment it looks like there's a portability problem with
> something numeric. It's not clear if its a bug in our assumptions or their
> implementation.
Or Hercules.
> > > # This calculation ought to be within 0.001 of the right answer.
> > > my $bits_in_uv = int (0.001 + log (~0+1) / log 2);
> >
> > With the installed perl5.10
> >
> > $ test@zdolinux:~> perl -wle'print int (0.001 + log (~0+1) / log 2)'
> > 63
>
> Hmm, which would be consistent with the errors below, if ~0+1 is incorrectly
> becoming 9.2e+18
>
> > > > test@zdolinux:/perl/perl-git/t> ./perl harness op/numconvert.t
> > > > op/numconvert.t .. # '9.22337e+18' ne '1.84467e+19', 18446744073709551615 => P N N vs P N
> > > > # Failed test 15 - at op/numconvert.t line 247
> > > > # '1.84467e+19' ne '9.22337e+18', -1 => U P N vs U N
> > > > # '1.84467e+19' ne '9.22337e+18', 18446744073709551615 => U P N vs U N
> > >
> > > That's a factor of two out. Curious.
> > >
> > > What's the output from
> > >
> > > perl -le 'printf "%X %X\n", ~0, -1'
> >
> > test@zdolinux:~> perl -le 'printf "%X %X\n", ~0, -1'
> > FFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFF
>
> 16 Fs.
>
> What does this give?
>
> ./perl -Ilib -MDevel::Peek -we '$a = 18446744073709551615; printf "%g\n", $a; Dump $a'
test@zdolinux:/perl/perl-git> ./perl -Ilib -MDevel::Peek -we '$a = 18446744073709551615; printf "%g\n", $a; Dump $a'
9.22337e+18
SV = PVNV(0x8019a6a0) at 0x801b3488
REFCNT = 1
FLAGS = (IOK,pIOK,pNOK,IsUV)
UV = 18446744073709551615
NV = 9223372036854775808
PV = 0
> It ought to be something like:
>
> 1.84467e+19
> SV = PVNV(0x100801530) at 0x100810380
> REFCNT = 1
> FLAGS = (IOK,pIOK,pNOK,IsUV)
> UV = 18446744073709551615
> NV = 1.84467440737096e+19
> PV = 0
>
> And these the two variants?
>
> ./perl -Ilib -MDevel::Peek -we '$a = 18446744073709551615; ++$a; printf "%g\n", $a; Dump $a'
test@zdolinux:/perl/perl-git> ./perl -Ilib -MDevel::Peek -we '$a = 18446744073709551615; ++$a; printf "%g\n", $a; Dump $a'
1.84467e+19
SV = PVNV(0x8019a6a0) at 0x801b3498
REFCNT = 1
FLAGS = (NOK,pNOK)
IV = 0
NV = 18446744073709551616
PV = 0
> ./perl -Ilib -MDevel::Peek -we '$a = 18446744073709551615; $a = $a + 1; printf "%g\n", $a; Dump $a'
test@zdolinux:/perl/perl-git> ./perl -Ilib -MDevel::Peek -we '$a = 18446744073709551615; $a = $a + 1; printf "%g\n", $a; Dump $a'
9.22337e+18
SV = PVNV(0x8019a6c8) at 0x801b3498
REFCNT = 1
FLAGS = (NOK,pNOK)
IV = -1
NV = 9223372036854775808
PV = 0
> They both ought to be something like this:
>
> 1.84467e+19
> SV = PVNV(0x100801530) at 0x100810380
> REFCNT = 1
> FLAGS = (NOK,pNOK)
> IV = 0
> NV = 1.84467440737096e+19
> PV = 0
>
> (or IV = -1, but either way, IOK is not set)
>
> Nicholas Clark
--
H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/
using perl5.00307 .. 5.17 porting perl5 on HP-UX, AIX, and openSUSE
http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/
http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/
Thread Previous
|
Thread Next