Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#7819 closed defect (fixed)

RealInterval(+infinity,+infinity).is_int() blows up

Reported by: Robert Miller Owned by: Alex Ghitza
Priority: major Milestone: sage-4.3.1
Component: basic arithmetic Keywords:
Cc: Merged in: sage-4.3.1.alpha2
Authors: Robert Miller Reviewers: Karl-Dieter Crisman
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges


sage: RealInterval(+infinity,+infinity).is_int()
ValueError                                Traceback (most recent call last)

/Users/rlmill/.sage/temp/rlm_book.local/9535/ in <module>()

/Users/rlmill/sage-4.3/local/lib/python2.6/site-packages/sage/rings/ in sage.rings.real_mpfi.RealIntervalFieldElement.is_int (sage/rings/real_mpfi.c:16689)()

/Users/rlmill/sage-4.3/local/lib/python2.6/site-packages/sage/rings/ in sage.rings.real_mpfr.RealNumber.ceil (sage/rings/real_mpfr.c:14488)()

ValueError: Calling ceil() on infinity or NaN

Attachments (1)

trac_7819.patch (1.0 KB) - added by Robert Miller 13 years ago.

Download all attachments as: .zip

Change History (5)

Changed 13 years ago by Robert Miller

Attachment: trac_7819.patch added

comment:1 Changed 13 years ago by Robert Miller

Status: newneeds_review

comment:2 Changed 13 years ago by Karl-Dieter Crisman

Status: needs_reviewpositive_review

Positive review. By the way,

sage: a = RIF(3.9999999999999999999999999999999999,5.000000000000000000000000000000000)
sage: b = RIF(4.000000000000000000000000000000000,4.9999999999999999999999999999999999)
sage: a.is_int()
(False, None)
sage: b.is_int()
(False, None)

though I don't know if that's a bug (except in user input), since

sage: a.str(style='brackets')
'[3.9999999999999995 .. 5.0000000000000000]'
sage: b.str(style='brackets')
'[4.0000000000000000 .. 5.0000000000000000]'

but anyway wanted to point it out in case this is considered something that should be documented in is_int(), not just in RIF().

comment:3 Changed 13 years ago by Robert Miller

Merged in: 4.3.1.alpha2
Resolution: fixed
Reviewers: Karl-Dieter Crisman
Status: positive_reviewclosed

comment:4 Changed 13 years ago by Minh Van Nguyen

Merged in: 4.3.1.alpha2sage-4.3.1.alpha2
Note: See TracTickets for help on using tickets.