This has been brought up before. See
https://github.com/sympy/sympy/issues/7765 and
https://github.com/sympy/sympy/issues/8451.  I don't remember if there was
ever a good reason to keep Float('inf') as a separate object from oo.

Aaron Meurer

On Wed, Feb 4, 2015 at 10:39 AM, Kevin Ventullo <[email protected]>
wrote:

> By the way, this is not just an intellectual curiosity: right now if you
> ask Sympy what is the probability a uniform random variable on [0,1]
> (defined with Uniform) is less than 0.5, you get an error which boils down
> to these comparisons. See https://github.com/sympy/sympy/issues/8910
>
> On Sunday, February 1, 2015 at 10:36:45 PM UTC-5, Kevin Ventullo wrote:
>>
>> Hi,
>>
>> I posted about this on GitHub but haven't gotten much of a response.
>> Right now there are two seemingly mathematically equivalent notions of
>> positive and negative infinity on the real line:
>>
>> -The singleton sympy.core.numbers.Infinity, also known as "oo"
>> -Float("inf"), also known as "+inf"
>>
>> When trying to compare one of these to the other, we get inconsistent
>> results, e.g.
>>
>> -oo < -inf
>>
>> will be left unevaluated but
>>
>> -inf > -oo
>>
>> returns False.
>>
>> I guess both of these should be False. However, we also have
>>
>> oo == x is False, but
>> x == oo is True.
>>
>> Which of these is correct? Both of them?
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "sympy" 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/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/6e068b72-4c52-4b96-b01e-2a7c1bcbbe7e%40googlegroups.com
> <https://groups.google.com/d/msgid/sympy/6e068b72-4c52-4b96-b01e-2a7c1bcbbe7e%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" 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/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAKgW%3D6KwEmgLN6RUfY8kjVwrugE7GyAZnu6SkDAF3o%2BpBPOUKw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to