#17984: Dedicated RR.__contains__() and CC.__contains__()
-------------------------+-------------------------------------------------
Reporter: rws | Owner:
Type: | Status: needs_review
enhancement | Milestone: sage-6.6
Priority: major | Resolution:
Component: basic | Merged in:
arithmetic | Reviewers:
Keywords: | Work issues:
Authors: Ralf | Commit:
Stephan | 544450ea18ed2778953141bab8feced61237556e
Report Upstream: N/A | Stopgaps:
Branch: |
u/rws/17984 |
Dependencies: |
-------------------------+-------------------------------------------------
Comment (by pbruin):
Replying to [comment:24 rws]:
> Replying to [comment:20 pbruin]:
> > Hence I am tending towards the opinion that if `x` is some exact
element, then `bool(RR(x) == x)` should return `True` if and only if `x`
is exactly representable in `RR`.
> Can you please help me with this definition? In my understanding an
exact representation has infinite precision (or another bit of information
that makes it different from an inexact element). But everything in `RR`
has finite `precision()`, even `oo` and `NaN` which by definition are
special.
Elements of `RR` (except infinities and `NaN`) are certain fractions whose
numerator and denominator are bounded and whose denominator is a power of
2. Hence 1/16 is representable in `RR`, but 1/3 is not.
Different people have different viewpoints about this, but above I was
thinking of elements of `RR` (again except infinities and `NaN`) as
exactly representing a certain subset of (mathematical) real numbers. The
interpretation "an element of `RR` is a real number with some error" is
just interpretation. One could say that what is inexact about `RR` are
not the elements themselves, but the operations; rounding has to take
place because this subset is not closed under the usual operations.
A related `sage-devel` discussion: https://groups.google.com/forum/#!topic
/sage-devel/1gPkeL_X5dw
--
Ticket URL: <http://trac.sagemath.org/ticket/17984#comment:25>
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.