runtime/mercury_float.c:
Fix a bug in MR_sprintf_float where it would convert 1.8e-10
into "1.80000000000000e-1" instead of "1.8e-10".
The problem was that it was stripping the zeros off the end of the string
produced by sprintf without considering the case where the output
was in scientific notation.
The fix is to remove the `#' from the sprintf format string and then to
append ".0" to the string if there is no "." or "e".
tests/general/float_roundtrip.m:
tests/general/float_roundtrip.exp:
Add regression test.
tests/hard_coded/deep_copy.exp:
tests/hard_coded/expand.exp:
tests/hard_coded/float_reg.exp:
tests/hard_coded/write.exp:
tests/hard_coded/write_binary.exp:
tests/hard_coded/write_reg1.exp:
tests/hard_coded/write_xml.exp:
Update the expected output of these tests as trailing zeros are now
also removed from the base part of scientific notation float strings.
Estimated hours taken: 0.25
tests/hard_coded/float_reg.m:
tests/hard_coded/float_reg.exp:
Add test cases for `1.0e10' and `1.0e30'.
Mercury 0.6 had trouble with these.
Estimated hours taken: 3
Regression tests for 2 bugs.
Mmake:
Add these two tests.
ho_func_reg.m:
ho_func_reg.exp:
Check for correct creation of references to higher order
function types with arity other than two.
float_reg.m:
float_reg.exp:
Check for correct creation of floating point constants with
a + in their exponent.