You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CryptX fails at some test when built against Math::BigInt >= 1.999840
# Math::BigInt VERSION=1.999841
t/mbi_ltm_01load.t .................. ok
# Failed test '$x = Math::BigFloat->new("1"); $y = Math::BigFloat->new("1"); $x >> $y;'
# at ./t/mbi_ltm/bigfltpm.inc line 168.
# got: '0'
# expected: '0.5'
# Failed test '$x = Math::BigFloat->new("123"); $y = Math::BigFloat->new("1"); $x >> $y;'
# at ./t/mbi_ltm/bigfltpm.inc line 168.
# got: '61'
# expected: '61.5'
# Failed test '$x = Math::BigFloat->new("2"); $y = Math::BigFloat->new("18.2"); $x <<= $y; $x->copy()->bfround(-9);'
# at ./t/mbi_ltm/bigfltpm.inc line 502.
# got: '524288.000000000'
# expected: '602248.763144685'
# Looks like you failed 3 tests of 2396.
t/mbi_ltm_bigfltpm.t ................
Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/2396 subtests
(less 1 skipped subtest: 2392 okay)
t/mbi_ltm_bigintg.t ................. ok
# Failed test '$x = Math::BigInt->new("+8"); $y = Math::BigInt->new("-2"); $x << $y;'
# at ./t/mbi_ltm/bigintpm.inc line 202.
# got: '2'
# expected: 'NaN'
# Failed test '$x = Math::BigInt->new("+1234"); $y = Math::BigInt->new("-3"); $x->blsft($y, 10);'
# at ./t/mbi_ltm/bigintpm.inc line 202.
# got: '1'
# expected: 'NaN'
# Failed test '$x = Math::BigInt->new("+2"); $y = Math::BigInt->new("-2"); $x >> $y;'
# at ./t/mbi_ltm/bigintpm.inc line 202.
# got: '8'
# expected: 'NaN'
# Failed test '$x = Math::BigInt->new("+1234"); $y = Math::BigInt->new("-3"); $x->brsft($y, 10);'
# at ./t/mbi_ltm/bigintpm.inc line 202.
# got: '1234000'
# expected: 'NaN'
# Looks like you failed 4 tests of 3718.
t/mbi_ltm_bigintpm.t ................
Dubious, test returned 4 (wstat 1024, 0x400)
Failed 4/3718 subtests
(less 50 skipped subtests: 3664 okay)
From Math::BigInt 1.999840 changelog:
Add methods bblsft() and bbrsft(), which do bitwise left and right shift,
respectively. The binary operators for bitwise left and right shift, "<<"
and ">>", now call the methods bblsft() and bbrsft(), respectively.
While this behaviour is consistent with how "<<" and ">>" work on floating
point numbers in core Perl, it changes how "<<" and ">>" worked on
Math::BigFloat objects. This is a corner case, but any code currently using
"<<" and ">>" on Math::BigFloat objects might need to be modified as follows
$x >>= $y should be changed to $x -> brsft($y)
$x <<= $y should be changed to $x -> blsft($y)
$x >> $y should be changed to $x -> copy() -> brsft($y)
$x << $y should be changed to $x -> copy() -> blsft($y)
Thanks for the quick answer. I confirm that 62fde62 fixes the issue.
However, I believe t/mbi_ltm_since_1.999842.t should be run for Math::BigInt 1.999840 and later, and thus be renamed and tweaked accordingly.
Hi,
CryptX fails at some test when built against Math::BigInt >= 1.999840
From Math::BigInt 1.999840 changelog:
Add methods bblsft() and bbrsft(), which do bitwise left and right shift,
respectively. The binary operators for bitwise left and right shift, "<<"
and ">>", now call the methods bblsft() and bbrsft(), respectively.
While this behaviour is consistent with how "<<" and ">>" work on floating
point numbers in core Perl, it changes how "<<" and ">>" worked on
Math::BigFloat objects. This is a corner case, but any code currently using
"<<" and ">>" on Math::BigFloat objects might need to be modified as follows
This was initially reported by Petr Pisar at: https://bugzilla.redhat.com/show_bug.cgi?id=2240587
The text was updated successfully, but these errors were encountered: