Projects
openEuler:Mainline
perl-Math-BigInt-FastCalc
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 10
View file
_service:tar_scm:perl-Math-BigInt-FastCalc.spec
Changed
@@ -1,14 +1,14 @@ Name: perl-Math-BigInt-FastCalc -Version: 0.5012 -Release: 3 +Version: 0.5014 +Release: 1 Summary: Math::BigInt::Calc with some XS for more speed License: GPL+ or Artistic URL: https://metacpan.org/release/Math-BigInt-FastCalc -Source0: https://cpan.metacpan.org/authors/id/P/PJ/PJACKLAM/Math-BigInt-FastCalc-0.5012.tar.gz +Source0: https://cpan.metacpan.org/authors/id/P/PJ/PJACKLAM/Math-BigInt-FastCalc-%{version}.tar.gz BuildRequires:perl-generators perl-interpreter perl-devel gcc BuildRequires:perl(ExtUtils::MakeMaker) >= 6.76 perl(Test::More) >= 0.88 -BuildRequires:perl(Math::BigInt) >= 1.999817 perl(Math::BigFloat) +BuildRequires:perl(Math::BigInt) >= 1.999838 perl(Math::BigFloat) Requires: perl(:MODULE_COMPAT_%(perl -V:version | cut -d"'" -f 2)) Conflicts: perl < 4:5.22.0-348 @@ -28,7 +28,7 @@ Man page and other related documents for %{name}. %prep -%autosetup -n Math-BigInt-FastCalc-0.5012 -p1 +%autosetup -n Math-BigInt-FastCalc-%{version} -p1 %build perl Makefile.PL INSTALLDIRS=vendor NO_PERLLOCAL=1 NO_PACKLIST=1 OPTIMIZE="%{optflags}" @@ -62,6 +62,9 @@ %{_mandir}/*/* %changelog +* Fri Jul 28 2023 wangjiang <wangjiang37@h-partners.com> - 0.5014-1 +- upgrade version to 0.5014 + * Tue Nov 01 2022 wangjiang <wangjiang37@h-partners.com> - 0.5012-3 - Rebuild for next release
View file
_service:tar_scm:Math-BigInt-FastCalc-0.5012.tar.gz/CHANGES -> _service:tar_scm:Math-BigInt-FastCalc-0.5014.tar.gz/CHANGES
Changed
@@ -1,3 +1,11 @@ +0.5014 2023-04-03 + + * Sync test files with Math-BigInt. + +0.5013 2022-05-17 + + * Sync test files with Math-BigInt. + 0.5012 2021-09-28 * Sync test files with Math-BigInt.
View file
_service:tar_scm:Math-BigInt-FastCalc-0.5012.tar.gz/MANIFEST -> _service:tar_scm:Math-BigInt-FastCalc-0.5014.tar.gz/MANIFEST
Changed
@@ -141,6 +141,8 @@ xt/author/lib-property-_zeros.t xt/author/lib.ini xt/author/lib.t +xt/author/lib_load-mbf-mbi.t +xt/author/lib_load-mbi-mbf.t xt/release/changelog.t xt/release/cpan-changes.t xt/release/dist-manifest.t
View file
_service:tar_scm:Math-BigInt-FastCalc-0.5012.tar.gz/META.json -> _service:tar_scm:Math-BigInt-FastCalc-0.5014.tar.gz/META.json
Changed
@@ -4,7 +4,7 @@ "Peter John Acklam <pjacklam@gmail.com>" , "dynamic_config" : 1, - "generated_by" : "ExtUtils::MakeMaker version 7.62, CPAN::Meta::Converter version 2.150010", + "generated_by" : "ExtUtils::MakeMaker version 7.70, CPAN::Meta::Converter version 2.150010", "license" : "perl_5" , @@ -31,7 +31,7 @@ "runtime" : { "requires" : { "Carp" : "1.22", - "Math::BigInt" : "1.999819", + "Math::BigInt" : "1.999838", "XSLoader" : "0", "perl" : "5.006001" } @@ -50,6 +50,6 @@ "web" : "https://github.com/pjacklam/p5-Math-BigInt-FastCalc" } }, - "version" : "0.5012", - "x_serialization_backend" : "JSON::PP version 4.06" + "version" : "0.5014", + "x_serialization_backend" : "JSON::PP version 4.16" }
View file
_service:tar_scm:Math-BigInt-FastCalc-0.5012.tar.gz/META.yml -> _service:tar_scm:Math-BigInt-FastCalc-0.5014.tar.gz/META.yml
Changed
@@ -7,7 +7,7 @@ configure_requires: ExtUtils::MakeMaker: '6.58' dynamic_config: 1 -generated_by: 'ExtUtils::MakeMaker version 7.62, CPAN::Meta::Converter version 2.150010' +generated_by: 'ExtUtils::MakeMaker version 7.70, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -19,10 +19,10 @@ - inc requires: Carp: '1.22' - Math::BigInt: '1.999819' + Math::BigInt: '1.999838' XSLoader: '0' perl: '5.006001' resources: repository: https://github.com/pjacklam/p5-Math-BigInt-FastCalc.git -version: '0.5012' +version: '0.5014' x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
View file
_service:tar_scm:Math-BigInt-FastCalc-0.5012.tar.gz/Makefile.PL -> _service:tar_scm:Math-BigInt-FastCalc-0.5014.tar.gz/Makefile.PL
Changed
@@ -25,7 +25,7 @@ # A hash of modules that are needed to run the module. 'PREREQ_PM' => { - 'Math::BigInt' => 1.999819, + 'Math::BigInt' => 1.999838, 'Carp' => 1.22, 'XSLoader' => 0, },
View file
_service:tar_scm:Math-BigInt-FastCalc-0.5012.tar.gz/SIGNATURE -> _service:tar_scm:Math-BigInt-FastCalc-0.5014.tar.gz/SIGNATURE
Changed
@@ -1,5 +1,5 @@ This file contains message digests of all files listed in MANIFEST, -signed via the Module::Signature module, version 0.87. +signed via the Module::Signature module, version 0.88. To verify the content in this distribution, first make sure you have Module::Signature installed, then type: @@ -14,15 +14,15 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: RIPEMD160 -SHA256 7d21ee76c81b8e3936e24b9d14ac7ac8e2865a722caa898da38d9712f541cb27 CHANGES +SHA256 7df8bcd9fb7f1553d1ff2af36eca4a3505fbbb41508796acb809a8840949d429 CHANGES SHA256 75943d31f26d8417da884abe13a3563be16884d2ef9b1212df23fd617b85a9f0 CREDITS SHA256 0bd7a07ab76e4e9cb36e6e37d46e1e3c72d9314b7e185b2a819a4a91e5694ffc FastCalc.xs SHA256 b857edab549ac6893e2df5e1ec768ee46b62bcf1607a55e876f4d23f079eacce LICENSE -SHA256 8919d6119173b79c45d20994b99a9803cc13183ab8b9dc4423bf8e52d0d53d81 MANIFEST +SHA256 a0943de907775f213c7a49fa96c549f55929c7235272207e2ac5929a87da6118 MANIFEST SHA256 dac8b5ab4a7a25fd66a2b9d24dcd24f7746fc1b7654c1141103d8d2a42407325 MANIFEST.SKIP -SHA256 4428a6a3d18d32b5cc7e952f27a9bfa70aa239f4a896683cd66f0b64fe10fc53 META.json -SHA256 5b1a783ba6a7fa657e0f8f4f9a848fb59b88f5158b0c732593a79d06f56752ac META.yml -SHA256 bf18d7393d9a7170ca58352900d6a4b7768880645e70946206eb89234b12a827 Makefile.PL +SHA256 532984927822b53c56e9e3e4d8b80fefadfa1b9eab50551d62624f6ff75d2a4c META.json +SHA256 b443e4053ab864193518fab3fcc68e2d4a7a861524b177aa7e08e5be6669513a META.yml +SHA256 069f4cb541b05d35b22cd09769bc7b5df77b2e0f618646726597e68746855c8d Makefile.PL SHA256 1cc2c0c3493097e1ad75c34c4f4b619b67f9204de4ba464b2b18a523aea5dc4a README SHA256 2d6941b21a981cffa5ec5dfb656be728d8a23d7618af6cbe4a463e95ba135203 README.md SHA256 22831b087626e96a7f5703ec5cb4eba3712d10af8baf314424aeb6e449b2f605 TODO @@ -34,22 +34,22 @@ SHA256 7d3be1004b8b8b92d237e274d5776926b75e2f3c38081a49607239d528fdf014 inc/Module/Install/Metadata.pm SHA256 dad59bfbcfdda71aecb365213ba4e01c973d593a0dd5e09f7ae89300e0215bba inc/Module/Install/Win32.pm SHA256 2fc08f875f97772b3e362207078824fbefca8e397a77498fa3bb1381744796cf inc/Module/Install/WriteAll.pm -SHA256 3a06917beaa8f7cd4fba1d7b23869f34cd25bf994146fc762b7be50be0b8de6c lib/Math/BigInt/FastCalc.pm +SHA256 a139015b52e73b467b52b4f924c744fe444f597200f11cd1d07180fdb1dd4b66 lib/Math/BigInt/FastCalc.pm SHA256 f855e68d0f171debf8369ead8b36d004188f1c9069287a0d3c67a87f9afb1312 t/00sig.t -SHA256 bdce66310430e6da4ebba03f3ce7ea36d012840996c6e719cb02198e503f3553 t/01load.t +SHA256 5fb0c8bd4fa865ecb97bf0585616b1e814980fa664fef1e06ea5db06d037097b t/01load.t SHA256 9567333ab26747265ddf9bbcda1d6a672b71c6e85eb2cad3021ba7d2f96eb1c1 t/Math/BigInt/Lib/TestUtil.pm -SHA256 6ad718e94313ff7353c8a81a16199f0803746db009551e5cfe91c8da4dc3da92 t/bigfltpm.inc +SHA256 b5f6aacf13dc567671170a4086a03c43143af31b3596542e521464c5db19bba1 t/bigfltpm.inc SHA256 b26e932a876401829ef4d6aa4dda92518cb9082456437cb0f735f2ad3479ec0b t/bigfltpm.t SHA256 663cc57de5a68b55c00369848626d9c7485ef446a828fa15f6041be1400bcfaa t/bigintfc.t -SHA256 f9904c1bd689faf738846920df51ec1c1c18e64ad9679bebe310009625931609 t/bigintpm.inc -SHA256 33859bac8d9ca73a789f22ff409e00249cd11d7bf96101ce1d8e1d519f97c5d3 t/bigintpm.t -SHA256 1e75c7e247509e0a7e107962b852e3d0751c810bc1c2bf38a3c5207e471cf598 t/biglog.t +SHA256 4a27c4823323437af76bce2b33e6147891bfb5d0e0bb9d3dbc5e70931bc62882 t/bigintpm.inc +SHA256 3768f40fbfb0389201f2af8688d9847534a5c222e8a2b10d10f0d11929326b85 t/bigintpm.t +SHA256 b9a75fd76fd442cf563409f90a9c74e94517905a964f0ad3ea4ddd885f119faa t/biglog.t SHA256 a7e9da3a7157e29929b4fcd44fe68c8b8eefde426b7a4eb9912a5a8919e9c80a t/bigroot.t SHA256 f8e3dfa1c67aa3f2c65fa6be6e8e2d1d6e20ea2197b58c0225188c664b36642c t/bootstrap.t SHA256 803a71216096c0c615a66a0900d27ec20c368b2397df413bde62d30c5f9bb7e0 t/leak.t SHA256 0644242119983487817f8ae466f8a387d47df23430cd1b517049bf2061eea6ec t/mbi_rand.t -SHA256 f65ac3022afe737a5bc24048fe5eaffcd3c9138427ad5180d8e97ce4e48562be t/mbimbf.inc -SHA256 2c0acbfdc17df0c429755dd6e02474e992e19ef13c38e617be28c9460bac8495 t/mbimbf.t +SHA256 38b8514632ee9b9190862914678406bd4861c2b808d2eb4f3333d509066a74a8 t/mbimbf.inc +SHA256 313f330de9045eb7bfd3dbbca5b39a6e70d359161be601da2f44773c69fe104b t/mbimbf.t SHA256 b0eca4959a7e5555737837211728b34450eb933205414eedbbfa5345abf17eea xt/author/lib-arithmetic-binary-_add.dat SHA256 da56a2a378404c7344d702200cf8c6eb04a901917106429f5f4aaf191c0b6011 xt/author/lib-arithmetic-binary-_add.t SHA256 3c21ed128445e95c51c48ec243a919e4ca8ce4c6198e9dd39ffad473fbb7d1d0 xt/author/lib-arithmetic-binary-_div.dat @@ -62,7 +62,7 @@ SHA256 4cb097b928c88e95b49fc76198dd75c2b909cae0ca2b5f6abedf33ad07a90bbc xt/author/lib-arithmetic-binary-_mod.dat SHA256 0161a89d6df264535241d5bd7568677e1c8ae60b23ca09f9707c1831cbada139 xt/author/lib-arithmetic-binary-_mod.t SHA256 9ce9460416424ec2965fddebb4ebccebf0e8b0a59d3997075a7ff80a5566456f xt/author/lib-arithmetic-binary-_modinv.dat -SHA256 cec0a619a88850626b02eaa1cff77d52446cb7667828e5986c3d884f0de51eb6 xt/author/lib-arithmetic-binary-_modinv.t +SHA256 66b6eaf20fe3464cb880b4192032ac3a82ddb50aa207a025d321528ed1320bf2 xt/author/lib-arithmetic-binary-_modinv.t SHA256 75354f125320b70e19247ded923d12e48bd9db02598602bbfa9f24ff5fe629e5 xt/author/lib-arithmetic-binary-_mul.dat SHA256 089bcba994a3a1781ce1f3e7320e723f8c0a727ce979c4e4c4ddf3792832a23f xt/author/lib-arithmetic-binary-_mul.t SHA256 c6902a2bb76ff6107dbb943595fe7deca9b26ce3cb37ea19b7436414a6e40053 xt/author/lib-arithmetic-binary-_nok.dat @@ -159,6 +159,8 @@ SHA256 cf92c7351c227cd056534ec0deab83ea5dc5fca3db7b9c49416abe55b17bf32d xt/author/lib-property-_zeros.t SHA256 19cd71227168f32d4a2078ff00132f16bcaf156617c4a0763d3100c7a41b1f4d xt/author/lib.ini SHA256 6816b75d56f07bf2f6fcb7805bfb2a039138eec06ec8f1a2ad449601cc200d8d xt/author/lib.t +SHA256 cef6083a4cd49fec0c881193f17f30f0b0d265d578809e66c8b10a4e5703b8e0 xt/author/lib_load-mbf-mbi.t +SHA256 26e8ea11db97c085e5b6828cf6f870631a853803b570494d823cc985c21a29ba xt/author/lib_load-mbi-mbf.t SHA256 b26ef23292feff12cf891c78e6cb242ec024181a680199e4fd764e2ab16f538d xt/release/changelog.t SHA256 a37a38d9b507b98f55a17efc4f2fd54e4c45e20ec2cb5067606a4501dd634494 xt/release/cpan-changes.t SHA256 befb07cbace153e844bd1aa24309e8136f0265cc97708bfb2f5f427964f7a88d xt/release/dist-manifest.t @@ -174,11 +176,11 @@ SHA256 79e228dfe3193c0f2b5f9afaa6677062ef33ac9c9578e0e6c5a627696c319982 xt/release/version.t -----BEGIN PGP SIGNATURE----- -iQEcBAEBAwAGBQJhVGMmAAoJEGcmPl2fr166jVwIALes9EPELDiZMShop2P4xVMU -YkSI52I6O/ohBdvlQBpv4upVvC6pUH7zRFWvQ6AxlP/FKwuGgQdueFjWCmBpog9F -05XAZnPPU4Jc5Xrtga+/LhKwRXln3vjdiHrkeXXumSBCWbwLjH6RBbxTrlYcxUDx -NN0o7pQAAt/EMSCFKSEZGFlv0ndYn6K87bR0+Kj5j/rIkRrvKx0JbPqB8mjfitIs -dN5ZYKasE6xh1xEmDoC6l/3l5n4pW6eewXhUWZICTQS9mgzlOABhlVvGIgWn/1KB -DkMujXQxIfShaIQWsM2mmg/bsYF6iSreylN4HBzY8Rq0uE5ifO/3/VK3CJx3Cw0= -=FpqK +iQEcBAEBAwAGBQJkKqh8AAoJEGcmPl2fr166f8AH/3HmnUJnT288Hr6vE/grhW9Y +DQkGheSC97pnLLfLe2F5PgKGXHG7owp2mM5iZjDa3Ueim+Tcnb1SXEuIWvzraFwE +ouTgiCDp8ymJKyt9lWaReGQZbfd3+Y5aTcem32XBzQpbvqLNZMs4YzUKjtlvSq3e +VMck5gS7IiTeQBsxp5ECQfoGeoSdIRhPXgk0cbP8Z20ftaul1hKPSF40XY/zeocN +VfkkzV74d9jTovXdHg5VB2r8Hn9VcEvbUDYD4HCGlH1inGsjG6L3WEAdHXPvp9kr +SBa2QI89ezVBsgVONujSJfeCWgidEEGNwbouuyn5CpHvK6AQ4K9rEldHqRJedUg= +=aVKI -----END PGP SIGNATURE-----
View file
_service:tar_scm:Math-BigInt-FastCalc-0.5012.tar.gz/lib/Math/BigInt/FastCalc.pm -> _service:tar_scm:Math-BigInt-FastCalc-0.5014.tar.gz/lib/Math/BigInt/FastCalc.pm
Changed
@@ -12,7 +12,7 @@ our @ISA = qw< Math::BigInt::Calc >; } -our $VERSION = '0.5012'; +our $VERSION = '0.5014'; my $MAX_EXP_F; # the maximum possible base 10 exponent with "no integer" my $MAX_EXP_I; # the maximum possible base 10 exponent with "use integer"
View file
_service:tar_scm:Math-BigInt-FastCalc-0.5012.tar.gz/t/01load.t -> _service:tar_scm:Math-BigInt-FastCalc-0.5014.tar.gz/t/01load.t
Changed
@@ -1,19 +1,21 @@ # -*- mode: perl; -*- -use strict; # restrict unsafe constructs -use warnings; # enable optional warnings +use strict; +use warnings; use Test::More tests => 2; BEGIN { - use_ok('Math::BigInt'); use_ok('Math::BigInt::FastCalc'); + use_ok('Math::BigInt'); # Math::BigInt is required for the tests }; -my @mods = ('Math::BigInt', +my @mods = ( + 'Math::BigInt', + 'Math::BigInt::Lib', 'Math::BigInt::Calc', 'Math::BigInt::FastCalc', - ); + ); diag(""); diag("Testing with Perl $, $^X");
View file
_service:tar_scm:Math-BigInt-FastCalc-0.5012.tar.gz/t/bigfltpm.inc -> _service:tar_scm:Math-BigInt-FastCalc-0.5014.tar.gz/t/bigfltpm.inc
Changed
@@ -44,7 +44,8 @@ } elsif ($f eq "binf") { $try .= qq| \$x->binf("$args1");|; } elsif ($f eq "bone") { - $try .= qq| \$x->bone("$args1");|; + $try .= length($args1) ? qq| \$x->bone("$args1");| + : qq| \$x->bone();|; } elsif ($f eq "bstr") { $try .= qq| \$x->accuracy($args1); \$x->precision($args2);|; $try .= ' $x->bstr();'; @@ -524,8 +525,8 @@ -inf:10:NaN 1.2:10:0.3623577545 2.4:12:-0.737393715541 -0:10:1 -0:20:1 +0:10:1.000000000 +0:20:1.0000000000000000000 1:10:0.5403023059 1:12:0.540302305868 @@ -867,7 +868,7 @@ 0::1 -2::1 abc::1 -2:abc:1 +2::1 &bsstr +inf:inf
View file
_service:tar_scm:Math-BigInt-FastCalc-0.5012.tar.gz/t/bigintpm.inc -> _service:tar_scm:Math-BigInt-FastCalc-0.5014.tar.gz/t/bigintpm.inc
Changed
@@ -1415,13 +1415,12 @@ 2:-:-1 invalid:-:-1 invalid:+:1 -2:abc:1 3::1 &binf 1:+:inf 2:-:-inf -3:abc:inf +3:+inf:inf &is_nan 123:0 @@ -3359,23 +3358,6 @@ #-501234500:-4:-501235000 +12345000:4:12350000 -12345000:4:-12350000 -$round_mode("even") -+60123456789:5:60123000000 --60123456789:5:-60123000000 -+60123456789:9:60123456800 --60123456789:9:-60123456800 -+601234500:6:601234000 --601234500:6:-601234000 -#+601234500:-4:601234000 -#-601234500:-4:-601234000 -#-601234500:-9:0 -#-501234500:-9:0 -#-601234500:-8:0 -#-501234500:-8:0 -+1234567:7:1234567 -+1234567:6:1234570 -+12345000:4:12340000 --12345000:4:-12340000 $round_mode("common") +60123456789:5:60123000000 +60123199999:5:60123000000 @@ -3397,6 +3379,23 @@ -60123700000:5:-60124000000 -60123800000:5:-60124000000 -60123900000:5:-60124000000 +$round_mode("even") ++60123456789:5:60123000000 +-60123456789:5:-60123000000 ++60123456789:9:60123456800 +-60123456789:9:-60123456800 ++601234500:6:601234000 +-601234500:6:-601234000 +#+601234500:-4:601234000 +#-601234500:-4:-601234000 +#-601234500:-9:0 +#-501234500:-9:0 +#-601234500:-8:0 +#-501234500:-8:0 ++1234567:7:1234567 ++1234567:6:1234570 ++12345000:4:12340000 +-12345000:4:-12340000 &is_zero 0:1
View file
_service:tar_scm:Math-BigInt-FastCalc-0.5012.tar.gz/t/bigintpm.t -> _service:tar_scm:Math-BigInt-FastCalc-0.5014.tar.gz/t/bigintpm.t
Changed
@@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 4280 # tests in require'd file +use Test::More tests => 4278 # tests in require'd file + 20; # tests in this file use Math::BigInt only => 'FastCalc';
View file
_service:tar_scm:Math-BigInt-FastCalc-0.5012.tar.gz/t/biglog.t -> _service:tar_scm:Math-BigInt-FastCalc-0.5014.tar.gz/t/biglog.t
Changed
@@ -36,7 +36,6 @@ is($class->new(3)->bexp(), '20', "$class->new(3)->bexp()"); ############################################################################### -############################################################################### # Math::BigFloat tests ############################################################################### @@ -146,7 +145,7 @@ qq|$class->new("10")->bpow("0.6", 10)|); # blog should handle bigint input -is(Math::BigFloat::blog(Math::BigInt->new(100), 10), 2, "blog(100)"); +is(Math::BigFloat->blog(Math::BigInt->new(100), 10), 2, "blog(100)"); ############################################################################### # some integer results @@ -190,9 +189,9 @@ test_bpow('0.2', '0.41', 10, '0.5169187652'); -is($class->new("0.01")->bpow("28.4", 40)->bsstr(), - '1584893192461113485202101373391507013269e-96', - qq|$class->new("0.01")->bpow("28.4", 40)->bsstr()|); +is($class->new("0.1")->bpow("28.4", 40)->bsstr(), + '3981071705534972507702523050877520434877e-68', + qq|$class->new("0.1")->bpow("28.4", 40)->bsstr()|); # The following test takes too long. #is($class->new("2")->bpow("-1034.5", 40)->bsstr(), @@ -231,8 +230,6 @@ # all done -1; - ############################################################################### sub test_bpow {
View file
_service:tar_scm:Math-BigInt-FastCalc-0.5012.tar.gz/t/mbimbf.inc -> _service:tar_scm:Math-BigInt-FastCalc-0.5014.tar.gz/t/mbimbf.inc
Changed
@@ -417,17 +417,15 @@ $x->{_a} = 4; is($x->bnot(), -123400, q|$x->bnot()|); # not -1234001 -# both babs() and bneg() don't need to round, since the input will already -# be rounded (either as $x or via new($string)), and they don't change the -# value. The two tests below peek at this by using _a (illegally) directly +# to be consistent with other methods, babs() and bneg() also support rounding $x = $mbi->new(-123401); $x->{_a} = 4; -is($x->babs(), 123401, q|$x->babs()|); +is($x->babs(), 123400, q|$x->babs()|); $x = $mbi->new(-123401); $x->{_a} = 4; -is($x->bneg(), 123401, q|$x->bneg()|); +is($x->bneg(), 123400, q|$x->bneg()|); # test bdiv rounding to A and R (bug in v1.48 and maybe earlier versions) @@ -1293,7 +1291,7 @@ $try .= qq| \$y->accuracy($ya);| if $ya ne ''; $try .= qq| \$y->precision($yp);| if $yp ne ''; - $try .= ' $x->$f($y);'; + $try .= ' $x->' . $f . '($y);'; # print "trying $try\n"; $rc = eval $try;
View file
_service:tar_scm:Math-BigInt-FastCalc-0.5012.tar.gz/t/mbimbf.t -> _service:tar_scm:Math-BigInt-FastCalc-0.5014.tar.gz/t/mbimbf.t
Changed
@@ -7,7 +7,7 @@ use warnings; use Test::More tests => 712 # tests in require'd file - + 26; # tests in this file + + 52; # tests in this file use Math::BigInt only => 'FastCalc'; use Math::BigFloat; @@ -58,24 +58,71 @@ } foreach my $class (qw/Math::BigInt Math::BigFloat/) { - $class->accuracy(42); + my $x; - # $x gets A of 42, too! - my $x = $class->new(123); + # Accuracy - # really? - is($x->accuracy(), 42, '$x has A of 42'); + # set and check the class accuracy + $class->accuracy(1); + is($class->accuracy(), 1, "$class has A of 1"); - # $x has no A, but the global is still in effect for $x so the return value - # of that operation should be 42, not undef - is($x->accuracy(undef), 42, '$x has A from global'); + # a new instance gets the class accuracy + $x = $class->new(123); + is($x->accuracy(), 1, '$x has A of 1'); - # so $x should still have A = 42 - is($x->accuracy(), 42, '$x has still A of 42'); + # set and check the instance accuracy + $x->accuracy(2); + is($x->accuracy(), 2, '$x has A of 2'); - # reset for further tests + # change the class accuracy + $class->accuracy(3); + is($class->accuracy(), 3, "$class has A of 3"); + + # verify that the instance accuracy hasn't changed + is($x->accuracy(), 2, '$x still has A of 2'); + + # change the instance accuracy + $x->accuracy(undef); + is($x->accuracy(), undef, '$x now has A of undef'); + + # check the class accuracy + is($class->accuracy(), 3, "$class still has A of 3"); + + # change the class accuracy again $class->accuracy(undef); + is($class->accuracy(), undef, "$class now has A of undef"); + + # Precision + + # set and check the class precision + $class->precision(1); + is($class->precision(), 1, "$class has A of 1"); + + # a new instance gets the class precision + $x = $class->new(123); + is($x->precision(), 1, '$x has A of 1'); + + # set and check the instance precision + $x->precision(2); + is($x->precision(), 2, '$x has A of 2'); + + # change the class precision + $class->precision(3); + is($class->precision(), 3, "$class has A of 3"); + + # verify that the instance precision hasn't changed + is($x->precision(), 2, '$x still has A of 2'); + + # change the instance precision + $x->precision(undef); + is($x->precision(), undef, '$x now has A of undef'); + + # check the class precision + is($class->precision(), 3, "$class still has A of 3"); + + # change the class precision again $class->precision(undef); + is($class->precision(), undef, "$class now has A of undef"); } # bug with blog(Math::BigFloat, Math::BigInt)
View file
_service:tar_scm:Math-BigInt-FastCalc-0.5012.tar.gz/xt/author/lib-arithmetic-binary-_modinv.t -> _service:tar_scm:Math-BigInt-FastCalc-0.5014.tar.gz/xt/author/lib-arithmetic-binary-_modinv.t
Changed
@@ -81,8 +81,17 @@ plan tests => 1; - cmp_ok(scalar @got, "==", 0, - "'$test' gives two output args"); + # The output should ideally be nothing, but some backend libraries + # return two undefs. + + subtest 'output when no inverse exists' => sub { + plan tests => 1 + @got; + ok(@got == 0 || @got == 2, + "'$test' gives zero or two output args"); + for my $got (@got) { + is($got, undef, "'$test' output arg is undef"); + } + } } else {
View file
_service:tar_scm:Math-BigInt-FastCalc-0.5014.tar.gz/xt/author/lib_load-mbf-mbi.t
Added
@@ -0,0 +1,72 @@ +# -*- mode: perl; -*- + +use strict; +use warnings; + +use Test::More tests => 10; + +use lib "t"; + +# First load Math::BigFloat with Math::BigInt::Calc. + +use Math::BigFloat lib => "Calc"; + +is(Math::BigFloat -> config("lib"), "Math::BigInt::Calc", + 'Math::BigFloat -> config("lib")'); + +is(ref Math::BigFloat -> bzero() -> {_m}, "Math::BigInt::Calc", + 'ref Math::BigFloat -> bzero() -> {_m}'); + +# Math::BigInt will know that we loaded Math::BigInt::Calc. + +require Math::BigInt; + +is(Math::BigInt -> config("lib"), "Math::BigInt::Calc", + 'Math::BigInt -> config("lib")'); + +is(ref Math::BigInt -> bzero() -> {value}, "Math::BigInt::Calc", + "ref Math::BigInt -> bzero() -> {value}"); + +# Now load Math::BigFloat again with a different lib. + +Math::BigFloat -> import(lib => "BareCalc"); + +is(Math::BigFloat -> config("lib"), "Math::BigInt::Calc", + 'Math::BigFloat -> config("lib")'); + +is(ref Math::BigFloat -> bzero() -> {_m}, "Math::BigInt::Calc", + 'ref Math::BigFloat -> bzero() -> {_m}'); + +# See if Math::BigInt knows about Math::BigInt::BareCalc. + +is(Math::BigInt -> config("lib"), "Math::BigInt::Calc", + "Math::BigInt is using library Math::BigInt::Calc"); + +is(ref Math::BigInt -> bzero() -> {value}, "Math::BigInt::Calc", + "ref Math::BigInt -> bzero() -> {value}"); + +# See that Math::BigInt supports "only". + +eval { Math::BigInt -> import("only" => "Calc") }; +subtest 'Math::BigInt -> import("only" => "Calc")' => sub { + plan tests => 3; + + is($@, "", '$@ is empty'); + is(Math::BigInt -> config("lib"), "Math::BigInt::Calc", + 'Math::BigInt -> config("lib")'); + is(ref Math::BigInt -> bzero() -> {value}, "Math::BigInt::Calc", + "ref Math::BigInt -> bzero() -> {value}"); +}; + +# See that Math::BigInt supports "try". + +eval { Math::BigInt -> import("try" => "BareCalc") }; +subtest 'Math::BigInt -> import("try" => "BareCalc")' => sub { + plan tests => 3; + + is($@, "", '$@ is empty'); + is(Math::BigInt -> config("lib"), "Math::BigInt::Calc", + 'Math::BigInt -> config("lib")'); + is(ref Math::BigInt -> bzero() -> {value}, "Math::BigInt::Calc", + "ref Math::BigInt -> bzero() -> {value}"); +}
View file
_service:tar_scm:Math-BigInt-FastCalc-0.5014.tar.gz/xt/author/lib_load-mbi-mbf.t
Added
@@ -0,0 +1,72 @@ +# -*- mode: perl; -*- + +use strict; +use warnings; + +use Test::More tests => 10; + +use lib "t"; + +# First load Math::BigInt with Math::BigInt::Calc. + +use Math::BigInt lib => "Calc"; + +is(Math::BigInt -> config("lib"), "Math::BigInt::Calc", + 'Math::BigInt -> config("lib")'); + +is(ref Math::BigInt -> bzero() -> {value}, "Math::BigInt::Calc", + 'ref Math::BigInt -> bzero() -> {value}'); + +# Math::BigFloat will know that we loaded Math::BigInt::Calc. + +require Math::BigFloat; + +is(Math::BigFloat -> config("lib"), "Math::BigInt::Calc", + 'Math::BigFloat -> config("lib")'); + +is(ref Math::BigFloat -> bzero() -> {_m}, "Math::BigInt::Calc", + "ref Math::BigFloat -> bzero() -> {_m}"); + +# Now load Math::BigInt again with a different lib. + +Math::BigInt -> import(lib => "BareCalc"); + +is(Math::BigInt -> config("lib"), "Math::BigInt::Calc", + 'Math::BigInt -> config("lib")'); + +is(ref Math::BigInt -> bzero() -> {value}, "Math::BigInt::Calc", + 'ref Math::BigInt -> bzero() -> {value}'); + +# See if Math::BigFloat knows about Math::BigInt::BareCalc. + +is(Math::BigFloat -> config("lib"), "Math::BigInt::Calc", + "Math::BigFloat is using library Math::BigInt::Calc"); + +is(ref Math::BigFloat -> bzero() -> {_m}, "Math::BigInt::Calc", + "ref Math::BigFloat -> bzero() -> {_m}"); + +# See that Math::BigFloat supports "only". + +eval { Math::BigFloat -> import("only" => "Calc") }; +subtest 'Math::BigFloat -> import("only" => "Calc")' => sub { + plan tests => 3; + + is($@, "", '$@ is empty'); + is(Math::BigFloat -> config("lib"), "Math::BigInt::Calc", + 'Math::BigFloat -> config("lib")'); + is(ref Math::BigFloat -> bzero() -> {_m}, "Math::BigInt::Calc", + "ref Math::BigFloat -> bzero() -> {_m}"); +}; + +# See that Math::BigFloat supports "try". + +eval { Math::BigFloat -> import("try" => "BareCalc") }; +subtest 'Math::BigFloat -> import("try" => "BareCalc")' => sub { + plan tests => 3; + + is($@, "", '$@ is empty'); + is(Math::BigFloat -> config("lib"), "Math::BigInt::Calc", + 'Math::BigFloat -> config("lib")'); + is(ref Math::BigFloat -> bzero() -> {_m}, "Math::BigInt::Calc", + "ref Math::BigFloat -> bzero() -> {_m}"); +}
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2