[comp.bugs.4bsd] bc bug

hubert@entropy.ms.washington.edu (Steve Hubert) (05/02/87)

The a() function in bc's lib.b (4.3BSD, lib.b version 4.1) doesn't
work unless another set of brackets is added.  Without the brackets
a(x) is always pi/4, except when x == 0.

Steve Hubert
 Dept. of Stat., U. of Wash, Seattle
 hubert@entropy.ms.washington.edu
 {decvax,ihnp4}!uw-beaver!uw-entropy!hubert


*** lib.b.old	Fri May  1 15:49:07 1987
--- lib.b.new	Fri May  1 15:49:13 1987
***************
*** 125,133 ****
  define a(x){
  	auto a, b, c, d, e, f, g, s, t
  	if(x==0) return(0)
! 	if(x==1)
  		if(scale<52)
  return(.7853981633974483096156608458198757210492923498437764/1)
  	t = scale
  	f=1
  	while(x > .5){
--- 125,134 ----
  define a(x){
  	auto a, b, c, d, e, f, g, s, t
  	if(x==0) return(0)
! 	if(x==1){
  		if(scale<52)
  return(.7853981633974483096156608458198757210492923498437764/1)
+ 	}
  	t = scale
  	f=1
  	while(x > .5){