Login
Back to forumSee the full topicGo to last reply

Posted By

JamesC
on 2006-06-26
22:35:38
 Re: The Plus4 programmer Summer quiz!

I think someone is full of themselves from the World Cup or something..... kicking poor Q around, makes him feel like a spotted ball instead of a proper variable!

It is simple rounding error in the BASIC PRINT evaluation routine. The fraction of the number over 255 is too small to worry about, so the computer forgets it when PRINTING
the expression 6+Q*7. However the actual variable Q holds the value 35.5714826, which becomes 249.0000002 when multiplied by 7. Add the 6, and you have 255.0000002, which is definately not 255 at the point where the computer evaluates the <>.

But then again, I used the Microsoft calculator gadget in Vista Beta 2 to get those 7 places after the decimal, so there could be a problem in Microsoft code, as well. happy



Back to top


Copyright © Plus/4 World Team, 2001-2024