[m-rev.] For review: prune redundant trailing zeroes from floats on output

Ralph Becket rafe at csse.unimelb.edu.au
Tue Feb 13 15:59:28 AEDT 2007


Improve the readability of float output from the debugger and io.print etc.
by pruning redundant trailing zeroes.

library/string.m:
runtime/mercury_float.c:
	Make string.float_to_string trim redundant trailing zeroes.
	The behaviour of string.format etc. is unchanged.

tests/debugger/ambiguity.exp:
tests/debugger/field_names.exp:
tests/debugger/higher_order.exp:
tests/debugger/print_table.exp:
tests/hard_coded/common_type_cast.exp:
tests/hard_coded/constant_prop_1.exp:
tests/hard_coded/construct_test.exp:
tests/hard_coded/deconstruct_arg.exp:
tests/hard_coded/deep_copy.exp:
tests/hard_coded/deep_copy_exist.exp:
tests/hard_coded/dense_lookup_switch2.exp:
tests/hard_coded/dense_lookup_switch_non.exp:
tests/hard_coded/existential_float.exp:
tests/hard_coded/expand.exp:
tests/hard_coded/final_excp.exp:
tests/hard_coded/float_field.exp:
tests/hard_coded/float_gv.exp:
tests/hard_coded/float_reg.exp:
tests/hard_coded/float_rounding_bug.exp:
tests/hard_coded/init_excp.exp:
tests/hard_coded/mutable_excp.exp:
tests/hard_coded/pragma_import.exp:
tests/hard_coded/prince_frameopt.exp:
tests/hard_coded/string_string.exp:
tests/hard_coded/unused_float_box_test.exp:
tests/hard_coded/write.exp:
tests/hard_coded/write_binary.exp:
tests/hard_coded/write_reg1.exp:
tests/hard_coded/write_xml.exp:
tests/hard_coded/sub-modules/non_word_mutable.exp:
tests/hard_coded/typeclasses/arbitrary_constraint_class.exp:
tests/hard_coded/typeclasses/arbitrary_constraint_pred_1.exp:
tests/hard_coded/typeclasses/arbitrary_constraint_pred_2.exp:
tests/hard_coded/typeclasses/existential_rtti.exp:
tests/hard_coded/typeclasses/func_default_mode_bug.exp:
tests/hard_coded/typeclasses/mode_decl_order_bug.exp:
tests/hard_coded/typeclasses/module_test.exp:
tests/hard_coded/typeclasses/typeclass_exist_method.exp:
tests/invalid/error_in_list.err_exp:
tests/invalid/errors2.err_exp:
tests/invalid/purity/purity_type_error.err_exp:
tests/mmc_make/complex_test.exp:
tests/recompilation/add_type_re.exp.1:
tests/recompilation/type_spec_rename_var_r.exp.1:
tests/recompilation/type_spec_rename_var_r.exp.2:
tests/recompilation/type_spec_unname_var_r.exp.1:
tests/recompilation/type_spec_unname_var_r.exp.2:
	Updated expected test case output.

Index: library/string.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/string.m,v
retrieving revision 1.255
diff -u -r1.255 string.m
--- library/string.m	2 Feb 2007 05:39:52 -0000	1.255
+++ library/string.m	13 Feb 2007 04:54:47 -0000
@@ -3069,7 +3069,7 @@
     % XXX The unsafe_promise_unique is needed because in
     % string.float_to_string_2 the call to string.to_float doesn't
     % have a (ui, out) mode hence the output string cannot be unique.
-    String = string.float_to_string_2(min_precision, Float).
+    String = trim_float_string(string.float_to_string_2(min_precision, Float)).
 
 :- func string.float_to_string_2(int, float) = (string) is det.
 
@@ -3240,6 +3240,35 @@
     }
 ").
 
+    % Trim redundant trailing zeroes from the fractional part of the
+    % string representation of a float.
+    %
+:- func trim_float_string(string) = string.
+
+trim_float_string(FloatStr0) = FloatStr :-
+    L = string.length(FloatStr0),
+    N = count_extra_trailing_zeroes(FloatStr0, L - 1, 0),
+    FloatStr = string.left(FloatStr0, L - N).
+
+
+:- func count_extra_trailing_zeroes(string, int, int) = int.
+
+count_extra_trailing_zeroes(FloatStr, I, N0) = N :-
+    ( if I < 0 then
+        N = N0
+      else
+        C = FloatStr ^ elem(I),
+        ( if C = ('0') then
+            N = count_extra_trailing_zeroes(FloatStr, I - 1, N0 + 1)
+          else if C = ('.') then
+            N = int.max(N0 - 1, 0)
+          else if char.is_digit(C) then
+            N = N0
+          else
+            N = 0
+        )
+    ).
+
 /*-----------------------------------------------------------------------*/
 
     % strchr always returns true when searching for '\0',
Index: runtime/mercury_float.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_float.c,v
retrieving revision 1.9
diff -u -r1.9 mercury_float.c
--- runtime/mercury_float.c	14 Nov 2006 00:15:39 -0000	1.9
+++ runtime/mercury_float.c	12 Feb 2007 02:50:08 -0000
@@ -66,6 +66,7 @@
 {
     MR_Float round_trip = 0.0;
     int      i = MR_FLT_MIN_PRECISION;
+    int      n;
 
     /*
     ** Print the float at increasing precisions until the float
@@ -85,6 +86,33 @@
         i++;
     } while (round_trip != f);
 
+    /*
+    ** Strip redundant trailing zeroes from the string (this behaviour
+    ** for %g is suppressed by the # modifier).
+    */
+    for (n = strlen(buf) - 1; n > 0; n--) {
+        switch (buf[n]) {
+            case '.': 
+                buf[n + 2] = '\0';
+                return;
+            case '0':
+                continue;
+            case '1':
+            case '2':
+            case '3':
+            case '4':
+            case '5':
+            case '6':
+            case '7':
+            case '8':
+            case '9':
+                buf[n + 1] = '\0';
+                return;
+            default:
+                return;
+        }
+    }
+
     return;
 }
 
Index: tests/debugger/ambiguity.exp
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/ambiguity.exp,v
retrieving revision 1.2
diff -u -r1.2 ambiguity.exp
--- tests/debugger/ambiguity.exp	20 Aug 2006 05:41:44 -0000	1.2
+++ tests/debugger/ambiguity.exp	13 Feb 2007 03:56:09 -0000
@@ -31,7 +31,7 @@
 Total: 2 names used 5 times, maximum 3, average: 2.50
 
 mdb> continue
-2.50000000000000
+2.5
 t1
 u2(42)
 1
Index: tests/debugger/field_names.exp
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/field_names.exp,v
retrieving revision 1.8
diff -u -r1.8 field_names.exp
--- tests/debugger/field_names.exp	19 Jan 2007 04:42:48 -0000	1.8
+++ tests/debugger/field_names.exp	13 Feb 2007 03:56:37 -0000
@@ -101,9 +101,9 @@
 mdb> finish
        7:      4  2 EXIT pred field_names.make_t2/5-0 (det)
 mdb> p 5
-       HeadVar__5             	t2f(0.600000000000000, 61, t1f1(41, 42, 43, 44), t1f2(51, 52, 53))
+       HeadVar__5             	t2f(0.6, 61, t1f1(41, 42, 43, 44), t1f2(51, 52, 53))
 mdb> p 5^1
-       HeadVar__5^1           	0.600000000000000
+       HeadVar__5^1           	0.6
 mdb> p 5^2
        HeadVar__5^2           	61
 mdb> p 5^3
@@ -129,7 +129,7 @@
 mdb> p 5^4^t1g
        HeadVar__5^4^t1g       	53
 mdb> p 5^t2a
-       HeadVar__5^t2a         	0.600000000000000
+       HeadVar__5^t2a         	0.6
 mdb> p 5^t2b
        HeadVar__5^t2b         	t1f1(41, 42, 43, 44)
 mdb> p 5^t2b^t1a
