develooper Front page | perl.perl5.porters | Postings from September 2014

Re: [perl #122856] Inconsistent string vs number handling for chr(Inf)

Thread Previous | Thread Next
From:
Jarkko Hietaniemi
Date:
September 27, 2014 11:30
Subject:
Re: [perl #122856] Inconsistent string vs number handling for chr(Inf)
Message ID:
54269FB2.5000902@iki.fi
On Saturday-201409-27, 1:25, Father Chrysostomos via RT wrote:
> $ perl5.21.5 -le 'print pack "A3", 0+inf'
> Cannot pack Inf with 'A' at -e line 1.
>
> That one shouldn’t be sentenced.

I may have been a bit trigger happy in my sentencing.  There's a 
comparison with "fdFD" in pp_pack.c which results only in floating
point pack being allowed with inf/nan, and then respective testing
loop in infnan.t.

> I probably won’t get my patch written tonight, because it’s more involved than I realised.  But I’m working on it....


Thread Previous | Thread Next


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