2024-07-16 01:14 AEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000373mercuryBugpublic2016-02-24 09:44
Assigned To 
Product Version 
Target Version15.11Fixed in Version 
Summary0000373: string.to_float imprecisely specified
Descriptionstring.to_float does not explicitly describe the literals that it will accept, and may be backend dependent. As it is, it goes beyond Mercury float literals and that accepted by parsing_utils.float_literal_as_string.


"1" (missing fractional part and exponent)
"+1" (leading plus)
".1" (leading dot)
TagsNo tags attached.
Attached Files




juliensf (administrator)

There is no "may" about it. It *is* backend dependent.


juliensf (administrator)

A fix for this issue should also address the question of whether string.to_float("-0") is equal to 0.0 or -0.0?
The C back-ends** and C#/Java back-ends currently disagree on this.

** at least on OS X, with clang and BSD libc etc.

-Issue History
Date Modified Username Field Change
2015-01-13 17:40 wangp New Issue
2015-01-13 18:12 juliensf Note Added: 0000803
2015-10-29 14:47 pbone Target Version => 15.11
2016-02-24 09:44 juliensf Note Added: 0000883
+Issue History