2024-11-22 00:09 AEDT

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000373mercuryBugpublic2016-02-24 09:44
Reporterwangp 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
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.

Examples:

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

-Relationships
+Relationships

-Notes

~0000803

juliensf (administrator)

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

~0000883

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

-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