-
Notifications
You must be signed in to change notification settings - Fork 23
test failures with latest bleadperl #61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Also reported to the bignum queue as https://rt.cpan.org/Ticket/Display.html?id=141772 |
Confirmed that it's caused by the upgrade to bignum-0.64. |
Ah, from the https://metacpan.org/dist/bignum/changes at v0.60:
|
The failing test script works fine with bignum-0.64 if the constant
I guess it's just that integer division is required here, not floating-point division. However, even with bignum-0.51, I was surprised to see:
$x and $y are Math::BigInt objects, but floating-point division has apparently been done, and a Math::BigFloat object returned.
I suspect that one or both of these objectives have been defeated by the fact that the constants are now starting off as Math::BigFloat objects, not as the expected Math::BigInt objects. UPDATE: I think that this problematic test script should |
Digging a bit more, I find that it is actually hanging in
I guess that depends on what it's actually trying to test - the testfile was introduced at 2990405, presumably because some MPU users were using bignum in their code. Before the change in bignum-0.60, I think using bignum was probably a perfectly reasonable thing to do. |
Arguably a/the bug here is actually |
Some years ago I changed |
Upgrading and downgrading is now disabled by default. The functionality is still present, but now it must be enabled explicitly. The original author (TELS) considered the functionality experimental. The documentation in
The functionality for upgrading and downgrading is buggy and inconsistent. It can cause numbers to be upgraded and downgraded in an endless loop – in addition to other problems. After spending countless hours trying to fix upgrading/downgrading stuff, I gave up. Now, with |
Update; I posted this before I saw @pjacklam's post above. But I don't see any need for me to correct this post - except perhaps for where I've said that "BigInts can be promoted to "BigFloats". Firstly, if you're going to overload Secondly, given that under the bignum pragma, BigInts can be promoted to BigFloats, I don't think anyone can complain that an integer constant is assigned to a Math::BigFloat. In short, @pjacklam, I don't see any need for you to change anything further. However, I do not always look at things correctly. @hvds ++ for the thorough digging. |
@danaj I hope you have a chance to look at this and decide on a course of action. Currently, the test suite will hang only for people that have upgraded their bignum package to v0.60 or later; but perl-5.36 is due before long, and the test suite will hang for everyone on that perl (assuming it ships with bignum-0.64 as currently merged). Given @pjacklam's comments above it seems unlikely that anything will change in bignum or Math::BigFloat in this regard, so I'd suggest releasing MPU-0.74 with only the minimal changes required to get around this problem - given the size of the backlog currently in github, if that all ends up getting released as 0.74 it'll leave people nothing to fall back to if it causes problems. |
One option is to revert the changes in |
A |
Sorry for being so late to this. This test script is finding errors as it is meant to, even though it sure would be easier to not test for these things :). As hvds commented, it's intentionally using bignum which we assume creates a BigFloat that also will return true for This test is passing for the code on github for me. The test is calling straight into the Pollard Rho function, bypassing the usual front end. The CPAN code does validation in the factor front end but not in the individual factoring algorithm functions. The github code adds validation in the individual functions. |
Sorry it has taken time, but I've been busy (job, family, children, …). I'll try to get this finished in time. My goals are
|
The odd thing is that, as @danaj pointed out, the code in the Math-Prime-Util github repo is working fine. I had expected that @danaj would release that version from the github repo onto CPAN, and that would be the end of it. Hopefully, he can still find time to do that before the release of 5.36 - and relieve the pressure on @pjacklam . Cheers, |
Apologies again, unfortunate vacation timing. I will work on getting a trial release on cpan this week. |
Thanks all, glad to know it hasn't fallen off the radar. |
I've got a new version of the |
I have uploaded bignum-0.65 and its dependencies Math-BigInt-1.999830 and Math-BigRat-0.2621 to PAUSE. They work fine with Math::Prime::Util as far as I can tell. |
Super, I can confirm that I was able to build and install the following (in this order) without problems:
|
bignum-0.65 has been merged to bleadperl, closing Perl/perl5/#19539. I assume this ticket should stay open for now: if I understand @danaj's comments correctly, it showed up at least one bug in MPU. It would presumably also be useful if MPU could avoid hanging on its tests for anyone that happens to have the prior bignum release installed (though that might be as simple as adding a dependency on bignum-0.65). |
Uh oh!
There was an error while loading. Please reload this page.
cpan-testers is showing all fails for perl-5.35.8 and .9. I'm not sure, but "Wstat 24" may mean that it received:
I note that perl got an update to bigint-0.64 around that time, so I suspect the problem lies there, this is just a heads up with 5.36 due shortly.
[update: fixed url markup]
The text was updated successfully, but these errors were encountered: