Hi,

I've taking a closer look at why op/pack.t is failing.  I
was looking at this at hppa, incase that matters.

Here is a list of the lines having a problem:
not ok 505
# For list (-128, -1, 0, 1, 127) (total -1) packed with c unpack '%53c' gave 0,
expected 9.00719925474099e+15

not ok 615
# For list (-32768, -1, 0, 1, 32767) (total -1) packed with s unpack '%53s' 
gave 0, expected 9.00719925474099e+15

not ok 945
# For list (-2147483648, -1, 0, 1, 2147483647) (total -1) packed with i unpack 
'%53i' gave 0, expected 9.00719925474099e+15

not ok 1275
# For list (-2147483648, -1, 0, 1, 2147483647) (total -1) packed with l unpack 
'%53l' gave 0, expected 9.00719925474099e+15

not ok 1605
# For list (-32768, -1, 0, 1, 32767) (total -1) packed with s! unpack '%53s!' 
gave 0, expected 9.00719925474099e+15

not ok 1935
# For list (-2147483648, -1, 0, 1, 2147483647) (total -1) packed with i! unpack
'%53i!' gave 0, expected 9.00719925474099e+15

not ok 2265
# For list (-2147483648, -1, 0, 1, 2147483647) (total -1) packed with l! unpack
'%53l!' gave 0, expected 9.00719925474099e+15

not ok 13048
# For list (-2147483648, -1, 0, 1, 2147483647) (total -1) packed with j unpack 
'%53j' gave 0, expected 9.00719925474099e+15


The problems all seem to happen only with len being 53.

Len of 53 seems to be the point where floating point
doesn't have enough accuracy anymore, and the detection of
wether it's using float or int breaks.

It seems that the following code:
        my $max_p1 = $max + 1;
        $max_p1_is_integer = 1 unless $max_p1 + 1 == $max_p1;
        $max_is_integer = 1 if $max - 1 < ~0;

only doesn't agree on both being integers with a length of
53.  It's saying that max_p1 is still integer while max
isn't.  For shorter lengths, they both say it's still
integer, for longer, they both say it's it's not.

This test to see wether we're using floats also seems to
fail:
        if ($calc_sum == $calc_sum - 1 && $calc_sum == $max_p1) {


So, this all seems like rounding problems in the test
suite, and don't look like problems with perl.


Kurt



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to