On Tue, Feb 24, 2015 at 9:56 AM, Ralf Stephan <[email protected]> wrote:
> On Tuesday, February 24, 2015 at 6:49:57 PM UTC+1, William wrote:
>> On Tue, Feb 24, 2015 at 9:31 AM, Ralf Stephan <[email protected]> wrote:
>> > On Saturday, April 28, 2012 at 6:40:55 PM UTC+2, Volker Braun wrote:
>> >>
>> >> The floating point "fields" in Sage (RR or RDF) can represent both
>> >> infinity and NaN. So you'll have to check separately if this is the
case.
>> >> Note that "x in RR" checks that x can be represented in RR.
>> >
>> >
>> > But then why is pi in RIF False?
>>
>> "x in S" doesn't mean "x is represented in S".  It is supposed to mean
>> that bool(x == S(x)) is True, i.e., there is something in S that is
>> equal to x using the usual equality in Sage.  In this case,
>>
>>    bool(RIF(pi) == pi)
>>
>> raises a TypeError, so "pi in RIF" is False.
>
> But RR == RR(pi) is False too so why is then pi in RR True?

~/support$ sage
┌────────────────────────────────────────────────────────────────────┐
│ Sage Version 6.5, Release Date: 2015-02-17                         │
│ Enhanced for SageMathCloud.                                        │
└────────────────────────────────────────────────────────────────────┘
sage: bool(RR(pi) == pi)
True



-- 
William (http://wstein.org)

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" 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-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to