develooper Front page | perl.perl5.porters | Postings from December 2000

Re: casting (Re: pp_add -> pp_i_add efficiency hack?)

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
December 8, 2000 14:58
Subject:
Re: casting (Re: pp_add -> pp_i_add efficiency hack?)
Message ID:
20001208225850.B96430@plum.flirble.org
On Fri, Dec 08, 2000 at 10:54:52PM +0000, Nicholas Clark wrote:
> arm, glibc2.1:
> d       -9223372036854779904
> l        -9223372036854775808
> min     -9223372036854775808
> max      9223372036854775807
> 
> d < (double) min        1
> l < max                 1

wrong paste. fool.

d       -9223372036854779904
l        9223372036854771712
min     -9223372036854775808
max      9223372036854775807

d < (double) min        1
l < max                 1


Without the correct past you can't see the problem.
I've got a double smaller than the smallest negative integer, but it casts
to a positive integer.

Below is what perl expects:

> x86, FreeBSD's C library
> d       -9223372036854779904
> l        -9223372036854775808
> min     -9223372036854775808
> max      9223372036854775807
> 
> d < (double) min        1
> l < max                 1

Nicholas Clark

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