2024-06-26 07:21 AEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000146mercuryBugpublic2014-09-01 12:46
Assigned Tojuliensf 
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




juliensf (administrator)

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
Date Modified Username Field Change
2010-05-24 11:18 juliensf New Issue
2014-09-01 12:46 juliensf Note Added: 0000776
2014-09-01 12:46 juliensf Assigned To => juliensf
2014-09-01 12:46 juliensf Status new => assigned
+Issue History