Mercury Bugs - mercury
View Issue Details
0000146mercuryBugpublic2010-05-24 11:182014-09-01 12:46
Assigned Tojuliensf 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000146: inf and Nan
DescriptionThe 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 -->
TagsNo tags attached.
Attached Files

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

Issue History
2010-05-24 11:18juliensfNew Issue
2014-09-01 12:46juliensfNote Added: 0000776
2014-09-01 12:46juliensfAssigned To => juliensf
2014-09-01 12:46juliensfStatusnew => assigned