[m-rev.] diff: uncomment stuff in float_test.m

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Mar 6 14:50:24 AEDT 2002


Estimated hours taken: 0.5
Branches: main

tests/general/float_test.m:
tests/general/float_test.exp:
	Uncomment some parts of this test which had previously
	been commented out because they didn't work with NU-Prolog.

Workspace: /home/ceres/fjh/mercury
Index: tests/general/float_test.exp
===================================================================
RCS file: /home/mercury1/repository/tests/general/float_test.exp,v
retrieving revision 1.3
diff -u -d -r1.3 float_test.exp
--- tests/general/float_test.exp	11 Aug 2000 08:24:01 -0000	1.3
+++ tests/general/float_test.exp	27 Feb 2002 08:07:33 -0000
@@ -5,12 +5,45 @@
 X * Y:     12
 X - Y:     -1
 X / Y:   0.75
+X ^ Y:     81
 X:     41
 Y:     -3
 X + Y:     38
 X * Y:   -123
 X - Y:     44
 X / Y:  -13.7
+X ^ Y: 1.45e-05
 Float max: 1.8e+308
 Float min: 2.23e-308
 Float epsilon: 2.22e-16
+Pi:   3.14
+e:   2.72
+X:    2.7
+ceil(X):      3
+floor(X):      2
+round(X):      3
+truncate(X):      2
+X:   -3.6
+ceil(X):     -3
+floor(X):     -4
+round(X):     -4
+truncate(X):     -3
+X:    2.2
+sqrt(X):   1.48
+ln(X):  0.788
+log2(X):   1.14
+log10(X):  0.342
+log(2.1,X):   1.06
+exp(X):   9.03
+X:    0.5
+sin(X):  0.479
+cos(X):  0.878
+tan(X):  0.546
+sinh(X):  0.521
+cosh(X):   1.13
+tanh(X):  0.462
+atan2(sin(X),cos(X)):    0.5
+X:    0.6
+asin(X):  0.644
+acos(X):  0.927
+atan(X):   0.54
Index: tests/general/float_test.m
===================================================================
RCS file: /home/mercury1/repository/tests/general/float_test.m,v
retrieving revision 1.7
diff -u -d -r1.7 float_test.m
--- tests/general/float_test.m	4 Jan 2002 07:49:13 -0000	1.7
+++ tests/general/float_test.m	27 Feb 2002 08:06:52 -0000
@@ -20,13 +20,12 @@
 	test(3.0, 4.0),
 	test(41.0, -3.0),
 	test_constants,
-	% test_math_constants,
-	% test_rounding(2.7),
-	% test_rounding(-3.6),
-	% test_power(2.2),
-	% test_trig(0.5),
-	% test_inv_trig(0.6).
-	[].
+	test_math_constants,
+	test_rounding(2.7),
+	test_rounding(-3.6),
+	test_power(2.2),
+	test_trig(0.5),
+	test_inv_trig(0.6).
 
 :- pred test(float, float, io__state, io__state).
 :- mode test(in, in, di, uo) is det.
@@ -37,8 +36,7 @@
 		Times = X * Y,
 		Minus = X - Y,
 		Divide = X / Y,
-		% math__pow(X, Y, Pow)
-		true
+		Pow = math__pow(X, Y)
 	},
 	write_message("X: ", X),
 	write_message("Y: ", Y),
@@ -46,8 +44,7 @@
 	write_message("X * Y: ", Times),
 	write_message("X - Y: ", Minus),
 	write_message("X / Y: ", Divide),
-	% write_message("X ^ Y: ", Pow).
-	[].
+	write_message("X ^ Y: ", Pow).
 
 :- pred write_message(string, float, io__state, io__state).
 :- mode write_message(in, in, di, uo) is det.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list