[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

perl: 64-bit integers and long doubles



(sent to -devel and -perl; followups to -devel only, please)

Hi,

unlike earlier versions, perl 5.12.0-1 in experimental is configured with
the "use64bitint" and "uselongdouble" options on all architectures. I'm
looking for input on whether this is the right choice for sid.

For reference, quoting the upstream INSTALL file:

 The "use64bitint" option does only as much as is required to get 64-bit
 integers into Perl (this may mean, for example, using "long longs")
 while your memory may still be limited to 2 gigabytes (because your
 pointers could still be 32-bit).  Note that the name "64bitint" does
 not imply that your C compiler will be using 64-bit "int"s (it might,
 but it doesn't have to).  The "use64bitint" simply means that you will
 be able to have 64 bit-wide scalar values.
 
 In some systems you may be able to use long doubles to enhance the
 range and precision of your double precision floating point numbers
 (that is, Perl's numbers). Use Configure -Duselongdouble to enable
 this support (if it is available)

The benefits are obviously improved numeric range and precision. The
downside is presumably increased memory usage. I have no measurement
data on this; suggestions on suitable tests would be welcome.

There's a short upstream discussion on the topic starting at
 http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2010-04/msg00757.html
with the conclusion that you can't please everybody.

It would be possible to choose these settings separately for each architecture.
Should I exclude the 'smaller' architectures (armel, mips*?)

It looks like powerpc won't get long doubles anyway, see #578295.


My test rebuilds have turned out just one package breaking due to
use64bitint (#579450) and a dozen due to the uselongdouble setting.

 http://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=perl-long-double;users=debian-perl@lists.debian.org 

The longdouble failures are mostly equivalence comparisons of floating
point values, which is normally a bug even when it works.

A complication is that it's hard to change these settings after an upload
to unstable because they change the binary interface. The perlapi-*
dependencies specified in the Perl policy only allow for ABI breaks when
the upstream version changes, so the transition would be a mess. 

See #579457 for an idea of how to make a cleaner transition possible;
even with that, it would be very much preferrable to get this "right"
the first time.
-- 
Niko Tyni   ntyni@debian.org


Reply to: