#17671: gcd and xgcd over fields, PID and UFD
-------------------------------------+-------------------------------------
Reporter: vdelecroix | Owner:
Type: defect | Status: needs_review
Priority: major | Milestone: sage-6.5
Component: basic arithmetic | Resolution:
Keywords: | Merged in:
Authors: Vincent Delecroix | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/vdelecroix/17671 | c6db5f832b23d29026019de5306472a25e591279
Dependencies: #17673, #17675 | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by vdelecroix):
Replying to [comment:21 bruno]:
> Salut Vincent,
>
> I looked at #17673, but I am unable to review it since it goes beyond my
knowledge in Sage... Or at least it will take some time for me to
understand it and then review.
>
> Concerning the real number, I would have thought of an implementation
acting as follows:
> {{{#!python
> sage: gcd(2.0,6.0)
> 2.00000000000000
> }}}
Why? Would you like it to be nice only over ZZ and not over QQ? And this
is where it becomes impossible. Within Sage any floating point can be
converted to QQ...
{{{
sage: QQ(1.1231938951)
155072989/138064309
}}}
So the only way I would agree with your proposition is to have also
{{{
sage: gcd(RR(5/2), RR(3/2)) == RR(gcd(5/2, 3/2))
}}}
which is currently False as well.
Anyway mixing algebraic functions (like gcd) with floating point number is
often a bad idea. So at least the proposed implementation tells you that
something is wrong.
Vincent
--
Ticket URL: <http://trac.sagemath.org/ticket/17671#comment:22>
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.