@@ -240,9 +240,9 @@
 mdb> finish
       11:      6  2 EXIT pred field_names.make_t4/2-0 (det)
 mdb> p 2
-       A(1) (arg 2)           	t2f(0.600000000000000, 61, t1f1(41, 42, 43, 44), t1f2(51, 52, 53))
+       A(1) (arg 2)           	t2f(0.6, 61, t1f1(41, 42, 43, 44), t1f2(51, 52, 53))
 mdb> p 2^1
-       A(1) (arg 2)^1         	0.600000000000000
+       A(1) (arg 2)^1         	0.6
 mdb> p 2^2
        A(1) (arg 2)^2         	61
 mdb> p 2^3^t1a
@@ -266,7 +266,7 @@
 mdb> p 2^4^t1g
        A(1) (arg 2)^4^t1g     	53
 mdb> p 2^t2a
-       A(1) (arg 2)^t2a       	0.600000000000000
+       A(1) (arg 2)^t2a       	0.6
 mdb> p 2^t2b
        A(1) (arg 2)^t2b       	t1f1(41, 42, 43, 44)
 mdb> p 2^t2b^t1a
@@ -314,16 +314,16 @@
 mdb> finish
       15:      8  2 EXIT pred field_names.make_t6/2-0 (det)
 mdb> p 2
-       HeadVar__2             	t6f(0.900000000000000)
+       HeadVar__2             	t6f(0.9)
 mdb> p 2/1
-       HeadVar__2^1           	0.900000000000000
+       HeadVar__2^1           	0.9
 mdb> p 2/t5a
 mdb: the path t5a does not exist in variable 2.
 mdb> p 2/t6a
 mdb: the path t6a does not exist in variable 2.
 mdb> browse 2
 browser> p
-t6f(0.900000000000000)
+t6f(0.9)
 browser> ^badname
 error: there is no subterm badname
 browser> quit
@@ -333,7 +333,7 @@
       17:      9  2 EXIT pred field_names.make_t7/3-0 (det)
 mdb> browse 3
 browser> p
-t7f(0.900000000000000, 77)
+t7f(0.9, 77)
 browser> ^badname
 error: there is no subterm badname
 browser> quit
@@ -358,11 +358,11 @@
 mdb> continue -S
 t1f1(41, 42, 43, 44)
 t1f2(51, 52, 53)
-t2f(0.600000000000000, 61, t1f1(41, 42, 43, 44), t1f2(51, 52, 53))
+t2f(0.6, 61, t1f1(41, 42, 43, 44), t1f2(51, 52, 53))
 t3f(t1f2(51, 52, 53), 72, "xyzzy", t1f1(41, 42, 43, 44))
-t2f(0.600000000000000, 61, t1f1(41, 42, 43, 44), t1f2(51, 52, 53))
+t2f(0.6, 61, t1f1(41, 42, 43, 44), t1f2(51, 52, 53))
 t5f(t1f1(41, 42, 43, 44))
-t6f(0.900000000000000)
-t7f(0.900000000000000, 77)
+t6f(0.9)
+t7f(0.9, 77)
 t8a
 dummy
Index: tests/debugger/higher_order.exp
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/higher_order.exp,v
retrieving revision 1.8
diff -u -r1.8 higher_order.exp
--- tests/debugger/higher_order.exp	4 Apr 2006 07:37:17 -0000	1.8
+++ tests/debugger/higher_order.exp	13 Feb 2007 03:57:21 -0000
@@ -9,25 +9,25 @@
 mdb> step
       E2:     C2 CALL pred higher_order.domap/3-0 (det)
 mdb> print *
-       HeadVar__1             	float_add2(3.00000000000000)
-       HeadVar__2             	[1.00000000000000, 2.00000000000000, 3.00000000000000, 4.00000000000000, 5.00000000000000]
+       HeadVar__1             	float_add2(3.0)
+       HeadVar__2             	[1.0, 2.0, 3.0, 4.0, 5.0]
 mdb> finish
       E3:     C2 EXIT pred higher_order.domap/3-0 (det)
 mdb> print *
-       HeadVar__1             	float_add2(3.00000000000000)
-       HeadVar__2             	[1.00000000000000, 2.00000000000000, 3.00000000000000, 4.00000000000000, 5.00000000000000]
-       HeadVar__3             	[4.00000000000000, 5.00000000000000, 6.00000000000000, 7.00000000000000, 8.00000000000000]
+       HeadVar__1             	float_add2(3.0)
+       HeadVar__2             	[1.0, 2.0, 3.0, 4.0, 5.0]
+       HeadVar__3             	[4.0, 5.0, 6.0, 7.0, 8.0]
 mdb> step
       E4:     C3 CALL pred higher_order.domap/3-0 (det)
 mdb> print *
-       HeadVar__1             	float_op3(4.00000000000000, 5.00000000000000)
-       HeadVar__2             	[1.00000000000000, 2.00000000000000, 3.00000000000000, 4.00000000000000, 5.00000000000000]
+       HeadVar__1             	float_op3(4.0, 5.0)
+       HeadVar__2             	[1.0, 2.0, 3.0, 4.0, 5.0]
 mdb> finish
       E5:     C3 EXIT pred higher_order.domap/3-0 (det)
 mdb> print *
-       HeadVar__1             	float_op3(4.00000000000000, 5.00000000000000)
-       HeadVar__2             	[1.00000000000000, 2.00000000000000, 3.00000000000000, 4.00000000000000, 5.00000000000000]
-       HeadVar__3             	[9.00000000000000, 14.0000000000000, 19.0000000000000, 24.0000000000000, 29.0000000000000]
+       HeadVar__1             	float_op3(4.0, 5.0)
+       HeadVar__2             	[1.0, 2.0, 3.0, 4.0, 5.0]
+       HeadVar__3             	[9.0, 14.0, 19.0, 24.0, 29.0]
 mdb> step
       E6:     C4 CALL pred higher_order.domap/3-0 (det)
 mdb> print *
@@ -62,8 +62,8 @@
        HeadVar__2             	[["one", "two"], ["three", "four", "five"]]
        HeadVar__3             	[["a", "one", "two"], ["a", "three", "four", "five"]]
 mdb> continue -S
-[4.00000000000000, 5.00000000000000, 6.00000000000000, 7.00000000000000, 8.00000000000000]
-[9.00000000000000, 14.0000000000000, 19.0000000000000, 24.0000000000000, 29.0000000000000]
+[4.0, 5.0, 6.0, 7.0, 8.0]
+[9.0, 14.0, 19.0, 24.0, 29.0]
 [3, 3, 3, 4, 5]
 [[6, 1, 2], [6, 3, 4, 5]]
 [["a", "one", "two"], ["a", "three", "four", "five"]]
Index: tests/debugger/print_table.exp
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/print_table.exp,v
retrieving revision 1.9
diff -u -r1.9 print_table.exp
--- tests/debugger/print_table.exp	14 Aug 2005 03:20:50 -0000	1.9
+++ tests/debugger/print_table.exp	13 Feb 2007 03:57:41 -0000
@@ -402,11 +402,11 @@
 yes(9)
 no
 6
-[3.5abc1] 4.50000000000000
-[3.5abc2][3.5abc2] 5.50000000000000
-[3.5xyz2][3.5xyz2][3.5xyz2] 6.50000000000000
-[3.5xyz2][3.5xyz2][3.5xyz2][3.5xyz2] 7.50000000000000
-[9.2def2][9.2def2][9.2def2][9.2def2][9.2def2] 14.2000000000000
+[3.5abc1] 4.5
+[3.5abc2][3.5abc2] 5.5
+[3.5xyz2][3.5xyz2][3.5xyz2] 6.5
+[3.5xyz2][3.5xyz2][3.5xyz2][3.5xyz2] 7.5
+[9.2def2][9.2def2][9.2def2][9.2def2][9.2def2] 14.2
 [120, 210]
 []
 [120, 210]
