View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0000146 | mercury | Bug | public | 2010-05-24 11:18 | 2014-09-01 12:46 | ||||||||
Reporter | juliensf | ||||||||||||
Assigned To | juliensf | ||||||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||||||
Status | assigned | Resolution | open | ||||||||||
Product Version | |||||||||||||
Target Version | Fixed in Version | ||||||||||||
Summary | 0000146: inf and Nan | ||||||||||||
Description | The following is from the BUGS file in the Mercury distribution. -------- Subject: bug report - Inf and NaN Date: Wed, 4 Oct 1995 02:48:19 +1000 (EST) The following module causes an "undefined variable Inf" error in the generated C code, because 1E400 == Infinity, which gets printed as `Inf'. :- module hello. :- interface. :- import_module io. :- pred main(io__state::di, io__state::uo) is det. :- implementation. main --> io__write_float(1E400), io__write_string("\n"). | ||||||||||||
Tags | No tags attached. | ||||||||||||
Attached Files |
|
Notes | |
juliensf (administrator) 2014-09-01 12:46 |
The upcoming change to better support infinities in the standard library should allow us to fix this. The idea is to check whether float constants are infinity and if so replace them with a call to float.infinity or -float.infinity (as appropriate). |