Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Commit 039ed67

Browse files
committed
1 parent b7d821a commit 039ed67

File tree

13 files changed

+170
-36
lines changed

13 files changed

+170
-36
lines changed

Porting/Maintainers.pl

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ package Maintainers;
243243
},
244244

245245
'bignum' => {
246-
'DISTRIBUTION' => 'PJACKLAM/bignum-0.43.tar.gz',
246+
'DISTRIBUTION' => 'PJACKLAM/bignum-0.47.tar.gz',
247247
'FILES' => q[dist/bignum],
248248
'EXCLUDED' => [
249249
qr{^inc/Module/},
@@ -252,7 +252,13 @@ package Maintainers;
252252
qw( t/pod.t
253253
t/pod_cov.t
254254
),
255-
],
255+
],
256+
# better cperl variant 0.47c
257+
# https://github.com/rurban/bignum/commits/cperl
258+
'CUSTOMIZED' => [
259+
qw[ lib/bigint.pm lib/bignum.pm lib/bigrat.pm
260+
t/in_effect.t t/overrides.t t/scope_f.t t/scope_i.t t/scope_r.t
261+
]],
256262
},
257263

258264
'Carp' => {

dist/Module-CoreList/lib/Module/CoreList.pm

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14732,12 +14732,9 @@ our %delta = (
1473214732
'App::Prove::State::Result'=> '3.39',
1473314733
'App::Prove::State::Result::Test'=> '3.39',
1473414734
'B' => '1.68_06',
14735-
'Math::BigFloat' => '1.999811',
14736-
'Math::BigInt' => '1.999811_01',
14737-
'Math::BigInt::Calc' => '1.999811',
14738-
'Math::BigInt::CalcEmu' => '1.999811',
14739-
'Math::BigInt::Lib' => '1.999811',
14740-
'Math::BigRat' => '0.2612',
14735+
'bigint' => '0.47c',
14736+
'bignum' => '0.47c',
14737+
'bigrat' => '0.47c',
1474114738
'Compress::Raw::Bzip2' => '2.074',
1474214739
'Compress::Raw::Zlib' => '2.074',
1474314740
'Config' => '6.23',
@@ -14799,6 +14796,14 @@ our %delta = (
1479914796
'Locale::Currency' => '3.51',
1480014797
'Locale::Language' => '3.51',
1480114798
'Locale::Script' => '3.51',
14799+
'Math::BigFloat' => '1.999811',
14800+
'Math::BigFloat::Trace' => '0.47',
14801+
'Math::BigInt' => '1.999811_01',
14802+
'Math::BigInt::Calc' => '1.999811',
14803+
'Math::BigInt::CalcEmu' => '1.999811',
14804+
'Math::BigInt::Lib' => '1.999811',
14805+
'Math::BigInt::Trace' => '0.47',
14806+
'Math::BigRat' => '0.2612',
1480214807
'Net::Ping' => '2.59',
1480314808
'PerlIO' => '1.10',
1480414809
'PerlIO::via' => '0.17',

dist/bignum/lib/Math/BigFloat/Trace.pm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ use warnings;
99
use Exporter;
1010
use Math::BigFloat;
1111

12-
our ($PACKAGE, @EXPORT_OK, $accuracy, $precision, $round_mode, $div_scale);
12+
our ($accuracy, $precision, $round_mode, $div_scale);
1313

1414
our @ISA = qw(Exporter Math::BigFloat);
1515

16-
our $VERSION = '0.42';
16+
our $VERSION = '0.47';
1717

18-
use overload; # inherit overload from BigFloat
18+
use overload; # inherit overload from Math::BigFloat
1919

2020
# Globals
2121
$accuracy = $precision = undef;

dist/bignum/lib/Math/BigInt/Trace.pm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ use warnings;
99
use Exporter;
1010
use Math::BigInt;
1111

12-
our ($PACKAGE, @EXPORT_OK, $accuracy, $precision, $round_mode, $div_scale);
12+
our ($accuracy, $precision, $round_mode, $div_scale);
1313

1414
our @ISA = qw(Exporter Math::BigInt);
1515

16-
our $VERSION = '0.42';
16+
our $VERSION = '0.47';
1717

18-
use overload; # inherit overload from BigInt
18+
use overload; # inherit overload from Math::BigInt
1919

2020
# Globals
2121
$accuracy = $precision = undef;

dist/bignum/lib/bigint.pm

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ package bigint;
22

33
use 5.006;
44
use strict;
5-
use warnings;
5+
#use warnings;
6+
use cperl;
67

7-
our $VERSION = '0.43c';
8+
our $VERSION = '0.47c';
89
$VERSION =~ s/c$//;
910

1011
use Exporter;
@@ -318,6 +319,8 @@ sub import () :method
318319
} else {
319320
# see if we can find Math::BigInt::Lite
320321
if (!defined $a && !defined $p) { # rounding won't work to well
322+
local @INC = @INC;
323+
pop @INC if $INC[-1] eq '.';
321324
if (eval { require Math::BigInt::Lite; 1 }) {
322325
@import = (); # :constant in Lite, not MBI
323326
Math::BigInt::Lite->import(':constant');
@@ -776,21 +779,48 @@ to compare them to the results under -Mbignum or -Mbigrat:
776779
perl -Mbigint=a,65 -le 'print 2 ** 0.2'
777780
perl -Mbignum=a,65,l,GMP -le 'print 7 ** 7777'
778781
782+
=head1 BUGS
783+
784+
For information about bugs and how to report them, see the BUGS section in the
785+
documentation available with the perldoc command.
786+
787+
perldoc bignum
788+
789+
=head1 SUPPORT
790+
791+
You can find documentation for this module with the perldoc command.
792+
793+
perldoc bigint
794+
795+
For more information, see the SUPPORT section in the documentation available
796+
with the perldoc command.
797+
798+
perldoc bignum
799+
779800
=head1 LICENSE
780801
781802
This program is free software; you may redistribute it and/or modify it under
782803
the same terms as Perl itself.
783804
784805
=head1 SEE ALSO
785806
786-
Especially L<bigrat> as in C<perl -Mbigrat -le 'print 1/3+1/4'> and
787-
L<bignum> as in C<perl -Mbignum -le 'print sqrt(2)'>.
807+
L<bignum> and L<bigrat>.
788808
789-
L<Math::BigInt>, L<Math::BigRat> and L<Math::Big> as well
790-
as L<Math::BigInt::Pari> and L<Math::BigInt::GMP>.
809+
L<Math::BigInt>, L<Math::BigFloat>, L<Math::BigRat> and L<Math::Big> as well as
810+
L<Math::BigInt::FastCalc>, L<Math::BigInt::Pari> and L<Math::BigInt::GMP>.
791811
792812
=head1 AUTHORS
793813
814+
=over 4
815+
816+
=item *
817+
794818
(C) by Tels L<http://bloodgate.com/> in early 2002 - 2007.
795819
820+
=item *
821+
822+
Maintained by Peter John Acklam E<lt>pjacklam@gmail.com<gt>, 2014-.
823+
824+
=back
825+
796826
=cut

dist/bignum/lib/bignum.pm

Lines changed: 58 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ package bignum;
22

33
use 5.006;
44
use strict;
5-
use warnings;
5+
#use warnings;
6+
use cperl;
67

7-
our $VERSION = '0.42c';
8+
our $VERSION = '0.47c';
89
$VERSION =~ s/c$//;
910

1011
use Exporter;
@@ -159,6 +160,8 @@ sub import :method
159160
else {
160161
# see if we can find Math::BigInt::Lite
161162
if (!defined $a && !defined $p) { # rounding won't work to well
163+
local @INC = @INC;
164+
pop @INC if $INC[-1] eq '.';
162165
if (eval { require Math::BigInt::Lite; 1 }) {
163166
@import = (); # :constant in Lite, not MBI
164167
Math::BigInt::Lite->import(':constant');
@@ -662,20 +665,70 @@ Some cool command line examples to impress the Python crowd ;)
662665
perl -Mbignum=a,65 -le 'print 2 ** 0.2'
663666
perl -Mbignum=a,65,l,GMP -le 'print 7 ** 7777'
664667
668+
=head1 BUGS
669+
670+
Please report any bugs or feature requests to
671+
C<bug-math-bigint at rt.cpan.org>, or through the web interface at
672+
L<https://rt.cpan.org/Ticket/Create.html?Queue=bignum> (requires login).
673+
We will be notified, and then you'll automatically be notified of
674+
progress on your bug as I make changes.
675+
676+
=head1 SUPPORT
677+
678+
You can find documentation for this module with the perldoc command.
679+
680+
perldoc bignum
681+
682+
You can also look for information at:
683+
684+
=over 4
685+
686+
=item * RT: CPAN's request tracker
687+
688+
L<https://rt.cpan.org/Public/Dist/Display.html?Name=bignum>
689+
690+
=item * AnnoCPAN: Annotated CPAN documentation
691+
692+
L<http://annocpan.org/dist/bignum>
693+
694+
=item * CPAN Ratings
695+
696+
L<http://cpanratings.perl.org/dist/bignum>
697+
698+
=item * Search CPAN
699+
700+
L<http://search.cpan.org/dist/bignum/>
701+
702+
=item * CPAN Testers Matrix
703+
704+
L<http://matrix.cpantesters.org/?dist=bignum>
705+
706+
=back
707+
665708
=head1 LICENSE
666709
667710
This program is free software; you may redistribute it and/or modify it under
668711
the same terms as Perl itself.
669712
670713
=head1 SEE ALSO
671714
672-
Especially L<bigrat> as in C<perl -Mbigrat -le 'print 1/3+1/4'>.
715+
L<bigint> and L<bigrat>.
673716
674-
L<Math::BigFloat>, L<Math::BigInt>, L<Math::BigRat> and L<Math::Big> as well
675-
as L<Math::BigInt::Pari> and L<Math::BigInt::GMP>.
717+
L<Math::BigInt>, L<Math::BigFloat>, L<Math::BigRat> and L<Math::Big> as well as
718+
L<Math::BigInt::FastCalc>, L<Math::BigInt::Pari> and L<Math::BigInt::GMP>.
676719
677720
=head1 AUTHORS
678721
722+
=over 4
723+
724+
=item *
725+
679726
(C) by Tels L<http://bloodgate.com/> in early 2002 - 2007.
680727
728+
=item *
729+
730+
Maintained by Peter John Acklam E<lt>pjacklam@gmail.com<gt>, 2014-.
731+
732+
=back
733+
681734
=cut

dist/bignum/lib/bigrat.pm

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ package bigrat;
22

33
use 5.006;
44
use strict;
5-
use warnings;
5+
#use warnings;
6+
use cperl;
67

7-
our $VERSION = '0.42';
8+
our $VERSION = '0.47c';
89
$VERSION =~ s/c$//;
910

1011
use Exporter;
@@ -150,6 +151,8 @@ sub import :method {
150151
else {
151152
# see if we can find Math::BigInt::Lite
152153
if (!defined $a && !defined $p) { # rounding won't work to well
154+
local @INC = @INC;
155+
pop @INC if $INC[-1] eq '.';
153156
if (eval { require Math::BigInt::Lite; 1 }) {
154157
@import = (); # :constant in Lite, not MBI
155158
Math::BigInt::Lite->import(':constant');
@@ -546,20 +549,48 @@ Compare this to:
546549
perl -Mbigrat -le 'print 12->is_odd()';
547550
perl -Mbignum=l,GMP -le 'print 7 ** 7777'
548551
552+
=head1 BUGS
553+
554+
For information about bugs and how to report them, see the BUGS section in the
555+
documentation available with the perldoc command.
556+
557+
perldoc bignum
558+
559+
=head1 SUPPORT
560+
561+
You can find documentation for this module with the perldoc command.
562+
563+
perldoc bigrat
564+
565+
For more information, see the SUPPORT section in the documentation available
566+
with the perldoc command.
567+
568+
perldoc bignum
569+
549570
=head1 LICENSE
550571
551572
This program is free software; you may redistribute it and/or modify it under
552573
the same terms as Perl itself.
553574
554575
=head1 SEE ALSO
555576
556-
Especially L<bignum>.
577+
L<bignum> and L<bigint>.
557578
558-
L<Math::BigFloat>, L<Math::BigInt>, L<Math::BigRat> and L<Math::Big> as well
559-
as L<Math::BigInt::Pari> and L<Math::BigInt::GMP>.
579+
L<Math::BigInt>, L<Math::BigFloat>, L<Math::BigRat> and L<Math::Big> as well as
580+
L<Math::BigInt::FastCalc>, L<Math::BigInt::Pari> and L<Math::BigInt::GMP>.
560581
561582
=head1 AUTHORS
562583
584+
=over 4
585+
586+
=item *
587+
563588
(C) by Tels L<http://bloodgate.com/> in early 2002 - 2007.
564589
590+
=item *
591+
592+
Peter John Acklam E<lt>pjacklam@gmail.com<gt>, 2014-.
593+
594+
=back
595+
565596
=cut

dist/bignum/t/bigexp.t

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ use bignum;
1212

1313
my $ln_ev = -7 / (10 ** 17);
1414
my $ev = exp($ln_ev);
15-
1615
is(sprintf('%0.5f', $ev), '1.00000', '($ev) is approx. 1');
1716
is(sprintf('%0.5f', 1 - $ev), '0.00000', '(1-$ev) is approx. 0');
1817
is(sprintf('%0.5f', 1 - "$ev"), '0.00000', '(1-"$ev") is approx. 0');

dist/bignum/t/infnan.inc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ is($x->bstr(), 'NaN', qq|$x = inf * NaN; $x->bstr() = 'NaN'|);
7575

7676
for my $nan (qw/ nan naN nAn nAN Nan NaN NAn NAN /) {
7777
my $x = 1 + $nan;
78-
print ref($x), "<<<\n";
7978
is($x->bstr(), "NaN", qq|\$x = 1 + "$nan"; \$x->bstr() = "NaN"|);
8079
isa_ok($x, "Math::BigInt");
8180
}

dist/bignum/t/scope_f.t

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,3 @@ SKIP: {
3333
isnt (ref(hex(9)), 'Math::BigInt', 'hex is not overloaded');
3434
isnt (ref(oct(07)), 'Math::BigInt', 'oct is not overloaded');
3535
}
36-

0 commit comments

Comments
 (0)