Index: tests/hard_coded/common_type_cast.exp
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/common_type_cast.exp,v
retrieving revision 1.2
diff -u -r1.2 common_type_cast.exp
--- tests/hard_coded/common_type_cast.exp	12 Mar 1998 01:52:53 -0000	1.2
+++ tests/hard_coded/common_type_cast.exp	13 Feb 2007 00:00:52 -0000
@@ -1,2 +1,2 @@
 error("error")
-ok(1.00000000000000)
+ok(1.0)
Index: tests/hard_coded/constant_prop_1.exp
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/constant_prop_1.exp,v
retrieving revision 1.1
diff -u -r1.1 constant_prop_1.exp
--- tests/hard_coded/constant_prop_1.exp	10 Feb 2004 13:13:10 -0000	1.1
+++ tests/hard_coded/constant_prop_1.exp	13 Feb 2007 00:00:58 -0000
@@ -1,3 +1,3 @@
 foobar
 1234
-5678.00000000000
+5678.0
Index: tests/hard_coded/construct_test.exp
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/construct_test.exp,v
retrieving revision 1.5
diff -u -r1.5 construct_test.exp
--- tests/hard_coded/construct_test.exp	5 Jan 2007 02:19:44 -0000	1.5
+++ tests/hard_coded/construct_test.exp	13 Feb 2007 00:01:09 -0000
@@ -202,11 +202,11 @@
 About to construct zoom/1
 Constructed: zoom(1)
 About to construct zap/2
-Constructed: zap(1, 2.10000000000000)
+Constructed: zap(1, 2.1)
 About to construct zip/2
 Constructed: zip(1, 1)
 About to construct zop/2
-Constructed: zop(2.10000000000000, 2.10000000000000)
+Constructed: zop(2.1, 2.1)
 About to construct qwerty/1
 Constructed: qwerty(1)
 About to construct poly_one/1
@@ -218,4 +218,4 @@
 About to construct {}/3
 Constructed: {4, "five", '6'}
 About to call construct_tuple
-Constructed tuple: univ_cons({[1, 2, 3], [one, two, three], 1, 2.10000000000000})
+Constructed tuple: univ_cons({[1, 2, 3], [one, two, three], 1, 2.1})
Index: tests/hard_coded/deconstruct_arg.exp
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/deconstruct_arg.exp,v
retrieving revision 1.9
diff -u -r1.9 deconstruct_arg.exp
--- tests/hard_coded/deconstruct_arg.exp	29 Mar 2006 08:07:59 -0000	1.9
+++ tests/hard_coded/deconstruct_arg.exp	13 Feb 2007 00:01:33 -0000
@@ -17,22 +17,22 @@
 functor apple arity 1 [[9, 5, 1]]
 
 deconstruct functor: zop/2
-deconstruct argument 0 of zop(3.30000000000000, 2.03000000000000) is 3.30000000000000
-deconstruct argument 1 of zop(3.30000000000000, 2.03000000000000) is 2.03000000000000
-deconstruct argument 2 of zop(3.30000000000000, 2.03000000000000) doesn't exist
+deconstruct argument 0 of zop(3.3, 2.03) is 3.3
+deconstruct argument 1 of zop(3.3, 2.03) is 2.03
+deconstruct argument 2 of zop(3.3, 2.03) doesn't exist
 deconstruct deconstruct: functor zop arity 2
-[3.30000000000000, 2.03000000000000]
-deconstruct limited deconstruct 3 of zop(3.30000000000000, 2.03000000000000)
-functor zop arity 2 [3.30000000000000, 2.03000000000000]
+[3.3, 2.03]
+deconstruct limited deconstruct 3 of zop(3.3, 2.03)
+functor zop arity 2 [3.3, 2.03]
 
 deconstruct functor: zap/3
-deconstruct argument 0 of zap(50, 51.0000000000000, 52) is 50
-deconstruct argument 1 of zap(50, 51.0000000000000, 52) is 51.0000000000000
-deconstruct argument 2 of zap(50, 51.0000000000000, 52) is 52
+deconstruct argument 0 of zap(50, 51.0, 52) is 50
+deconstruct argument 1 of zap(50, 51.0, 52) is 51.0
+deconstruct argument 2 of zap(50, 51.0, 52) is 52
 deconstruct deconstruct: functor zap arity 3
-[50, 51.0000000000000, 52]
-deconstruct limited deconstruct 3 of zap(50, 51.0000000000000, 52)
-functor zap arity 3 [50, 51.0000000000000, 52]
+[50, 51.0, 52]
+deconstruct limited deconstruct 3 of zap(50, 51.0, 52)
+functor zap arity 3 [50, 51.0, 52]
 
 deconstruct functor: zip/4
 deconstruct argument 0 of zip(50, 51, 52, 53) is 50
Index: tests/hard_coded/deep_copy.exp
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/deep_copy.exp,v
retrieving revision 1.4
diff -u -r1.4 deep_copy.exp
--- tests/hard_coded/deep_copy.exp	13 Jan 2001 02:30:30 -0000	1.4
+++ tests/hard_coded/deep_copy.exp	13 Feb 2007 00:01:36 -0000
@@ -14,15 +14,15 @@
 banana([three, one, two])
 banana([three, one, two])
 banana([three, one, two])
-zop(3.30000000000000, 2.03000000000000)
-zop(3.30000000000000, 2.03000000000000)
-zop(3.30000000000000, 2.03000000000000)
+zop(3.3, 2.03)
+zop(3.3, 2.03)
+zop(3.3, 2.03)
 zip(3, 2)
 zip(3, 2)
 zip(3, 2)
-zap(3, -2.11100000000000)
-zap(3, -2.11100000000000)
-zap(3, -2.11100000000000)
+zap(3, -2.111)
+zap(3, -2.111)
+zap(3, -2.111)
 wombat
 wombat
 wombat
@@ -43,15 +43,15 @@
 tuple_d(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, ["d", "e", "f"], 15, ["u", "v", "w"], 17)
 
 TESTING POLYMORPHISM
-poly_three(3.33000000000000, 4, poly_one(9.11000000000000))
-poly_three(3.33000000000000, 4, poly_one(9.11000000000000))
-poly_three(3.33000000000000, 4, poly_one(9.11000000000000))
+poly_three(3.33, 4, poly_one(9.11))
+poly_three(3.33, 4, poly_one(9.11))
+poly_three(3.33, 4, poly_one(9.11))
 poly_two(3)
 poly_two(3)
 poly_two(3)
-poly_one([2399.30000000000])
-poly_one([2399.30000000000])
-poly_one([2399.30000000000])
+poly_one([2399.3])
+poly_one([2399.3])
+poly_one([2399.3])
 
 TESTING BUILTINS
 ""
@@ -72,9 +72,9 @@
 '&'
 '&'
 '&'
-3.14159000000000
-3.14159000000000
-3.14159000000000
+3.14159
+3.14159
+3.14159
 1.12832498300000e-21
 1.12832498300000e-21
 1.12832498300000e-21
Index: tests/hard_coded/deep_copy_exist.exp
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/deep_copy_exist.exp,v
retrieving revision 1.1
diff -u -r1.1 deep_copy_exist.exp
--- tests/hard_coded/deep_copy_exist.exp	29 Apr 2001 18:22:02 -0000	1.1
+++ tests/hard_coded/deep_copy_exist.exp	13 Feb 2007 00:01:41 -0000
@@ -5,15 +5,15 @@
 banana([three, one, two])
 banana([three, one, two])
 banana([three, one, two])
-zop(3.30000000000000, 2.03000000000000)
-zop(3.30000000000000, 2.03000000000000)
-zop(3.30000000000000, 2.03000000000000)
+zop(3.3, 2.03)
+zop(3.3, 2.03)
+zop(3.3, 2.03)
 zip(3, 2)
 zip(3, 2)
 zip(3, 2)
-zap(3, -2.11100000000000)
-zap(3, -2.11100000000000)
-zap(3, -2.11100000000000)
+zap(3, -2.111)
+zap(3, -2.111)
+zap(3, -2.111)
 wombat
 wombat
 wombat
