Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why does 0.33 not equal 1/3?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Why does 0.33 not equal 1/3?
Miscellaneous
Thread ID:
00669276
Message ID:
00669276
Views:
37
I am running VFP6 sp3 and I am having a problem. I enter the following in the command window:

x=0.33
y=1/3
?x=y

When I test x=y, I get .F.? With deciamls set to 2, both x and y return 0.33, but yet compare false. I have set exact off. Can anyone explain what I am missing?

Kind Regards,

Mat
Matthew Kennedy
Decision Support Technology Inc.

"I try to take one day at a time, but sometimes several days attack me all at once." ~ Ashleigh Brilliant

New Jersey Dot Net User Group
Next
Reply
Map
View

Click here to load this message in the networking platform