#15808: Remove genus2reduction
-------------------------------------+-------------------------------------
Reporter: jdemeyer | Owner:
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.4
Component: packages: | Resolution:
standard | Merged in:
Keywords: | Reviewers:
Authors: Jeroen Demeyer | Work issues:
Report Upstream: N/A | Commit:
Branch: | 1068fef87401f820747d4f938a56d2429afbe4b0
public/ticket/15808 | Stopgaps:
Dependencies: #15767 |
-------------------------------------+-------------------------------------
Comment (by pbruin):
I'm not absolutely sure either, but from the last bit of PARI code you
quoted, the following change seems to stay closer to the original:
{{{
#!diff
diff --git a/src/sage/interfaces/genus2reduction.py
b/src/sage/interfaces/genus2reduction.py
index 73d41d6..01c4019 100644
--- a/src/sage/interfaces/genus2reduction.py
+++ b/src/sage/interfaces/genus2reduction.py
@@ -514,9 +514,9 @@ class Genus2reduction(SageObject):
minimal_disc = QQ(res[2].poldisc()).abs()
if minimal_equation.degree() == 5:
minimal_disc *= minimal_equation[5]**2
- # Multiply with suitable power of 2 of the form 2^(2*(d-1) - 12)
+ # Multiply with suitable power of 2 of the form 2^(2*d - 12)
b = 2 * (minimal_equation.degree() - 1)
- k = QQ((12 - minimal_disc.valuation(2), b)).ceil()
+ k = min(a.valuation(2) for a in Q**2 + 4*P) & ~1
minimal_disc >>= 12 - b*k
minimal_disc = ZZ(minimal_disc)
}}}
This does not affect any doctests in `genus2reduction.py`.
--
Ticket URL: <http://trac.sagemath.org/ticket/15808#comment:15>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.