Seems like a design flaw in BASIC. Since FP numbers cannot exactly
represent all numbers that can be written in decimal (unless it's some kind
of BCD format), it really should be keeping those FP numbers stored in a
decimal or string format.

Given this flaw it seems it's really only correct to put exactly
representable fp literals into a program text or the BASIC program has a
bug.

It would be interesting to know what literals are OK. And for your program
it would be neat to print a warning to stderr if it tokenizes a problem FP
literal. But that would require figuring out the format.

"Is it possible for there to be a loop such that the number would never
stop changing?"

Sounds like a difficult proof. I would just assume it can given Murphy's
Law.

-- John.

Reply via email to