trivial diff: acos/1 bug fix

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Jun 1 08:21:42 AEST 1998


library/math.m:
        Fix a cut-and-paste bug reported by Dan Hazel
        <d.hazel at mailbox.uq.edu.au>: Mercury's acos/1 was
        calling C's asin() instead of acos().

Index: math.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/math.m,v
retrieving revision 1.11
diff -u -u -u -5 -r1.11 math.m
--- math.m	1998/01/23 12:33:23	1.11
+++ math.m	1998/05/31 22:15:25
@@ -403,11 +403,11 @@
 %
 :- pragma c_code(math__acos(X::in) = (ACos::out), will_not_call_mercury,"
 	if (X < -1.0 || X > 1.0) {
 	    mercury_domain_error(""math__acos"");
 	}
-	ACos = asin(X);
+	ACos = acos(X);
 ").
 
 %
 % math__atan(X) = ATan is true if ATan is the inverse
 % tangent of X, where ATan is in the range [-pi/2,pi/2].
-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.



More information about the developers mailing list