@@ -34,15 +34,15 @@
 tuple_d(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 'a', 15, 'z', 17)
 
 TESTING POLYMORPHISM
-poly_three(3.33000000000000, 4, poly_one(9.11000000000000))
-poly_three(3.33000000000000, 4, poly_one(9.11000000000000))
-poly_three(3.33000000000000, 4, poly_one(9.11000000000000))
+poly_three(3.33, 4, poly_one(9.11))
+poly_three(3.33, 4, poly_one(9.11))
+poly_three(3.33, 4, poly_one(9.11))
 poly_two(3)
 poly_two(3)
 poly_two(3)
-poly_one([2399.30000000000])
-poly_one([2399.30000000000])
-poly_one([2399.30000000000])
+poly_one([2399.3])
+poly_one([2399.3])
+poly_one([2399.3])
 
 TESTING BUILTINS
 univ_cons(["hi! I\'m a univ!"])
Index: tests/hard_coded/dense_lookup_switch2.exp
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/dense_lookup_switch2.exp,v
retrieving revision 1.1
diff -u -r1.1 dense_lookup_switch2.exp
--- tests/hard_coded/dense_lookup_switch2.exp	30 Mar 2006 02:46:05 -0000	1.1
+++ tests/hard_coded/dense_lookup_switch2.exp	13 Feb 2007 00:01:48 -0000
@@ -1,8 +1,8 @@
 a -> failed
 b -> failed
 c -> failed
-d -> four f1 4.40000000000000
-e -> five f2 5.50000000000000
-f -> six f4("hex") 6.60000000000000
-g -> seven f5(77.7000000000000) 7.70000000000000
+d -> four f1 4.4
+e -> five f2 5.5
+f -> six f4("hex") 6.6
+g -> seven f5(77.7) 7.7
 h -> failed
Index: tests/hard_coded/dense_lookup_switch_non.exp
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/dense_lookup_switch_non.exp,v
retrieving revision 1.1
diff -u -r1.1 dense_lookup_switch_non.exp
--- tests/hard_coded/dense_lookup_switch_non.exp	26 Apr 2006 03:06:28 -0000	1.1
+++ tests/hard_coded/dense_lookup_switch_non.exp	13 Feb 2007 00:01:52 -0000
@@ -8,22 +8,22 @@
 end
 
 d ->
-four f1 4.40000000000000
+four f1 4.4
 end
 
 e ->
-five f2 5.50000000000000
-five2 f3(5) 55.5000000000000
+five f2 5.5
+five2 f3(5) 55.5
 end
 
 f ->
-six f4("hex") 6.60000000000000
+six f4("hex") 6.6
 end
 
 g ->
-seven f5(77.7000000000000) 7.70000000000000
-seven2 f1 777.700000000000
-seven3 f2 7777.70000000000
+seven f5(77.7) 7.7
+seven2 f1 777.7
+seven3 f2 7777.7
 end
 
 h ->
Index: tests/hard_coded/existential_float.exp
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/existential_float.exp,v
retrieving revision 1.4
diff -u -r1.4 existential_float.exp
--- tests/hard_coded/existential_float.exp	30 Jan 2002 05:09:10 -0000	1.4
+++ tests/hard_coded/existential_float.exp	13 Feb 2007 00:02:30 -0000
@@ -1,23 +1,23 @@
 'c'
 'c'
-42.0000000000000
-42.0000000000000
+42.0
+42.0
 '<<function>>'
 '<<function>>'
 'c'
 'c'
-42.0000000000000
-42.0000000000000
+42.0
+42.0
 '<<function>>'
 '<<function>>'
 'c'
-42.0000000000000
+42.0
 '<<function>>'
 'c'
-42.0000000000000
+42.0
 '<<function>>'
-33.3000000000000
+33.3
 no.
-33.3000000000000
+33.3
 no.
-[univ_cons(2.00000000000000), univ_cons(1.00000000000000)]
+[univ_cons(2.0), univ_cons(1.0)]
Index: tests/hard_coded/expand.exp
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/expand.exp,v
retrieving revision 1.6
diff -u -r1.6 expand.exp
--- tests/hard_coded/expand.exp	5 Jan 2007 02:19:44 -0000	1.6
+++ tests/hard_coded/expand.exp	13 Feb 2007 00:02:42 -0000
@@ -31,9 +31,9 @@
 
 zop/2
 10/2
-argument 2 of functor zop was:2.03000000000000
-expand: functor zop arity 2 arguments [3.30000000000000, 2.03000000000000]
-expand: functor 10 arity 2 arguments [3.30000000000000, 2.03000000000000]
+argument 2 of functor zop was:2.03
+expand: functor zop arity 2 arguments [3.3, 2.03]
+expand: functor 10 arity 2 arguments [3.3, 2.03]
 
 zip/2
 8/2
@@ -43,9 +43,9 @@
 
 zap/2
 7/2
-argument 2 of functor zap was:-2.11100000000000
-expand: functor zap arity 2 arguments [3, -2.11100000000000]
-expand: functor 7 arity 2 arguments [3, -2.11100000000000]
+argument 2 of functor zap was:-2.111
+expand: functor zap arity 2 arguments [3, -2.111]
+expand: functor 7 arity 2 arguments [3, -2.111]
 
 wombat/0
 6/0
@@ -69,15 +69,15 @@
 
 poly_three/3
 1/3
-argument 3 of functor poly_three was:poly_one(9.11000000000000)
-expand: functor poly_three arity 3 arguments [3.33000000000000, 4, poly_one(9.11000000000000)]
-expand: functor 1 arity 3 arguments [3.33000000000000, 4, poly_one(9.11000000000000)]
+argument 3 of functor poly_three was:poly_one(9.11)
+expand: functor poly_three arity 3 arguments [3.33, 4, poly_one(9.11)]
+expand: functor 1 arity 3 arguments [3.33, 4, poly_one(9.11)]
 
 poly_one/1
 0/1
-argument 1 of functor poly_one was:[2399.30000000000]
-expand: functor poly_one arity 1 arguments [[2399.30000000000]]
-expand: functor 0 arity 1 arguments [[2399.30000000000]]
+argument 1 of functor poly_one was:[2399.3]
+expand: functor poly_one arity 1 arguments [[2399.3]]
+expand: functor 0 arity 1 arguments [[2399.3]]
 
 
 TESTING BUILTINS
@@ -119,10 +119,10 @@
 expand: functor '&' arity 0 arguments []
 deconstruct_du failed
 
-3.14159000000000/0
+3.14159/0
 functor_number_cc failed
 no arguments
-expand: functor 3.14159000000000 arity 0 arguments []
+expand: functor 3.14159 arity 0 arguments []
 deconstruct_du failed
 
 1.12832498300000e-21/0
Index: tests/hard_coded/final_excp.exp
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/final_excp.exp,v
retrieving revision 1.1
diff -u -r1.1 final_excp.exp
--- tests/hard_coded/final_excp.exp	11 Feb 2007 03:28:03 -0000	1.1
+++ tests/hard_coded/final_excp.exp	13 Feb 2007 00:10:45 -0000
@@ -2,3 +2,4 @@
 EXCEPTION
 Uncaught Mercury exception:
 magic_number_exception
