r7230 - in /branches/upstream/libscalar-number-perl/current: Changes META.yml lib/Scalar/Number.pm t/class_all.t t/class_i32_f52.t t/class_i64_f52.t t/val_cmp_i32_f52.t t/val_cmp_i64_f52.t
dmn at users.alioth.debian.org
dmn at users.alioth.debian.org
Wed Sep 5 11:55:44 UTC 2007
Author: dmn
Date: Wed Sep 5 11:55:44 2007
New Revision: 7230
URL: http://svn.debian.org/wsvn/?sc=1&rev=7230
Log:
[svn-upgrade] Integrating new upstream version, libscalar-number-perl (0.002)
Modified:
branches/upstream/libscalar-number-perl/current/Changes
branches/upstream/libscalar-number-perl/current/META.yml
branches/upstream/libscalar-number-perl/current/lib/Scalar/Number.pm
branches/upstream/libscalar-number-perl/current/t/class_all.t
branches/upstream/libscalar-number-perl/current/t/class_i32_f52.t
branches/upstream/libscalar-number-perl/current/t/class_i64_f52.t
branches/upstream/libscalar-number-perl/current/t/val_cmp_i32_f52.t
branches/upstream/libscalar-number-perl/current/t/val_cmp_i64_f52.t
Modified: branches/upstream/libscalar-number-perl/current/Changes
URL: http://svn.debian.org/wsvn/branches/upstream/libscalar-number-perl/current/Changes?rev=7230&op=diff
==============================================================================
--- branches/upstream/libscalar-number-perl/current/Changes (original)
+++ branches/upstream/libscalar-number-perl/current/Changes Wed Sep 5 11:55:44 2007
@@ -1,3 +1,11 @@
+version 0.002; 2007-09-02
+
+ * in tests, catch exceptions from sprintf("%.1f", $_), to work around a
+ "panic: frexp" problem seen on BSD
+
+ * in documentation, note fundamental problem with Perl 5.6 with wide
+ integers
+
version 0.001; 2007-02-05
* bugfix: in comparison, handle all cases of integers not representable
Modified: branches/upstream/libscalar-number-perl/current/META.yml
URL: http://svn.debian.org/wsvn/branches/upstream/libscalar-number-perl/current/META.yml?rev=7230&op=diff
==============================================================================
--- branches/upstream/libscalar-number-perl/current/META.yml (original)
+++ branches/upstream/libscalar-number-perl/current/META.yml Wed Sep 5 11:55:44 2007
@@ -1,7 +1,7 @@
# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: Scalar-Number
-version: 0.001
+version: 0.002
version_from: lib/Scalar/Number.pm
installdirs: site
requires:
@@ -9,4 +9,4 @@
Data::Integer: 0.000
distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.17
+generated_by: ExtUtils::MakeMaker version 6.30_01
Modified: branches/upstream/libscalar-number-perl/current/lib/Scalar/Number.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libscalar-number-perl/current/lib/Scalar/Number.pm?rev=7230&op=diff
==============================================================================
--- branches/upstream/libscalar-number-perl/current/lib/Scalar/Number.pm (original)
+++ branches/upstream/libscalar-number-perl/current/lib/Scalar/Number.pm Wed Sep 5 11:55:44 2007
@@ -46,7 +46,7 @@
);
use Data::Integer 0.000 qw(natint_bits min_natint max_natint);
-our $VERSION = "0.001";
+our $VERSION = "0.002";
use base "Exporter";
our @EXPORT_OK = qw(
@@ -327,6 +327,17 @@
=back
+=head1 BUGS
+
+In Perl 5.6, if configured with a wider-than-usual native integer type
+such that there are native integers that can't be represented exactly in
+the native floating point type, it is not always possible to distinguish
+between integer and floating point values. In order to get the full
+benefit of either type, one is expected (by the numeric semantics) to
+know which of them one is using. This module will not work, and will
+fail its test suite, on such a system. This problem is resolved by Perl
+5.8's new numeric semantics.
+
=head1 SEE ALSO
L<Data::Float>,
Modified: branches/upstream/libscalar-number-perl/current/t/class_all.t
URL: http://svn.debian.org/wsvn/branches/upstream/libscalar-number-perl/current/t/class_all.t?rev=7230&op=diff
==============================================================================
--- branches/upstream/libscalar-number-perl/current/t/class_all.t (original)
+++ branches/upstream/libscalar-number-perl/current/t/class_all.t Wed Sep 5 11:55:44 2007
@@ -6,10 +6,10 @@
sub check($$$) {
my($expect_natint, $expect_float, $value) = @_;
- my $desc = sprintf("status of %s (%.1f)",
- my $sval = $value, my $fval = $value);
- is !!sclnum_is_natint($value), !!$expect_natint, "integer $desc";
- is !!sclnum_is_float($value), !!$expect_float, "float $desc";
+ my $desc = eval { sprintf(" of %s (%.1f)",
+ my $sval = $value, my $fval = $value) } || "";
+ is !!sclnum_is_natint($value), !!$expect_natint, "integer status$desc";
+ is !!sclnum_is_float($value), !!$expect_float, "float status$desc";
}
if(have_signed_zero) {
Modified: branches/upstream/libscalar-number-perl/current/t/class_i32_f52.t
URL: http://svn.debian.org/wsvn/branches/upstream/libscalar-number-perl/current/t/class_i32_f52.t?rev=7230&op=diff
==============================================================================
--- branches/upstream/libscalar-number-perl/current/t/class_i32_f52.t (original)
+++ branches/upstream/libscalar-number-perl/current/t/class_i32_f52.t Wed Sep 5 11:55:44 2007
@@ -12,10 +12,10 @@
sub check($$$) {
my($expect_natint, $expect_float, $value) = @_;
- my $desc = sprintf("status of %s (%.1f)",
- my $sval = $value, my $fval = $value);
- is !!sclnum_is_natint($value), !!$expect_natint, "integer $desc";
- is !!sclnum_is_float($value), !!$expect_float, "float $desc";
+ my $desc = eval { sprintf(" of %s (%.1f)",
+ my $sval = $value, my $fval = $value) } || "";
+ is !!sclnum_is_natint($value), !!$expect_natint, "integer status$desc";
+ is !!sclnum_is_float($value), !!$expect_float, "float status$desc";
}
eval do { local $/; <DATA>; } or die $@;
Modified: branches/upstream/libscalar-number-perl/current/t/class_i64_f52.t
URL: http://svn.debian.org/wsvn/branches/upstream/libscalar-number-perl/current/t/class_i64_f52.t?rev=7230&op=diff
==============================================================================
--- branches/upstream/libscalar-number-perl/current/t/class_i64_f52.t (original)
+++ branches/upstream/libscalar-number-perl/current/t/class_i64_f52.t Wed Sep 5 11:55:44 2007
@@ -12,10 +12,10 @@
sub check($$$) {
my($expect_natint, $expect_float, $value) = @_;
- my $desc = sprintf("status of %s (%.1f)",
- my $sval = $value, my $fval = $value);
- is !!sclnum_is_natint($value), !!$expect_natint, "integer $desc";
- is !!sclnum_is_float($value), !!$expect_float, "float $desc";
+ my $desc = eval { sprintf(" of %s (%.1f)",
+ my $sval = $value, my $fval = $value) } || "";
+ is !!sclnum_is_natint($value), !!$expect_natint, "integer status$desc";
+ is !!sclnum_is_float($value), !!$expect_float, "float status$desc";
}
eval do { local $/; <DATA>; } or die $@;
Modified: branches/upstream/libscalar-number-perl/current/t/val_cmp_i32_f52.t
URL: http://svn.debian.org/wsvn/branches/upstream/libscalar-number-perl/current/t/val_cmp_i32_f52.t?rev=7230&op=diff
==============================================================================
--- branches/upstream/libscalar-number-perl/current/t/val_cmp_i32_f52.t (original)
+++ branches/upstream/libscalar-number-perl/current/t/val_cmp_i32_f52.t Wed Sep 5 11:55:44 2007
@@ -175,8 +175,8 @@
skip "special value not available", 1
unless defined($a) && defined($b);
is sclnum_val_cmp($a, $b), ($ia <=> $ib),
- sprintf("%s (%.1f) <=> %s (%.1f)",
- $a, $a, $b, $b);
+ eval { sprintf("%s (%.1f) <=> %s (%.1f)",
+ $a, $a, $b, $b) } || "";
}
}
Modified: branches/upstream/libscalar-number-perl/current/t/val_cmp_i64_f52.t
URL: http://svn.debian.org/wsvn/branches/upstream/libscalar-number-perl/current/t/val_cmp_i64_f52.t?rev=7230&op=diff
==============================================================================
--- branches/upstream/libscalar-number-perl/current/t/val_cmp_i64_f52.t (original)
+++ branches/upstream/libscalar-number-perl/current/t/val_cmp_i64_f52.t Wed Sep 5 11:55:44 2007
@@ -231,8 +231,8 @@
skip "special value not available", 1
unless defined($a) && defined($b);
is sclnum_val_cmp($a, $b), ($ia <=> $ib),
- sprintf("%s (%.1f) <=> %s (%.1f)",
- $a, $a, $b, $b);
+ eval { sprintf("%s (%.1f) <=> %s (%.1f)",
+ $a, $a, $b, $b) } || "";
}
}
}
More information about the Pkg-perl-cvs-commits
mailing list