#4702: [with patch, needs work] improve magma interface coverage
-----------------------------+----------------------------------------------
Reporter: ncalexan | Owner: was
Type: enhancement | Status: new
Priority: major | Milestone: sage-3.2.2
Component: interfaces | Resolution:
Keywords: magma interface |
-----------------------------+----------------------------------------------
Changes (by was):
* summary: [with patch, needs review] improve magma interface coverage
=> [with patch, needs work] improve magma
interface coverage
Comment:
REFEREE REPORT:
All the code looks good. I doctested the whole tree and there are several
doctests failures in free_module.py, but no other doctest failures.
Nick, could you "explain" this behavior
{{{
sage: a = RR(pi)
sage: a
3.14159265358979
sage: magma(a)
3.14159265358979
sage: a = RR(pi)
sage: b = magma(a)
sage: b
3.14159265358979
sage: b.Parent()
Real field of precision 15
sage: b._sage_()
3.1415926535898
sage: b._sage_().parent()
Real Field with 49 bits of precision
}}}
I.e., why precision is lost in going back and forth. Technically, it's
not a priori necessary to loose bits, is it?
Another remark -- the MagmaElement objects all have a sage method, so you
can do
{{{
sage: b.sage()
}}}
instead of {{{b._sage_()}}} in doctests, which likely sets a better
example.
This is a superb patch. I read carefully through the rest and I'm happy
with
everything. I just want a short discussion about precision issues (going
back and forth) and strategies, and fixing of the free_module.py doctests.
By the way, Sage numbers I think don't print all their decimal digits by
default. This a feature that Carl Witty added about a year ago, and may
be responsible for the precision loss going back and forth.
William
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4702#comment:2>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---