error in comparison of pi

90 views
Skip to first unread message

Robert Samal

unread,
May 11, 2012, 4:58:53 AM5/11/12
to sage-s...@googlegroups.com
Hi!

By some random experiments I discovered the following weirdness:

sage: bool(pi<Infinity)
False
sage: bool(pi>Infinity)
True

So far it seems that pi < Infinity is the only misbehaving comparison: 

sage: bool(pi<2*pi)
True
sage: bool(2*pi<Infinity)
True
sage: bool(e<Infinity)  
True
sage: bool(e<pi)
True

Is this a bug or feature? :-)

Btw, should one report such things as bugs right away, or is it better to first "announce it" in this group? 

Best,
  Robert

P Purkayastha

unread,
May 11, 2012, 11:37:39 AM5/11/12
to sage-s...@googlegroups.com


On Friday, May 11, 2012 4:58:53 PM UTC+8, Robert Samal wrote:
Hi!

By some random experiments I discovered the following weirdness:

sage: bool(pi<Infinity)
False
sage: bool(pi>Infinity)
True

This looks like a bad bug. I think you can open tickets for things like this without announcing first. 

Robert Bradshaw

unread,
May 11, 2012, 3:34:26 PM5/11/12
to sage-s...@googlegroups.com
Did we ever decide on a standard label for mathematically incorrect
results? This shouldn't drop under the radar.
> --
> To post to this group, send email to sage-s...@googlegroups.com
> To unsubscribe from this group, send email to
> sage-support...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/sage-support
> URL: http://www.sagemath.org

kcrisman

unread,
May 11, 2012, 4:06:50 PM5/11/12
to sage-s...@googlegroups.com


On Friday, May 11, 2012 3:34:26 PM UTC-4, Robert Bradshaw wrote:
Did we ever decide on a standard label for mathematically incorrect
results? This shouldn't drop under the radar.



There is the "stopgap" terminology, but that's not what we called the incorrect result, that's for the stopgap ticket itself.
 
On Fri, May 11, 2012 at 8:37 AM, P Purkayastha <ppu...@gmail.com> wrote:
>
>
> On Friday, May 11, 2012 4:58:53 PM UTC+8, Robert Samal wrote:
>>
>> Hi!
>>
>> By some random experiments I discovered the following weirdness:
>>
>> sage: bool(pi<Infinity)
>> False
>> sage: bool(pi>Infinity)
>> True
>
>
> This looks like a bad bug. I think you can open tickets for things like this
> without announcing first.
>
> --
> To post to this group, send email to sage-s...@googlegroups.com
> To unsubscribe from this group, send email to
> sage-support+unsubscribe@googlegroups.com

Robert Bradshaw

unread,
May 11, 2012, 5:55:19 PM5/11/12
to sage-s...@googlegroups.com
Yeah, stopgap refers to the other ticket in case the bug is hard to
fix. How about "bogus" or "badmath"?

On Fri, May 11, 2012 at 1:06 PM, kcrisman <kcri...@gmail.com> wrote:
>
>
> On Friday, May 11, 2012 3:34:26 PM UTC-4, Robert Bradshaw wrote:
>>
>> Did we ever decide on a standard label for mathematically incorrect
>> results? This shouldn't drop under the radar.
>>
>
>
> There is the "stopgap" terminology, but that's not what we called the
> incorrect result, that's for the stopgap ticket itself.
>
>>
>> On Fri, May 11, 2012 at 8:37 AM, P Purkayastha <ppu...@gmail.com> wrote:
>> >
>> >
>> > On Friday, May 11, 2012 4:58:53 PM UTC+8, Robert Samal wrote:
>> >>
>> >> Hi!
>> >>
>> >> By some random experiments I discovered the following weirdness:
>> >>
>> >> sage: bool(pi<Infinity)
>> >> False
>> >> sage: bool(pi>Infinity)
>> >> True
>> >
>> >
>> > This looks like a bad bug. I think you can open tickets for things like
>> > this
>> > without announcing first.
>> >
>> > --
>> > To post to this group, send email to sage-s...@googlegroups.com
>> > To unsubscribe from this group, send email to
>> > sage-support...@googlegroups.com
>> > For more options, visit this group at
>> > http://groups.google.com/group/sage-support
>> > URL: http://www.sagemath.org
>
> --
> To post to this group, send email to sage-s...@googlegroups.com
> To unsubscribe from this group, send email to
> sage-support...@googlegroups.com

John H Palmieri

unread,
May 11, 2012, 8:01:38 PM5/11/12
to sage-s...@googlegroups.com


On Friday, May 11, 2012 2:55:19 PM UTC-7, Robert Bradshaw wrote:
Yeah, stopgap refers to the other ticket in case the bug is hard to
fix. How about "bogus" or "badmath"?

How about "blocker"?  :)

--
John

Robert Bradshaw

unread,
May 12, 2012, 1:39:15 AM5/12/12
to sage-s...@googlegroups.com
It's no longer (necessarily) a blocker once a stopgap has been assigned.

P Purkayastha

unread,
May 12, 2012, 4:02:31 AM5/12/12
to sage-s...@googlegroups.com
I think the "stopgap" was introduced for the case where Sage silently gives incorrect results.


On Saturday, May 12, 2012 4:06:50 AM UTC+8, kcrisman wrote:


On Friday, May 11, 2012 3:34:26 PM UTC-4, Robert Bradshaw wrote:
Did we ever decide on a standard label for mathematically incorrect
results? This shouldn't drop under the radar.



There is the "stopgap" terminology, but that's not what we called the incorrect result, that's for the stopgap ticket itself.
 
On Fri, May 11, 2012 at 8:37 AM, P Purkayastha <ppu...@gmail.com> wrote:
>
>
> On Friday, May 11, 2012 4:58:53 PM UTC+8, Robert Samal wrote:
>>
>> Hi!
>>
>> By some random experiments I discovered the following weirdness:
>>
>> sage: bool(pi<Infinity)
>> False
>> sage: bool(pi>Infinity)
>> True
>
>
> This looks like a bad bug. I think you can open tickets for things like this
> without announcing first.
>
> --
> To post to this group, send email to sage-s...@googlegroups.com
> To unsubscribe from this group, send email to
> sage-support...@googlegroups.com

Robert Bradshaw

unread,
May 12, 2012, 4:15:24 AM5/12/12
to sage-s...@googlegroups.com
Yes, I consider

sage: bool(pi<Infinity)
False

to be a silent, incorrect result. "stopgap" is a reference to a ticket
that makes the error non-silent.

P Purkayastha

unread,
May 12, 2012, 4:20:25 AM5/12/12
to sage-s...@googlegroups.com
I have been using it to flag silent, incorrect results :P

Daniel Krenn

unread,
May 18, 2012, 4:18:23 AM5/18/12
to sage-s...@googlegroups.com
This is now #12967.
Reply all
Reply to author
Forward
0 new messages