+Stack dump not available in this grade.
Index: tests/hard_coded/float_field.exp
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/float_field.exp,v
retrieving revision 1.1
diff -u -r1.1 float_field.exp
--- tests/hard_coded/float_field.exp	5 Jun 2000 02:47:35 -0000	1.1
+++ tests/hard_coded/float_field.exp	13 Feb 2007 00:02:56 -0000
@@ -1,12 +1,12 @@
-foo(1.00000000000000)
-1.00000000000000
-bar(2, 3.00000000000000, 4)
-3.00000000000000
-5.00000000000000
-5.00000000000000
-foo2(1.00000000000000)
-1.00000000000000
-bar2(2, 3.00000000000000, 4)
-3.00000000000000
-5.00000000000000
-5.00000000000000
+foo(1.0)
+1.0
+bar(2, 3.0, 4)
+3.0
+5.0
+5.0
+foo2(1.0)
+1.0
+bar2(2, 3.0, 4)
+3.0
+5.0
+5.0
Index: tests/hard_coded/float_gv.exp
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/float_gv.exp,v
retrieving revision 1.1
diff -u -r1.1 float_gv.exp
--- tests/hard_coded/float_gv.exp	24 Feb 2006 01:42:13 -0000	1.1
+++ tests/hard_coded/float_gv.exp	13 Feb 2007 00:11:47 -0000
@@ -1,7 +1,7 @@
-1.20000000000000
-1.20000000000000
-2.30000000000000
-2.30000000000000
+1.2
+1.2
+2.3
+2.3
 "abc"
 "abc"
 "def"
Index: tests/hard_coded/float_reg.exp
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/float_reg.exp,v
retrieving revision 1.2
diff -u -r1.2 float_reg.exp
--- tests/hard_coded/float_reg.exp	3 Jul 1997 12:13:36 -0000	1.2
+++ tests/hard_coded/float_reg.exp	13 Feb 2007 00:03:00 -0000
@@ -1,3 +1,3 @@
 2.88000000000000e+32
 1.00000000000000e+32
-10000000000.0000
+10000000000.0
Index: tests/hard_coded/float_rounding_bug.exp
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/float_rounding_bug.exp,v
retrieving revision 1.2
diff -u -r1.2 float_rounding_bug.exp
--- tests/hard_coded/float_rounding_bug.exp	2 Oct 1996 06:09:46 -0000	1.2
+++ tests/hard_coded/float_rounding_bug.exp	13 Feb 2007 00:03:02 -0000
@@ -1 +1 @@
-0.500000000000000
+0.5
Index: tests/hard_coded/init_excp.exp
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/init_excp.exp,v
retrieving revision 1.1
diff -u -r1.1 init_excp.exp
--- tests/hard_coded/init_excp.exp	8 Feb 2007 01:08:11 -0000	1.1
+++ tests/hard_coded/init_excp.exp	13 Feb 2007 00:10:47 -0000
@@ -2,3 +2,4 @@
 EXCEPTION
 Uncaught Mercury exception:
 magic_number_exception
+Stack dump not available in this grade.
Index: tests/hard_coded/mutable_excp.exp
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/mutable_excp.exp,v
retrieving revision 1.1
diff -u -r1.1 mutable_excp.exp
--- tests/hard_coded/mutable_excp.exp	11 Feb 2007 03:28:04 -0000	1.1
+++ tests/hard_coded/mutable_excp.exp	13 Feb 2007 00:10:52 -0000
@@ -1,3 +1,4 @@
 init_foo: X = 40
 Uncaught Mercury exception:
 magic_number_exception
+Stack dump not available in this grade.
Index: tests/hard_coded/pragma_import.exp
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/pragma_import.exp,v
retrieving revision 1.1
diff -u -r1.1 pragma_import.exp
--- tests/hard_coded/pragma_import.exp	9 Jan 1998 11:56:28 -0000	1.1
+++ tests/hard_coded/pragma_import.exp	13 Feb 2007 00:06:15 -0000
@@ -1,5 +1,5 @@
 X = 101
-Y = 201.000000000000
+Y = 201.0
 S = Foo
 X1 = 1
 X2 = 102
Index: tests/hard_coded/prince_frameopt.exp
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/prince_frameopt.exp,v
retrieving revision 1.1
diff -u -r1.1 prince_frameopt.exp
--- tests/hard_coded/prince_frameopt.exp	20 Apr 2006 04:05:26 -0000	1.1
+++ tests/hard_coded/prince_frameopt.exp	13 Feb 2007 00:06:27 -0000
@@ -1,3 +1,3 @@
 About to crash
-[max_width(value(percent(100.000000000000)))]
+[max_width(value(percent(100.0)))]
 Done
Index: tests/hard_coded/string_string.exp
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/string_string.exp,v
retrieving revision 1.3
diff -u -r1.3 string_string.exp
--- tests/hard_coded/string_string.exp	4 Aug 2005 04:45:19 -0000	1.3
+++ tests/hard_coded/string_string.exp	13 Feb 2007 00:08:18 -0000
@@ -1,4 +1,4 @@
 leaf
 branch(leaf, leaf)
 [1, 2, 3]
-1.23400000000000 - 5
+1.234 - 5
Index: tests/hard_coded/unused_float_box_test.exp
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/unused_float_box_test.exp,v
retrieving revision 1.1
diff -u -r1.1 unused_float_box_test.exp
--- tests/hard_coded/unused_float_box_test.exp	27 May 2001 09:59:55 -0000	1.1
+++ tests/hard_coded/unused_float_box_test.exp	13 Feb 2007 00:09:56 -0000
@@ -1 +1 @@
-my_functor_float(42.0000000000000)
+my_functor_float(42.0)
Index: tests/hard_coded/write.exp
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/write.exp,v
retrieving revision 1.10
diff -u -r1.10 write.exp
--- tests/hard_coded/write.exp	13 Jan 2001 02:30:31 -0000	1.10
+++ tests/hard_coded/write.exp	13 Feb 2007 00:10:08 -0000
@@ -12,16 +12,16 @@
 three
 apple([9, 5, 1])
 banana([three, one, two])
-zop(3.30000000000000, 2.03000000000000)
+zop(3.3, 2.03)
 zip(3, 2)
-zap(3, -2.11100000000000)
+zap(3, -2.111)
 wombat
 foo
 
 TESTING POLYMORPHISM
-poly_one([2399.30000000000])
+poly_one([2399.3])
 poly_two(3)
-poly_three(3.33000000000000, 4, poly_one(9.11000000000000))
+poly_three(3.33, 4, poly_one(9.11))
 
 TESTING BUILTINS
 ""
@@ -30,7 +30,7 @@
 "\""
 'a'
 '&'
-3.14159000000000
+3.14159
 1.12832498300000e-21
 2.23954899000000e+23
 -65
Index: tests/hard_coded/write_binary.exp
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/write_binary.exp,v
retrieving revision 1.1
diff -u -r1.1 write_binary.exp
--- tests/hard_coded/write_binary.exp	22 Jan 2004 04:35:13 -0000	1.1
+++ tests/hard_coded/write_binary.exp	13 Feb 2007 00:11:05 -0000
@@ -40,14 +40,14 @@
 banana([three, one, two])
 banana([three, one, two])
 ok... test passed:
-zop(3.30000000000000, 2.03000000000000)
-zop(3.30000000000000, 2.03000000000000)
+zop(3.3, 2.03)
+zop(3.3, 2.03)
 ok... test passed:
 zip(3, 2)
 zip(3, 2)
 ok... test passed:
-zap(3, -2.11100000000000)
-zap(3, -2.11100000000000)
+zap(3, -2.111)
+zap(3, -2.111)
 ok... test passed:
 wombat
 wombat
@@ -56,14 +56,14 @@
 foo
 TESTING POLYMORPHISM
 ok... test passed:
-poly_one([2399.30000000000])
-poly_one([2399.30000000000])
+poly_one([2399.3])
+poly_one([2399.3])
 ok... test passed:
 poly_two(3)
 poly_two(3)
 ok... test passed:
-poly_three(3.33000000000000, 4, poly_one(9.11000000000000))
-poly_three(3.33000000000000, 4, poly_one(9.11000000000000))
+poly_three(3.33, 4, poly_one(9.11))
+poly_three(3.33, 4, poly_one(9.11))
 TESTING BUILTINS
 ok... test passed:
 
@@ -112,8 +112,8 @@
 /
 /
 ok... test passed:
-3.14159000000000
-3.14159000000000
+3.14159
+3.14159
 ok... test passed:
 1.12832498300000e-21
 1.12832498300000e-21
