----- Original Message -----
From: "Sisyphus"
I ran the following script as a basic sanity check of the MinGW
implementation:
############################
use strict;
use warnings;
use PDL;
use PDL::Math;
my @x = lgamma(-0.1);
print "@x\n";
@x = lgamma(1.1);
print "@x\n";
@x = lgamma(-0.0);
print "@x\n";
@x = lgamma('inf' + 0);
print "@x\n";
@x = lgamma('nan' + 0);
print "@x\n";
############################
It output:
2.36896133272879 -1
-0.0498724412598397 1
1.#INF 1
1.#INF 1
-1.#IND 1
I think that's reasonable enough.
But one thing that dumbarse me couldn't work out how to do, is to verify
that the BAD value implementation is behaving sanely.
Eventually got it (I think). Just added the following code to the above
script:
my $p = sequence (1);
$p->badvalue (0);
$p->badflag (1);
@x = lgamma($p->index(0));
print "@x\n";
It returns (BAD, BAD) which, iinm, is what it should do.
Cheers,
Rob
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl