07-29-2022, 11:18 PM
Well I did some checking, and Treebeard's string math also lacks the ability to deal with repetends.
So we don't get back to 1. Instead, we get 1 / 3 = .3... and * 3 = .9...
Pete
Code: (Select All)
DIM AS STRING n, m, r
DIM AS LONG i, j
t = TIMER
INPUT "enter n ", n
IF n = "" THEN
n = "1"
PRINT "n = "; n
END IF
INPUT "enter m ", m
IF m = "" THEN
m = "3"
PRINT "m = "; m
END IF
PRINT
bDiv n, m, r
PRINT "n / m = "; r
n = r
bMul n, m, r
PRINT "r * m = "; r
So we don't get back to 1. Instead, we get 1 / 3 = .3... and * 3 = .9...
Pete