Commit 7fb81648 authored by gregor herrmann's avatar gregor herrmann

Imported Upstream version 1.999709

parent 4e3ccc1d
File mode changed from 100755 to 100644
BUGS 100755 → 100644
File mode changed from 100755 to 100644
......@@ -1488,6 +1488,18 @@ The changes are now grouped by distribution.
* Use Math::Complex::Inf() in testfiles also (for generating Perl scalar
infinity) since it is more portable.
2015-11-06 v1.999709 pjacklam
* Represent and return zero as 0E0, not 0E1. The old POD said "A zero is
represented and returned as 0E1, not 0E0 (after Knuth)." I find no
references to Knuth ever having said this. The closest reference I can find
is that Knuth says 0**0 should be defined to be 1, not 0, but that is
something else than 0e0, which is 0*10**0. I have yet to see any other
mathematical software that represents and returns zero as 0e1 rather than
0e0.
* Required version of Test::More is 0.9301.
Please send us test-reports, your experiences with this and your ideas - we love
to hear about our work!
......
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
......@@ -23,7 +23,7 @@
"build" : {
"requires" : {
"ExtUtils::MakeMaker" : "6.59",
"Test::More" : "0.62"
"Test::More" : "0.9301"
}
},
"configure" : {
......@@ -34,12 +34,12 @@
"runtime" : {
"requires" : {
"Math::Complex" : "1.39",
"Test::More" : "0.62",
"Test::More" : "0.9301",
"perl" : "5.006002"
}
}
},
"release_status" : "stable",
"version" : "1.999708",
"version" : "1.999709",
"x_serialization_backend" : "JSON::PP version 2.27300"
}
......@@ -4,7 +4,7 @@ author:
- '=over 4, Peter John Acklam <pjacklam@online.no>'
build_requires:
ExtUtils::MakeMaker: '6.59'
Test::More: '0.62'
Test::More: '0.9301'
configure_requires:
ExtUtils::MakeMaker: '0'
dynamic_config: 1
......@@ -20,7 +20,7 @@ no_index:
- inc
requires:
Math::Complex: '1.39'
Test::More: '0.62'
Test::More: '0.9301'
perl: '5.006002'
version: '1.999708'
version: '1.999709'
x_serialization_backend: 'CPAN::Meta::YAML version 0.016'
......@@ -16,7 +16,7 @@ all_from 'lib/Math/BigInt.pm';
# Required versions.
requires 'perl' => 5.006002;
requires 'Math::Complex' => 1.39,
test_requires 'Test::More' => 0.62;
test_requires 'Test::More' => 0.9301;
install_as_core();
......
NEW 100755 → 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
......@@ -16,16 +16,16 @@ Hash: SHA1
SHA1 f6ef98e8f3f6a4f670d569f279ef5a3c05c16d0c BENCHMARK
SHA1 d681b992c9e027633a59fbd52530805ee4e1621c BUGS
SHA1 c380b0fefc9e2de150524fa21316cd437fe2a72c CHANGES
SHA1 5176439f04e5492e6a3993a316d248175f83b594 CHANGES
SHA1 f27c8bd98e754f96c9825fa6ce9f1244c93bdbe6 CREDITS
SHA1 bc2db74538d3acd53f71b5512a144fe18c253ecd GOALS
SHA1 fe61299e80a1dca48fbaa33f0869e3238ec07c70 HISTORY
SHA1 d6a6c30ee6d9ba6b9afab8bbf6a25e1b23c744e0 LICENSE
SHA1 e717092a11b1e42a0a7b340c68e75fa84b8a68b8 MANIFEST
SHA1 86df44fbe1ea7a68897113f0e327d0f0c25b91e3 MANIFEST.SKIP
SHA1 3be1ef46b80d8582927d3409862840bcc8ff35ce META.json
SHA1 7811a0e4c31565c82f8f264759c21dd6a4ef78e6 META.yml
SHA1 e73fa91f03bf0cb3b117845cd60c200fb30be2ca Makefile.PL
SHA1 ea13a151a65b0bf6ddc87fcd38c599537d09f4bb META.json
SHA1 d197f1cef69a1c988a1c41d0269ac41b9766bd37 META.yml
SHA1 a57852f7db8fc4f38351154644964b93ff06f04d Makefile.PL
SHA1 4e2191d1724e699862efc5350f480c8e02755112 NEW
SHA1 813c62e6d3edd18b7b634765ecbd75b2cd6389a0 README
SHA1 f1500916b488220b707bc10a0388d7dbcfd52e99 TODO
......@@ -40,10 +40,10 @@ SHA1 76efdca3603159e0ae0e18f19fe72a0211a69529 inc/Module/Install/Makefile.pm
SHA1 2e33e87882d60db3913da6284dd5295e5315e18a inc/Module/Install/Metadata.pm
SHA1 c830b819e61bda5eca077c6291293bba61b3b9f2 inc/Module/Install/Win32.pm
SHA1 cb52b9d6f88d512d448a6f35ed0af0d1201a134b inc/Module/Install/WriteAll.pm
SHA1 cb779827a1fc79975094e40f169fa25ea1321835 lib/Math/BigFloat.pm
SHA1 ceee066901c52d7e1f6d55cf16b249e1caea6f71 lib/Math/BigInt.pm
SHA1 d8f02a9bb0434f8116f97fc8e3c7bcdfb23f7091 lib/Math/BigInt/Calc.pm
SHA1 2aee9080c2c3098afaa3dda4000fb3dfa858059e lib/Math/BigInt/CalcEmu.pm
SHA1 c7305d30bfa5d45468488580049d988484493e3a lib/Math/BigFloat.pm
SHA1 2499a3661b1b55d85a40b30d6536adf27b1eff3d lib/Math/BigInt.pm
SHA1 312cf1302bbd003016413393e5393752dcc56103 lib/Math/BigInt/Calc.pm
SHA1 5dda5ab049013116c3a35983f511fb7f20171b06 lib/Math/BigInt/CalcEmu.pm
SHA1 385cc7ed3bf3e6290640b9880445ca9a3dea629e t/00sig.t
SHA1 4463fdcebb8421cc2e63f87d678adb47856bf58c t/01load.t
SHA1 b2ed9206ca5b69ec3b8bbf850bf4b6dfde518e7e t/02pod.t
......@@ -58,17 +58,17 @@ SHA1 9f0d228c71dd1b49ea6de9ea9f67dcf30d3edccc t/bare_mbf.t
SHA1 633a5d1446321301fe2fbf8d440111ad62ffddfb t/bare_mbi.t
SHA1 97fb1db80aeb4ab007e2260d35329e149edf5e05 t/bare_mif.t
SHA1 333a425247b4e276696210a6322b815a0f55f5ab t/big_pi_e.t
SHA1 99550df360cd7a07cce39afd142aac112adea6e3 t/bigfltpm.inc
SHA1 cc465614afdcbbe878185f969ecb3c3cbd3fecf7 t/bigfltpm.inc
SHA1 adc335657a51b82eeca6cd24a6caa24263283017 t/bigfltpm.t
SHA1 b3ceebc429c05bce95347575d28348306dbcfcc8 t/bigintc.t
SHA1 0d2491a3abeff02a6e0998cfaaede98a1f993d63 t/bigintpm.inc
SHA1 d8cf35833406df1e45ef5ee148d003e71c5f7c20 t/bigintpm.inc
SHA1 ba3d855434e4fea04c22bdd54076ed9706a79d5f t/bigintpm.t
SHA1 cb07d195c20eb306088eeacccc2c7475f267446c t/bigints.t
SHA1 0e505ab877fb41505d683163ad3f09027f9eef35 t/biglog.t
SHA1 b1aa233c07e7988ef67c9f527c9dc67b46d0a6fc t/bigroot.t
SHA1 01e72c0c34468a0c135c4bfc7e69a3274ca0a368 t/blog-mbf.t
SHA1 6e093e61e67395b85dc64911ce4e554d8a8f23dc t/blog-mbi.t
SHA1 2ed03baf88a7d868706605bada7874123f99eded t/calling.t
SHA1 53a4f0cab3a78e2fdb9ba98628c2ef498edc40d6 t/calling.t
SHA1 c1f7b6840e772f2b6d4f8dbea4c28aaa675c9b17 t/config.t
SHA1 7c75531325efd55f15ef14e5ca22875d6d53e366 t/const_mbf.t
SHA1 b7891121243029ae078ca952205ce3d037b145d8 t/constant.t
......@@ -99,7 +99,7 @@ SHA1 3e85cad277cb8490910285f8541a43bda6623cbb t/sub_mbf.t
SHA1 94d13e2f3807f37b1489f7540fa46995f9f78d8e t/sub_mbi.t
SHA1 a9d994551c5ca127c11f5cdd1d8df1d93972c72c t/sub_mif.t
SHA1 22c563a6879c94ce7c8eb72c645f2e374837c34e t/trap.t
SHA1 6170a40ec68d8821a9d5cb7731cbf35c4c0291b6 t/upgrade.inc
SHA1 15f68b221c4c5b8bb8540c0dc3dd961ec38de276 t/upgrade.inc
SHA1 85f4acf11c0a9da6c67e21bec6cd3c6e31deea25 t/upgrade.t
SHA1 e9019081ff5c07957e45619010c62a54472d8508 t/upgrade2.t
SHA1 49183118717b8b90e498b6d7b1ac0aa0e4d85894 t/upgradef.t
......@@ -113,11 +113,11 @@ SHA1 01c5bfaa17310e1cea23ad46eacfe1613c291cac t/with_sub.t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQEcBAEBAgAGBQJWOMJbAAoJEGcmPl2fr166ongH/RTUscTKeeO6W9XL1YAIJpOM
akCBo5Klua7sqLPUOltYjUNix98Td2xOWYatcArDZUUnTQ4oFDt2fJROG7bDWV68
W0yRIrNY7KKqnw8NJ4QL+QERvO9OsflY1QTXSCRrmjqqFOTqF3ujifxZ2NnVSF7C
98RMtn7Mtb7evYpp46ND0L9nFzN76G96bXLSF+7xBWFV7oL1Ru5/CpEJpJLbaIOT
B+xOoj7MxIvCy0zA5WD/Mu9FX7SuIKZbmku5t6hvit5X6f3snRNvhLP/GvpNUEcE
LLKIbqCiB754PoBDqmEnEzK2hfhKFxlvhyuS2G5eoqM3qGBAypEduoW6zi08nHI=
=2wlX
iQEcBAEBAgAGBQJWP66kAAoJEGcmPl2fr166V70IAJp04sCaNomoPTo+ATvoOWCN
p2+HVnlmW3Ly2anaDGrB5t8TZDVS7qUAC+jx3RJBkFZ0n+PfO+VkeTi7QWCd3FyB
uuYvIMn8eOrQyLEWzOD6M8MgL7pvwmBX08HzwnEkNHvF4sE/MCA76RWwEzDhabD4
NIe2BAvCqjbs38oMcYIP3noULOiEUA7yydGV4bH04AzogNAN7NQhrEKQRjNuaddT
73WvhM2r1uBXA04o3weV0l62y94H0b9ILxNCqQLKeOBZ1L81/c+KKvk3EUpY8mdP
d9Nz6GexWknBiB7SrZ2871Fn/Z6c40NFez9FTaiMP3e0Bj+JudglEzq6omKDN3U=
=JOu/
-----END PGP SIGNATURE-----
TODO 100755 → 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
......@@ -16,7 +16,7 @@ use 5.006002;
use strict;
use warnings;
our $VERSION = '1.999708';
our $VERSION = '1.999709';
require Exporter;
our @ISA = qw/Math::BigInt/;
......@@ -223,10 +223,10 @@ sub new
}
$self->{sign} = $$mis;
# for something like 0Ey, set y to 1, and -0 => +0
# for something like 0Ey, set y to 0, and -0 => +0
# Check $$miv for being '0' and $$mfv eq '', because otherwise _m could not
# have become 0. That's faster than to call $MBI->_is_zero().
$self->{sign} = '+', $self->{_e} = $MBI->_one()
$self->{sign} = '+', $self->{_e} = $MBI->_zero()
if $$miv eq '0' and $$mfv eq '';
return $self->round(@r) if !$downgrade;
......@@ -321,11 +321,11 @@ sub _bone
sub _bzero
{
# used by parent class bone() to initialize number to 0
# used by parent class bzero() to initialize number to 0
my $self = shift;
$IMPORT=1; # call our import only once
$self->{_m} = $MBI->_zero();
$self->{_e} = $MBI->_one();
$self->{_e} = $MBI->_zero();
$self->{_es} = '+';
}
......@@ -4219,8 +4219,6 @@ as BigInts such that:
C<< ($m,$e) = $x->parts(); >> is just a shortcut giving you both of them.
A zero is represented and returned as C<0E1>, B<not> C<0E0> (after Knuth).
Currently the mantissa is reduced as much as possible, favouring higher
exponents over lower ones (e.g. returning 1e7 instead of 10e6 or 10000000e0).
This might change in the future, so do not depend on it.
......
......@@ -19,7 +19,7 @@ use 5.006002;
use strict;
use warnings;
our $VERSION = '1.999708';
our $VERSION = '1.999709';
our @ISA = qw(Exporter);
our @EXPORT_OK = qw(objectify bgcd blcm);
......@@ -2510,7 +2510,7 @@ sub exponent
my $s = $x->{sign}; $s =~ s/^[+-]//; # NaN, -inf,+inf => NaN or inf
return $self->new($s);
}
return $self->bone() if $x->is_zero();
return $self->bzero() if $x->is_zero();
# 12300 => 2 trailing zeros => exponent is 2
$self->new( $CALC->_zeros($x->{value}) );
......
......@@ -4,7 +4,7 @@ use 5.006002;
use strict;
use warnings;
our $VERSION = '1.999708';
our $VERSION = '1.999709';
# Package to store unsigned big integers in decimal and do math with them
......
......@@ -4,7 +4,7 @@ use 5.006002;
use strict;
use warnings;
our $VERSION = '1.999708';
our $VERSION = '1.999709';
package Math::BigInt;
......
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
......@@ -1767,7 +1767,7 @@ NaN:0
-inf:1
+inf:0
&parts
0:0 1
0:0 0
1:1 0
123:123 0
-123:-123 0
......@@ -1776,7 +1776,7 @@ NaNparts:NaN NaN
+inf:inf inf
-inf:-inf inf
&exponent
0:1
0:0
1:0
123:0
-123:0
......
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
......@@ -2301,7 +2301,7 @@ abc:NaN
123:0
-1:0
-2:0
0:1
0:0
+inf:inf
-inf:inf
&parts
......@@ -2311,7 +2311,7 @@ abc:NaN,NaN
123:123,0
-1:-1,0
-2:-2,0
0:0,1
0:0,0
+inf:inf,inf
-inf:-inf,inf
&bfac
......
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
......@@ -121,7 +121,7 @@ abc:NaN
'-inf':-inf
&bsstr
1:1e+0
0:0e+1
0:0e+0
2:2e+0
200:2e+2
-5:-5e+0
......
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
......@@ -1214,7 +1214,7 @@ abc:NaN
123:0
-1:0
-2:0
0:1
0:0
+inf:inf
-inf:inf
&parts
......@@ -1224,7 +1224,7 @@ abc:NaN,NaN
123:123,0
-1:-1,0
-2:-2,0
0:0,1
0:0,0
+inf:inf,inf
-inf:-inf,inf
&bfac
......
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment