On Feb 3, 2007, at 12:14 PM, Joel B. Mohler wrote:
> Here's an annoying bug in an edge case. It appears that PARI (the > QQ case > below) computes the resultant correctly for a constant polynomial > with itself > and NTL (the ZZ case below) computes it incorrectly. I'm not > really sure > what the correct fix would be. I guess it's a small bug in NTL, but I > haven't looked at that code yet. Should I be fixing this in NTL > (eek, I > haven't touched that code!) or making a special case? > > sage: P=PolynomialRing(QQ,'t') > sage: f=P(1) > sage: f.resultant(f) > 1 > sage: P=PolynomialRing(ZZ,'t') > sage: f=P(1) > sage: f.resultant(f) > 0 If it really is a bug in NTL, you should report it to Victor Shoup (the author of NTL). You won't get a fix too quickly, so you might also want to rewrite the SAGE code to translate to PARI and then back to NTL. It's going to be slow, but the Z[x] class will be rewritten using FLINT fairly soon, so it's not a long term problem. David --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---
