-----Original Message----- From: Derek Lamb
Sent: Monday, March 09, 2015 4:07 AM
To: sisyph...@optusnet.com.au
Cc: pdl-gene...@lists.sourceforge.net ; pdl-devel@lists.sourceforge.net
Subject: Re: [Pdl-general] CHM/PDL-2.007_12.tar.gz released to CPAN

Somewhere in that commit message I think was something like "I have no idea what will happen on a 32-bit system. Good luck!"

It turns out that 64-bit Windows is also affected.
However, in all cases, behaviour with 2.007_12 is the same as with 2.007.
Therefore, you haven't broken anything that wasn't already broken, though you have introduced tests that reveal the brokenness for the first time. In light of this, TODOing those tests as Chris suggests, makes good sense if the problem can't readily be fixed.

There are essentially 2 scenarios regarding t/ops.t on Windows with PDL-2.007_12. The first scenario is that test 51 fails - which happens on all -Uuse64bitint 32 bit perls (where ivsize is always 4 and ivtype is always 'long'). The second scenario is that tests 49 and 51 fail - which happens on all -Duse64bitint 32-bit perls and all 64-bit perls. (For both of these perls ivsize is always 8 and ivtype is always 'long long'.) With current bleadperl (and the upcoming 5.22) it's possible to build perl on Windows with -Duselongdouble. (I haven't got around to testing what happens on such a perl with PDL-2.007_12.)

Attached is a perl script (derek.txt) which is essentially an excerpt (of the relevant parts) of t/ops.t.

For scenario 1 (ivsize == 4, ivtype eq 'long') it outputs:
######################
ok 48
ok 49

indx($INT_MAX*4)%2: 0
ok 50
not ok 51

double($INT_MAX*4)%2: 12884901884
######################

For scenario 2 (ivsize == 8, ivtype eq 'long long') it outputs:
######################
ok 48
not ok 49

indx($INT_MAX*4)%2: 8589934592
ok 50
not ok 51

double($INT_MAX*4)%2: 12884901884
######################

Cheers,
Rob
use PDL::LiteF;

$INT_MAX=2147483647;

ok(48,long($INT_MAX)%1 == 0);
ok(49,indx($INT_MAX*4)%2 == 0);
warn "\nindx(\$INT_MAX*4)%2: ", indx($INT_MAX*4)%2, "\n";
ok(50,longlong($INT_MAX*4)%2 == 0);
#skip float intentionally here, since float($INT_MAX)!=$INT_MAX
ok(51,double($INT_MAX*4)%2 == 0);
warn "\ndouble(\$INT_MAX*4)%2: ", double($INT_MAX*4)%2, "\n";


sub ok {
        my $no = shift ;
        my $result = shift ;
        print "not " unless $result ;
        print "ok $no\n" ;
}
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
pdl-devel mailing list
pdl-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pdl-devel

Reply via email to