#12967: bugs in comparisons between constants, wrapped pyobjects, infinity
-------------------------------------+-------------------------------------
       Reporter:  dkrenn             |        Owner:  burcin
           Type:  defect             |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-6.6
      Component:  symbolics          |   Resolution:
       Keywords:  compare pi         |    Merged in:
  infinity bool                      |    Reviewers:  Karl-Dieter Crisman
        Authors:  Travis Scrimshaw,  |  Work issues:
  Ralf Stephan                       |       Commit:
Report Upstream:  N/A                |  c5845f6b18d582807dafaaf60ad6a5c8017173f3
         Branch:  u/rws/12967-2      |     Stopgaps:
   Dependencies:  #17984             |
-------------------------------------+-------------------------------------

Comment (by pbruin):

 Replying to [comment:37 mmezzarobba]:
 > Replying to [comment:35 pbruin]:
 > > `bool(pi == 3.14[...])` returns `True` if the approximation is correct
 to the given precision?
 >
 > This sounds very dangerous to me.
 In fact, `bool(pi == pi.n())` already returns `True`, which I think is
 reasonable.  In any case it is consistent with how elements of real fields
 of different precisions are compared.

 The question is whether we also want to use this for `x in RR`.  I
 currently cannot think of a natural way of implementing this.  Just
 checking whether `x` can be converted in to `RR` is not enough (as the
 example with `Mod(1, 2)` in comment:35 shows); one would at least expect
 that `x` can be converted into `RR` ''and'' that the result is
 "sufficiently equal" to the original `x`.

--
Ticket URL: <http://trac.sagemath.org/ticket/12967#comment:41>
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.

Reply via email to