Index: tests/hard_coded/write_reg1.exp
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/write_reg1.exp,v
retrieving revision 1.7
diff -u -r1.7 write_reg1.exp
--- tests/hard_coded/write_reg1.exp	24 Feb 2002 11:53:42 -0000	1.7
+++ tests/hard_coded/write_reg1.exp	13 Feb 2007 00:10:10 -0000
@@ -4,16 +4,16 @@
 three
 apple([9, 5, 1])
 banana([three, one, two])
-zop(3.30000000000000, 2.03000000000000)
+zop(3.3, 2.03)
 zip(3, 2)
-zap(3, -2.11100000000000)
+zap(3, -2.111)
 wombat
 foo
 
 TESTING POLYMORPHISM
-poly_one([2399.30000000000])
+poly_one([2399.3])
 poly_two(3)
-poly_three(3.33000000000000, 4, poly_one(9.11000000000000))
+poly_three(3.33, 4, poly_one(9.11))
 
 TESTING BUILTINS
 ""
@@ -22,7 +22,7 @@
 "\""
 'a'
 '&'
-3.14159000000000
+3.14159
 1.12832498300000e-21
 2.23954899000000e+23
 -65
Index: tests/hard_coded/write_xml.exp
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/write_xml.exp,v
retrieving revision 1.4
diff -u -r1.4 write_xml.exp
--- tests/hard_coded/write_xml.exp	22 Aug 2006 02:33:54 -0000	1.4
+++ tests/hard_coded/write_xml.exp	13 Feb 2007 00:10:15 -0000
@@ -16,7 +16,7 @@
 is a <string>&</String>
 		<Int type="int" field="Field<2>">-123</Int>
 		<Char type="character"><</Char>
-		<Float type="float" field="another field">1.12300000000000</Float>
+		<Float type="float" field="another field">1.123</Float>
 		<yes--0--bool-46bool functor="yes" type="bool.bool" arity="0" />
 	</hello--5--write_xml-46mytype>
 	<a_tuple--1--write_xml-46mytype functor="a_tuple" type="write_xml.mytype" arity="1">
@@ -404,7 +404,7 @@
 is a <string>&</String>
 				<Int type="int" field="Field<2>">-123</Int>
 				<Char type="character"><</Char>
-				<Float type="float" field="another field">1.12300000000000</Float>
+				<Float type="float" field="another field">1.123</Float>
 				<yes functor="yes" type="bool.bool" arity="0" />
 			</hello>
 			<List functor="[|]" type="list.list(write_xml.mytype)" arity="2">
Index: tests/hard_coded/sub-modules/non_word_mutable.exp
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/sub-modules/non_word_mutable.exp,v
retrieving revision 1.1
diff -u -r1.1 non_word_mutable.exp
--- tests/hard_coded/sub-modules/non_word_mutable.exp	24 Feb 2006 01:42:15 -0000	1.1
+++ tests/hard_coded/sub-modules/non_word_mutable.exp	13 Feb 2007 00:15:26 -0000
@@ -1,7 +1,7 @@
-1.20000000000000
-1.20000000000000
-2.30000000000000
-2.30000000000000
+1.2
+1.2
+2.3
+2.3
 "abc"
 "abc"
 "def"
Index: tests/hard_coded/typeclasses/arbitrary_constraint_class.exp
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/typeclasses/arbitrary_constraint_class.exp,v
retrieving revision 1.1
diff -u -r1.1 arbitrary_constraint_class.exp
--- tests/hard_coded/typeclasses/arbitrary_constraint_class.exp	26 Jul 2002 06:33:18 -0000	1.1
+++ tests/hard_coded/typeclasses/arbitrary_constraint_class.exp	13 Feb 2007 00:12:00 -0000
@@ -1 +1 @@
-0.00000000000000
+0.0
Index: tests/hard_coded/typeclasses/arbitrary_constraint_pred_1.exp
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/typeclasses/arbitrary_constraint_pred_1.exp,v
retrieving revision 1.1
diff -u -r1.1 arbitrary_constraint_pred_1.exp
--- tests/hard_coded/typeclasses/arbitrary_constraint_pred_1.exp	26 Jul 2002 06:33:18 -0000	1.1
+++ tests/hard_coded/typeclasses/arbitrary_constraint_pred_1.exp	13 Feb 2007 00:12:03 -0000
@@ -1 +1 @@
-0.00000000000000
+0.0
Index: tests/hard_coded/typeclasses/arbitrary_constraint_pred_2.exp
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/typeclasses/arbitrary_constraint_pred_2.exp,v
retrieving revision 1.1
diff -u -r1.1 arbitrary_constraint_pred_2.exp
--- tests/hard_coded/typeclasses/arbitrary_constraint_pred_2.exp	26 Jul 2002 06:33:19 -0000	1.1
+++ tests/hard_coded/typeclasses/arbitrary_constraint_pred_2.exp	13 Feb 2007 00:12:01 -0000
@@ -1 +1 @@
-42.0000000000000
+42.0
Index: tests/hard_coded/typeclasses/existential_rtti.exp
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/typeclasses/existential_rtti.exp,v
retrieving revision 1.2
diff -u -r1.2 existential_rtti.exp
--- tests/hard_coded/typeclasses/existential_rtti.exp	13 Jan 2001 02:30:33 -0000	1.2
+++ tests/hard_coded/typeclasses/existential_rtti.exp	13 Feb 2007 00:12:25 -0000
@@ -6,11 +6,11 @@
 f(4, g("hello"), 42)
 f(5, g2(12), 42)
 f(6, foo("hello", "world"), 42)
-g(7.00000000000000, g("hello"), 42.0000000000000)
+g(7.0, g("hello"), 42.0)
 f(8, u("hello"), 42)
-f2(9, "hello", u("hello"), 432.100000000000, u("world"), 42)
+f2(9, "hello", u("hello"), 432.1, u("world"), 42)
 multi(10, "multiparameter")
-multi2(11, "multiparameter", 42.0000000000000)
+multi2(11, "multiparameter", 42.0)
 
 Writing some terms:
 myf(1)
@@ -20,11 +20,11 @@
 f(4, g("hello"), 42)
 f(5, g2(12), 42)
 f(6, foo("hello", "world"), 42)
-g(7.00000000000000, g("hello"), 42.0000000000000)
+g(7.0, g("hello"), 42.0)
 f(8, u("hello"), 42)
-f2(9, "hello", u("hello"), 432.100000000000, u("world"), 42)
+f2(9, "hello", u("hello"), 432.1, u("world"), 42)
 multi(10, "multiparameter")
-multi2(11, "multiparameter", 42.0000000000000)
+multi2(11, "multiparameter", 42.0)
 
 Writing copies of terms again:
 myf(1)
@@ -34,11 +34,11 @@
 f(4, g("hello"), 42)
 f(5, g2(12), 42)
 f(6, foo("hello", "world"), 42)
-g(7.00000000000000, g("hello"), 42.0000000000000)
+g(7.0, g("hello"), 42.0)
 f(8, u("hello"), 42)
-f2(9, "hello", u("hello"), 432.100000000000, u("world"), 42)
+f2(9, "hello", u("hello"), 432.1, u("world"), 42)
 multi(10, "multiparameter")
-multi2(11, "multiparameter", 42.0000000000000)
+multi2(11, "multiparameter", 42.0)
 Writing deconstructed terms:
 myf/1
 univ_cons(1)
@@ -55,12 +55,12 @@
 f/3
 univ_cons(6), univ_cons(foo("hello", "world")), univ_cons(42)
 g/3
-univ_cons(7.00000000000000), univ_cons(g("hello")), univ_cons(42.0000000000000)
+univ_cons(7.0), univ_cons(g("hello")), univ_cons(42.0)
 f/3
 univ_cons(8), univ_cons(u("hello")), univ_cons(42)
 f2/6
-univ_cons(9), univ_cons("hello"), univ_cons(u("hello")), univ_cons(432.100000000000), univ_cons(u("world")), univ_cons(42)
+univ_cons(9), univ_cons("hello"), univ_cons(u("hello")), univ_cons(432.1), univ_cons(u("world")), univ_cons(42)
 multi/2
 univ_cons(10), univ_cons("multiparameter")
 multi2/3
