Atucc.1671 net.micro utzoo!decvax!duke!tucc!dgary Fri Apr 9 15:04:43 1982 Re: whuxlb.206: IBM PC divide bug revisited My experimentation with a PC confirms earlier reports that the arithmetic bug is indeed in the output routines. For latecomers, the problem is this: Dividing .1 by 10 yields .001 if and only iff double precision arithmetic is used. PC BASIC uses a # to indicate double precision, so PRINT .1#/10# prints .001. This is also the case with double precision variables. What's going on? Well, .1#/10# is stored as something like 9.9999999d-3. This is within the fuzz-range of 10d-3, but the normal output routine messes up the normalization and decimal placement and gives us .001 (1d-3) instead of the corect .01 (10d-3). For obvious reasonns, this only happens when rounding up, so .1# * .1# is okay. The long-term solution is to badger IBM into giving us new ROMs. In the meantime, PRINT USING will eliminate the problem. -Gary Grady, Duke User Services (dgary)