#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:
-------------------------------------+-------------------------------------
Old description:
> The fact that `arb` balls can have a precision different from their
> parent is really confusing. It's different from anything else in Sage and
> leads to strange things like
> {{{
> sage: from sage.rings.real_arb import RealBallField
> sage: sage: from sage.rings.real_arb import RealBallField
> sage: sage: a = RealBallField(20)(1.3)
> sage: sage: b = RealBallField(53)(1.3)
> sage: a.identical(b)
> True
> sage: (a+0).identical(b+0)
> False
> }}}
New description:
The fact that `arb` balls can have a precision different from their parent
is really confusing. It's different from anything else in Sage and leads
to strange things like
{{{
sage: from sage.rings.real_arb import RealBallField
sage: sage: from sage.rings.real_arb import RealBallField
sage: sage: a = RealBallField(20)(1.3)
sage: sage: b = RealBallField(53)(1.3)
sage: a.identical(b)
True
sage: (a+0).identical(b+0)
False
}}}
I propose to handle precision in `arb` the same way as for example `RR` or
`RIF`. This means that the precision is determined by the parent: an
element has the precision of its parent.
--
Comment (by jdemeyer):
Replying to [comment:13 vbraun]:
> But if a Sage arb computation doesn't map directly to a libarb
computation then I'd be very confused.
This ticket isn't really about whether or not a Sage computation maps to a
libarb computation. It's more about ''how'' it maps to a libarb
computation.
More precisely, it's about the meaning of precision: currently, `arb`
handles precision in a way which is completely different from anything
else in Sage (the precision of an element can be different from the
precision of the parent). This has consequences such as `a` and `a + 0`
not always being the same.
On this ticket, I propose to handle precision in `arb` the same way as for
example `RR` or `RIF`. This means that the precision is determined by the
parent: an element has the precision of its parent.
--
Ticket URL: <http://trac.sagemath.org/ticket/19568#comment:14>
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.