Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10 5/3/83; site umn-cs.UUCP
Path: utzoo!watmath!clyde!burl!we13!ihnp4!stolaf!umn-cs!herndon
From: herndon@umn-cs.UUCP (Robert Herndon)
Newsgroups: net.bugs
Subject: Prehistoric BC Bug - (nf)
Message-ID: <410@umn-cs.UUCP>
Date: Tue, 31-Jan-84 21:00:53 EST
Article-I.D.: umn-cs.410
Posted: Tue Jan 31 21:00:53 1984
Date-Received: Tue, 7-Feb-84 11:02:14 EST
Sender: notes@umn-cs.UUCP
Organization: Computer Science Dept., U of Minn, Mpls, MN
Lines: 33

#N:umn-cs:1300001:000:745
umn-cs!herndon    Jan 31 17:59:00 1984



  There is a bug in the BC library.  The arc-tangent function ("a")
returns pi/4 for the arctangent of any non-zero number.  The cause
of this is a mis-associated "if" statement in the function definition.
The fix for this is to change the definition of the a() function.

The file currently reads:

125a126,128
> 	if(x==1)
> 		if(scale<52)
> return(.7853981633974483096156608458198757210492923498437764/1)

The following may be substituted:

126,130d125
> 	if(x==1) {
> 		if(scale<52) {
> return(.7853981633974483096156608458198757210492923498437764/1)
> 		}
> 	}

Or the lines may be deleted entirely.  This will slow down the
evaluation of a(1) substantially but will not otherwise harm the
function.

				Robert Herndon
				umn-cs!herndon