2024-04-19 22:30 AEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000146mercuryBugpublic2014-09-01 12:46
Reporterjuliensf 
Assigned Tojuliensf 
PrioritynormalSeverityminorReproducibilityalways
StatusassignedResolutionopen 
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 -->
        io__write_float(1E400),
        io__write_string("\n").
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0000776

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

-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