Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Rounding when not wanted
Message
From
25/05/2005 13:07:10
 
 
To
25/05/2005 12:02:49
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP1
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01017554
Message ID:
01017577
Views:
18
>Hi.
>Haven't been here in a while.
>
>Here is a strange one, to me anyway.
>
>why is 5000 * 0.01099 = 54.95?
>
>but
>lnNum1 = 5000
>lnNum2 = 0.01099
>
>lnNum1 * lnNum2 = 55.00 ? Why is this one rounded?
>
>TIA

sure ?
*	Hi.
*	Haven't been here in a while.

*	Here is a strange one, to me anyway.

? 5000 * 0.01099 = 54.95           && it return .T.

? 5000 * 0.01099  = 54.95000000000 && it return .F.

*	but 
	lnNum1 = 5000
	lnNum2 = 0.01099

?  lnNum1 * lnNum2 = 55.00          && it return .F.
for print the number, check SET FIXED OFF.
Previous
Reply
Map
View

Click here to load this message in the networking platform