Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#7819 closed defect (fixed)

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

Reported by: rlm Owned by: AlexGhitza
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

Description

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

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

/Users/rlmill/sage-4.3/local/lib/python2.6/site-packages/sage/rings/real_mpfi.so 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/real_mpfr.so 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 rlm 12 years ago.

Download all attachments as: .zip

Change History (5)

Changed 12 years ago by rlm

comment:1 Changed 12 years ago by rlm

  • Status changed from new to needs_review

comment:2 Changed 12 years ago by kcrisman

  • Status changed from needs_review to positive_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 12 years ago by rlm

  • Merged in set to 4.3.1.alpha2
  • Resolution set to fixed
  • Reviewers set to Karl-Dieter Crisman
  • Status changed from positive_review to closed

comment:4 Changed 12 years ago by mvngu

  • Merged in changed from 4.3.1.alpha2 to sage-4.3.1.alpha2
Note: See TracTickets for help on using tickets.