-----Original Message-----
From: kmx
Sent: Friday, October 02, 2015 6:33 PM
To: [email protected]
Subject: Re: [Pdl-general] CHM/PDL-2.013_01.tar.gz uploaded to CPAN
> I see two options:
>
> 1/ making PDL_D a general fallback and avoid croaking at all like this:
>
> int pdl_whichdatatype_double (NV nv) {
> TESTTYPE(PDL_F, PDL_Float)
> return PDL_D; /* we do not have anything better than PDL_D at
> the moment */
> }
Looks good to me (and tests fine) -- and gets us back to where we were with
2.013.
However, I think we need to somehow make it clear to those
running -Duselonglouble builds of perl that PDL is not really delivering
'long double' precision.
That's currently not readily apparent:
###########################
C:\>type try.pl
use strict;
use warnings;
use PDL;
my $x = pdl(sqrt(2.0));
print "$x\n";
C:\>perl try.pl
1.41421356237309515
###########################
That *looks* like a "long double" precision result, and you don't know
otherwise until you compare it to the correct result:
C:\>perl -le "print sqrt(2.0);"
1.41421356237309505
> 2/ implement PDL_LD support (perhaps not in 2.014)
We should also start thinking about PDL_FLT128 support as it's now (ie as of
perl-5.22.0) possible to build a perl whose nvtype is __float128 - so long
as libquadmath is available.
In fact, doing so on linux (and presumably many other nix-type systems) is
quite trivial. It's just a matter of passing -Dusequadmath to Configure. (On
Ubuntu my builds of perl are now always "-Dusequadmath".)
MinGW ports of gcc provide libquadmath, so it should be equally trivial to
build such perls on Windows once someone finds the tuits to insert that
capability into the perl source.
I must confess that I often wonder about the importance of "long double"
builds - if 53 bits of precision aren't enough for you, then it's likely
that 64 bits will also be insufficient.
But 113 bits .... well .... now you might be getting somewhere !!
Cheers,
Rob
------------------------------------------------------------------------------
_______________________________________________
pdl-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pdl-general