#4000: [with patch, needs work] Implement QQ['x'] via Flint ZZ['x'] +
denominator
------------------------------+---------------------------------------------
Reporter: malb | Owner: somebody
Type: enhancement | Status: new
Priority: major | Milestone: sage-wishlist
Component: basic arithmetic | Keywords:
Reviewer: | Author: Martin Albrecht
Merged: |
------------------------------+---------------------------------------------
Comment(by malb):
Replying to [comment:17 spancratz]:
> Since the gcd of two polynomials is only defined up to multiplication by
rationals, what's the *right* way of dealing with this? I think one can
make a good argument for always returning the same normalisation. This
would also mean that we do *not* necessarily have gcd(a,0) == a. This is
currently the way it's handled in the file polynomial_template.pxi. If we
want to normalise the gcd, in which way should this be done? If it's non-
zero..
I think we should have {{{gcd(a,0) = 1}}} because this is what
{{{gcd(1/2,0)}}} returns. I would like to avoid to put this logic in the
celement_gcd implementations but if we have to then ... well we have to :)
> Personally though, I am more in favour of the second option, since this
might lead to faster code when working with QQ[]. In this case, we should
remove the handling of the above two cases from the template file and
always pass the call on to celement_gcd. This would mean that we leave
the normalisation up to the actual implementation of the polynomial ring,
rather than enforcing it across all base rings using the template file.
We would then also have to make sure that all celement_gcd methods are
happy to deal with zero arguments.
This might be worth raising on [sage-devel] where people care much more
about this than I do, i.e. I guess it is a relevant corner case for number
theory and thus people might have strong feelings about it?
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4000#comment:19>
Sage <http://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 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-trac?hl=en
-~----------~----~----~----~------~----~------~--~---