Errors with binary math meaning errors occur when we use computer binary math to represent base 10 output. So it's not the language, it's the principle. For instance, try running the following...
You will see inaccuracies in both DIM models. So the computer counts in base 2, whatever the language. The only way around it is to make a math library for the language to access.
Pete
Code: (Select All)
DIM j AS SINGLE
FOR i = 1 TO 10
j = 1 / 10 + j
PRINT i, j
NEXT
PRINT
FOR i = 1 TO 100
j = .01 * i
PRINT i, j
SLEEP
NEXT
DIM k AS DOUBLE
CLS
FOR i = 1 TO 10
k = 1 / 10 + k
PRINT i, k
NEXT
PRINT
FOR i = 1 TO 100
k = .01 * i
PRINT i, k
SLEEP
NEXT
You will see inaccuracies in both DIM models. So the computer counts in base 2, whatever the language. The only way around it is to make a math library for the language to access.
Pete