# Ticket #7819(closed defect: fixed)

Opened 3 years ago

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

Reported by: Owned by: rlm AlexGhitza major sage-4.3.1 basic arithmetic N/A Karl-Dieter Crisman Robert Miller sage-4.3.1.alpha2

### 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
```

## Change History

### comment:1 Changed 3 years ago by rlm

• Status changed from new to needs_review

### 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().

### comment:3 Changed 3 years ago by rlm

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

### comment:4 Changed 3 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.