Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!ptsfa!ames!hao!noao!arizona!whm From: whm@arizona.UUCP Newsgroups: comp.bugs.4bsd Subject: Bug in bc's "e" library routine in 4.3bsd and probably others Message-ID: <1804@megaron.arizona.edu> Date: Wed, 8-Jul-87 21:48:41 EDT Article-I.D.: megaron.1804 Posted: Wed Jul 8 21:48:41 1987 Date-Received: Sat, 11-Jul-87 16:32:10 EDT Organization: U of Arizona CS Dept, Tucson Lines: 19 bc's "e" function uses "t" as a local variable (to save the value of "scale"), but doesn't declare it. Thus, calling e changes the value of t globally. Try: bc -l t=0 e(0) t It'll probably tell you that t is 20 or somesuch. To fix, edit /usr/lib/lib.b and just add t to the auto list for e. Of course, if there are any bc programs around that count on e setting t to the value of scale, they'll break. Bill Mitchell whm@arizona.edu {allegra,ihnp4,noao}!arizona!whm