#19568: arb balls should have the precision of the parent
-------------------------------------+-------------------------------------
Reporter: jdemeyer | Owner:
Type: defect | Status: needs_review
Priority: major | Milestone: sage-6.10
Component: interfaces | Resolution:
Keywords: | Merged in:
Authors: Jeroen Demeyer | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/jdemeyer/arb_balls_should_have_the_precision_of_the_parent|
638f7f581a72056c39d013e4b46cce500176a710
Dependencies: #19152 | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by jdemeyer):
Replying to [comment:15 mmezzarobba]:
> Incidentally, I don't see how “`arb` handles precision in a way which is
completely different from anything else in Sage”.
OK, let me explain: in `arb`, parents have a precision. Also elements have
a precision, which can be ''different'' from the precision of the parent.
But, when doing any operation, the result gets rounded to the precision of
the parent. There is nothing in Sage which works this way.
This leads to things like
{{{
sage: from sage.rings.real_arb import RBF
sage: a = RBF(3^100)
sage: a.identical(a+0)
False
}}}
I don't know any Sage ring element which changes when adding `0`.
The difference with `PowerSeriesRing` is that the parent doesn't have a
precision, only a ''default'' precision. A `PowerSeriesRing` can contain
elements of any precision and that precision is taken into account when
doing arithmetic:
{{{
sage: R.<x> = PowerSeriesRing(QQ)
sage: a = x + O(x^30); a
x + O(x^30)
sage: a + 0
x + O(x^30)
sage: a = x + O(x^10); a
x + O(x^10)
sage: a + 0
x + O(x^10)
}}}
The equivalent of what `arb` currently does would be
{{{
sage: R.<x> = PowerSeriesRing(QQ)
sage: a = x + O(x^30); a
x + O(x^30)
sage: a + 0
x + O(x^20)
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/19568#comment:19>
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.