DCIT / perl-CryptX

https://metacpan.org/pod/CryptX
Other
35 stars 23 forks source link

Minimum version of Math::BigInt required? #27

Closed veryrusty closed 7 years ago

veryrusty commented 7 years ago

Got the following test fails in CryptX v0.043 against an older Math::BigInt version (1.999715).

As there's no dependency specified on Math::BigInt, should the changes in #26 be backwards compatible with previous Math::BigInt versions ?

# Math::BigInt VERSION=1.999715
t/mbi_ltm_01load.t .................. ok

#   Failed test '$x = Math::BigFloat->new("0"); $Math::BigFloat::div_scale = 40; $x->bfac();'
#   at t/mbi_ltm/bigfltpm.inc line 168.
#          got: '0'
#     expected: '1'
# Looks like you failed 1 test of 2414.
t/mbi_ltm_bigfltpm.t ................
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/2414 subtests
        (less 1 skipped subtest: 2412 okay)
t/mbi_ltm_bigintg.t ................. ok

#   Failed test '$x = Math::BigInt->new("+0"); $y = Math::BigInt->new("+0"); Math::BigInt::blcm($x, $y);'
#   at t/mbi_ltm/bigintpm.inc line 202.
#          got: 'NaN'
#     expected: '0'
# Looks like you failed 1 test of 3730.
t/mbi_ltm_bigintpm.t ................
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/3730 subtests
        (less 50 skipped subtests: 3679 okay)
karel-m commented 7 years ago

The intent is: be backwards compatible with previous Math::BigInt versions

The blcm part was a trouble with test. But _fac part was a bug.

cc @pjacklam - I had to change _fac from Math::BigInt::Lib like this: 63c591cedfd3 I am not sure if the same patch should be applied to Math::BigInt::Lib as well.

Anyway CryptX-0.044 is on its way to CPAN.

karel-m commented 7 years ago

cpantesters reports for v0.044 are all green http://matrix.cpantesters.org/?dist=CryptX+0.044

closing

veryrusty commented 7 years ago

Thanks for the quick response @karel-m