-univ_cons(11), univ_cons("multiparameter"), univ_cons(42.0000000000000)
+univ_cons(11), univ_cons("multiparameter"), univ_cons(42.0)
Index: tests/hard_coded/typeclasses/func_default_mode_bug.exp
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/typeclasses/func_default_mode_bug.exp,v
retrieving revision 1.1
diff -u -r1.1 func_default_mode_bug.exp
--- tests/hard_coded/typeclasses/func_default_mode_bug.exp	17 Mar 1999 20:41:47 -0000	1.1
+++ tests/hard_coded/typeclasses/func_default_mode_bug.exp	13 Feb 2007 00:12:31 -0000
@@ -1 +1 @@
-bidon(value(value(-1.00000000000000, -1.00000000000000)))
+bidon(value(value(-1.0, -1.0)))
Index: tests/hard_coded/typeclasses/mode_decl_order_bug.exp
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/typeclasses/mode_decl_order_bug.exp,v
retrieving revision 1.1
diff -u -r1.1 mode_decl_order_bug.exp
--- tests/hard_coded/typeclasses/mode_decl_order_bug.exp	17 Mar 1999 20:41:49 -0000	1.1
+++ tests/hard_coded/typeclasses/mode_decl_order_bug.exp	13 Feb 2007 00:13:23 -0000
@@ -1 +1 @@
-bidon(value(value(-1.00000000000000, -1.00000000000000)))
+bidon(value(value(-1.0, -1.0)))
Index: tests/hard_coded/typeclasses/module_test.exp
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/typeclasses/module_test.exp,v
retrieving revision 1.1
diff -u -r1.1 module_test.exp
--- tests/hard_coded/typeclasses/module_test.exp	1 Nov 2000 13:52:47 -0000	1.1
+++ tests/hard_coded/typeclasses/module_test.exp	13 Feb 2007 00:13:26 -0000
@@ -1,4 +1,4 @@
 t1: 1
 string: hello world
 t2: 2
-float: 123.450000000000
+float: 123.45
Index: tests/hard_coded/typeclasses/typeclass_exist_method.exp
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/typeclasses/typeclass_exist_method.exp,v
retrieving revision 1.1
diff -u -r1.1 typeclass_exist_method.exp
--- tests/hard_coded/typeclasses/typeclass_exist_method.exp	10 Jul 1999 03:39:07 -0000	1.1
+++ tests/hard_coded/typeclasses/typeclass_exist_method.exp	13 Feb 2007 00:14:04 -0000
@@ -1 +1 @@
-42.0000000000000
+42.0
Index: tests/invalid/error_in_list.err_exp
===================================================================
RCS file: /home/mercury1/repository/tests/invalid/error_in_list.err_exp,v
retrieving revision 1.1
diff -u -r1.1 error_in_list.err_exp
--- tests/invalid/error_in_list.err_exp	6 Jan 2007 10:54:43 -0000	1.1
+++ tests/invalid/error_in_list.err_exp	13 Feb 2007 04:06:13 -0000
@@ -9,7 +9,7 @@
 error_in_list.m:011:   in function result term of clause head:
 error_in_list.m:011:   in list element #6:
 error_in_list.m:011:   type error in unification of argument
-error_in_list.m:011:   and constant `7.00000000000000'.
+error_in_list.m:011:   and constant `7.0'.
 error_in_list.m:011:   argument has type `int',
-error_in_list.m:011:   constant `7.00000000000000' has type `float'.
+error_in_list.m:011:   constant `7.0' has type `float'.
 For more information, recompile with `-E'.
Index: tests/invalid/errors2.err_exp
===================================================================
RCS file: /home/mercury1/repository/tests/invalid/errors2.err_exp,v
retrieving revision 1.18
diff -u -r1.18 errors2.err_exp
--- tests/invalid/errors2.err_exp	1 Oct 2006 04:24:11 -0000	1.18
+++ tests/invalid/errors2.err_exp	13 Feb 2007 04:06:22 -0000
@@ -45,9 +45,9 @@
 errors2.m:052: In clause for predicate `type_error_4'/0:
 errors2.m:052:   in argument 3 of functor `foo_functor/3':
 errors2.m:052:   type error in unification of argument
-errors2.m:052:   and constant `1.00000000000000'.
+errors2.m:052:   and constant `1.0'.
 errors2.m:052:   argument has type `string',
-errors2.m:052:   constant `1.00000000000000' has type `float'.
+errors2.m:052:   constant `1.0' has type `float'.
 errors2.m:052:   The partial type assignment was:
 errors2.m:052:     Y_1: int
 errors2.m:052:     X_2: (errors2.foo_type)
@@ -56,9 +56,9 @@
 errors2.m:059: In clause for predicate `type_error_5'/0:
 errors2.m:059:   in argument 3 of functor `foo_functor/3':
 errors2.m:059:   type error in unification of argument
-errors2.m:059:   and constant `1.00000000000000'.
+errors2.m:059:   and constant `1.0'.
 errors2.m:059:   argument has type `string',
-errors2.m:059:   constant `1.00000000000000' has type `float'.
+errors2.m:059:   constant `1.0' has type `float'.
 errors2.m:059:   The partial type assignment was:
 errors2.m:059:     Y_1: character
 errors2.m:059:     X_2: (errors2.foo_type)
@@ -67,9 +67,9 @@
 errors2.m:065: In clause for predicate `type_error_6'/0:
 errors2.m:065:   in argument 3 of functor `bar_functor/3':
 errors2.m:065:   type error in unification of argument
-errors2.m:065:   and constant `1.00000000000000'.
+errors2.m:065:   and constant `1.0'.
 errors2.m:065:   argument has type `string',
-errors2.m:065:   constant `1.00000000000000' has type `float'.
+errors2.m:065:   constant `1.0' has type `float'.
 errors2.m:065:   The partial type assignment was:
 errors2.m:065:     Y_1: character
 errors2.m:065:     X_2: (errors2.bar_1_type)
Index: tests/invalid/purity/purity_type_error.err_exp
===================================================================
RCS file: /home/mercury1/repository/tests/invalid/purity/purity_type_error.err_exp,v
retrieving revision 1.8
diff -u -r1.8 purity_type_error.err_exp
--- tests/invalid/purity/purity_type_error.err_exp	12 Sep 2006 04:41:51 -0000	1.8
+++ tests/invalid/purity/purity_type_error.err_exp	13 Feb 2007 04:06:28 -0000
@@ -1,9 +1,9 @@
 purity_type_error.m:020: In clause for predicate `type_error'/1:
 purity_type_error.m:020:   in argument 1 of clause head:
 purity_type_error.m:020:   type error in unification of variable `HeadVar__1'
-purity_type_error.m:020:   and constant `1.00000000000000'.
+purity_type_error.m:020:   and constant `1.0'.
 purity_type_error.m:020:   variable `HeadVar__1' has type `int',
