[net.unix] Strange 'bc' behavior

andysc@houxv.UUCP (A.SCHLAFLY) (05/02/86)

'bc' seems to have trouble retaining accuracy with base 16.  Try
the following example, done on a VAX 11/780 under UNIX V rel 2v2 (but
similar behavior found on other machines):

$ bc
ibase=16
obase=10
scale=30
x=0.3333
x
".332"
x*2
".665"
x*2.0000
".66594A"
x=.33330000
x
".3332FF"

Can anybody offer an explanation?  Thanks in advance.

                                          Andy Schlafly
                                          ...ihnp4!houxv!andysc