#10771: gcd and lcm for fraction fields
--------------------------------+-------------------------------------------
Reporter: SimonKing | Owner: AlexGhitza
Type: defect | Status: needs_work
Priority: major | Milestone: sage-4.7
Component: basic arithmetic | Keywords: gcd lcm fraction fields
Author: Simon King | Upstream: N/A
Reviewer: Marco Streng | Merged:
Work_issues: |
--------------------------------+-------------------------------------------
Comment(by SimonKing):
I suggest to do the following, which would generalize the current attempt
to convert stuff into `ZZ`:
{{{
For inexact fields, evaluation in the prime subfield is
attempted::
sage: lcm(15.2,12.0); lcm(15.2,12.0).parent()
228
Rational Field
sage: RR(76/5)
15.2000000000000
sage: lcm(76/5,12)
228
If this fails, we resort to the default we see above::
sage: lcm(6.0*CC.0,8*CC.0); lcm(6.0*CC.0,8*CC.0).parent()
1.00000000000000
Complex Field with 53 bits of precision
}}}
Similarly for gcd.
In that way, the first of the three doctest failures vanishes. But the
other two remain problems.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10771#comment:16>
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 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.