home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Tool Box
/
SIMS_2.iso
/
bp_6_93
/
bonus
/
winer
/
chap8-7.bas
< prev
next >
Wrap
BASIC Source File
|
1992-05-12
|
329b
|
19 lines
'*********** CHAP8-7.BAS - shows how to avoid math rounding errors
'Copyright (c) 1992 Ethan Winer
Value! = 1!
Result! = 2!
CLS
FOR X = 1 TO 1000
Value! = Value! + .001
NEXT
IF ABS(Value! - Result!) < .0001 THEN
PRINT "They are equal"
ELSE
PRINT "Value! ="; Value!
PRINT "Result! ="; Result!
END IF