Ticket #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: | Work issues: | ||
| Report Upstream: | N/A | Reviewers: | Karl-Dieter Crisman |
| Authors: | Robert Miller | Merged in: | sage-4.3.1.alpha2 |
| Dependencies: | Stopgaps: |
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
Change History
comment:2 Changed 3 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().
Note: See
TracTickets for help on using
tickets.