-purity_type_error.m:020:   constant `1.00000000000000' has type `float'.
+purity_type_error.m:020:   constant `1.0' has type `float'.
 purity_type_error.m:020:   The partial type assignment was:
 purity_type_error.m:020:     HeadVar__1_1: int
 purity_type_error.m:009: In predicate `warn'/1:
Index: tests/mmc_make/complex_test.exp
===================================================================
RCS file: /home/mercury1/repository/tests/mmc_make/complex_test.exp,v
retrieving revision 1.1
diff -u -r1.1 complex_test.exp
--- tests/mmc_make/complex_test.exp	23 Jan 2003 00:24:17 -0000	1.1
+++ tests/mmc_make/complex_test.exp	13 Feb 2007 00:18:52 -0000
@@ -1,54 +1,54 @@
 tests of (complex op complex)
-X = cmplx(3.00000000000000, 4.00000000000000)
-X + X = cmplx(6.00000000000000, 8.00000000000000)
-X - X = cmplx(0.00000000000000, 0.00000000000000)
-X * X = cmplx(-7.00000000000000, 24.0000000000000)
-X / X = cmplx(1.00000000000000, 0.00000000000000)
-Y = cmplx(-5.00000000000000, 6.00000000000000)
-Y + Y = cmplx(-10.0000000000000, 12.0000000000000)
-Y - Y = cmplx(0.00000000000000, 0.00000000000000)
-Y * Y = cmplx(-11.0000000000000, -60.0000000000000)
-Y / Y = cmplx(1.00000000000000, 0.00000000000000)
-X + Y = cmplx(-2.00000000000000, 10.0000000000000)
-X - Y = cmplx(8.00000000000000, -2.00000000000000)
-X * Y = cmplx(-39.0000000000000, -2.00000000000000)
+X = cmplx(3.0, 4.0)
+X + X = cmplx(6.0, 8.0)
+X - X = cmplx(0.0, 0.0)
+X * X = cmplx(-7.0, 24.0)
+X / X = cmplx(1.0, 0.0)
+Y = cmplx(-5.0, 6.0)
+Y + Y = cmplx(-10.0, 12.0)
+Y - Y = cmplx(0.0, 0.0)
+Y * Y = cmplx(-11.0, -60.0)
+Y / Y = cmplx(1.0, 0.0)
+X + Y = cmplx(-2.0, 10.0)
+X - Y = cmplx(8.0, -2.0)
+X * Y = cmplx(-39.0, -2.0)
 X / Y = cmplx(0.14754098360655737, -0.6229508196721312)
 
 tests of (imag op imag)
-Z = im(4.00000000000000)
-Z + Z = im(8.00000000000000)
-Z - Z = im(0.00000000000000)
-Z * Z = -16.0000000000000
-Z / Z = 1.00000000000000
+Z = im(4.0)
+Z + Z = im(8.0)
+Z - Z = im(0.0)
+Z * Z = -16.0
+Z / Z = 1.0
 
 tests of (float op imag)
-5.0 + Z = cmplx(5.00000000000000, 4.00000000000000)
-5.0 - Z = cmplx(5.00000000000000, -4.00000000000000)
-5.0 * Z = im(20.0000000000000)
-5.0 / Z = im(-1.25000000000000)
+5.0 + Z = cmplx(5.0, 4.0)
+5.0 - Z = cmplx(5.0, -4.0)
+5.0 * Z = im(20.0)
+5.0 / Z = im(-1.25)
 
 tests of (imag op float)
-Z + 5.0 = cmplx(5.00000000000000, 4.00000000000000)
-Z - 5.0 = cmplx(-5.00000000000000, 4.00000000000000)
-Z * 5.0 = im(20.0000000000000)
-Z / 5.0 = im(0.800000000000000)
+Z + 5.0 = cmplx(5.0, 4.0)
+Z - 5.0 = cmplx(-5.0, 4.0)
+Z * 5.0 = im(20.0)
+Z / 5.0 = im(0.8)
 
 tests of (complex op imag)
-X + Z = cmplx(3.00000000000000, 8.00000000000000)
-X - Z = cmplx(3.00000000000000, 0.00000000000000)
-X * Z = cmplx(-16.0000000000000, 12.0000000000000)
-X / Z = cmplx(1.00000000000000, -0.750000000000000)
-Y + Z = cmplx(-5.00000000000000, 10.0000000000000)
-Y - Z = cmplx(-5.00000000000000, 2.00000000000000)
-Y * Z = cmplx(-24.0000000000000, -20.0000000000000)
-Y / Z = cmplx(1.50000000000000, 1.25000000000000)
+X + Z = cmplx(3.0, 8.0)
+X - Z = cmplx(3.0, 0.0)
+X * Z = cmplx(-16.0, 12.0)
+X / Z = cmplx(1.0, -0.75)
+Y + Z = cmplx(-5.0, 10.0)
+Y - Z = cmplx(-5.0, 2.0)
+Y * Z = cmplx(-24.0, -20.0)
+Y / Z = cmplx(1.5, 1.25)
 
 tests of (imag op complex)
-Z + X = cmplx(3.00000000000000, 8.00000000000000)
-Z - X = cmplx(-3.00000000000000, 0.00000000000000)
-Z * X = cmplx(-16.0000000000000, 12.0000000000000)
-Z / X = cmplx(0.640000000000000, 0.480000000000000)
-Z + Y = cmplx(-5.00000000000000, 10.0000000000000)
-Z - Y = cmplx(5.00000000000000, -2.00000000000000)
-Z * Y = cmplx(-24.0000000000000, -20.0000000000000)
+Z + X = cmplx(3.0, 8.0)
+Z - X = cmplx(-3.0, 0.0)
+Z * X = cmplx(-16.0, 12.0)
+Z / X = cmplx(0.64, 0.48)
+Z + Y = cmplx(-5.0, 10.0)
+Z - Y = cmplx(5.0, -2.0)
+Z * Y = cmplx(-24.0, -20.0)
 Z / Y = cmplx(0.39344262295081966, -0.32786885245901637)
Index: tests/recompilation/add_type_re.exp.1
===================================================================
RCS file: /home/mercury1/repository/tests/recompilation/add_type_re.exp.1,v
retrieving revision 1.1
diff -u -r1.1 add_type_re.exp.1
--- tests/recompilation/add_type_re.exp.1	27 Jun 2001 05:04:52 -0000	1.1
+++ tests/recompilation/add_type_re.exp.1	13 Feb 2007 04:09:04 -0000
@@ -1,2 +1,2 @@
 a
-1.00000000000000
+1.0
Index: tests/recompilation/type_spec_rename_var_r.exp.1
===================================================================
RCS file: /home/mercury1/repository/tests/recompilation/type_spec_rename_var_r.exp.1,v
retrieving revision 1.1
diff -u -r1.1 type_spec_rename_var_r.exp.1
--- tests/recompilation/type_spec_rename_var_r.exp.1	24 Jul 2001 17:16:48 -0000	1.1
+++ tests/recompilation/type_spec_rename_var_r.exp.1	13 Feb 2007 04:08:56 -0000
@@ -1 +1 @@
-1 - 2.00000000000000
+1 - 2.0
Index: tests/recompilation/type_spec_rename_var_r.exp.2
===================================================================
RCS file: /home/mercury1/repository/tests/recompilation/type_spec_rename_var_r.exp.2,v
retrieving revision 1.1
diff -u -r1.1 type_spec_rename_var_r.exp.2
--- tests/recompilation/type_spec_rename_var_r.exp.2	24 Jul 2001 17:16:48 -0000	1.1
+++ tests/recompilation/type_spec_rename_var_r.exp.2	13 Feb 2007 04:08:58 -0000
@@ -1 +1 @@
-1 - 2.00000000000000
+1 - 2.0
Index: tests/recompilation/type_spec_unname_var_r.exp.1
===================================================================
RCS file: /home/mercury1/repository/tests/recompilation/type_spec_unname_var_r.exp.1,v
retrieving revision 1.1
diff -u -r1.1 type_spec_unname_var_r.exp.1
--- tests/recompilation/type_spec_unname_var_r.exp.1	5 Jan 2002 12:00:00 -0000	1.1
+++ tests/recompilation/type_spec_unname_var_r.exp.1	13 Feb 2007 04:08:59 -0000
@@ -1 +1 @@
-[1] - 2.00000000000000
+[1] - 2.0
Index: tests/recompilation/type_spec_unname_var_r.exp.2
===================================================================
RCS file: /home/mercury1/repository/tests/recompilation/type_spec_unname_var_r.exp.2,v
retrieving revision 1.1
diff -u -r1.1 type_spec_unname_var_r.exp.2
--- tests/recompilation/type_spec_unname_var_r.exp.2	5 Jan 2002 12:00:01 -0000	1.1
+++ tests/recompilation/type_spec_unname_var_r.exp.2	13 Feb 2007 04:09:01 -0000
@@ -1 +1 @@
-[1] - 2.00000000000000
+[1] - 2.0
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list