-----------------------------------------------------------
New Message on MumbaiUserGroup
-----------------------------------------------------------
From: Edward
Message 1 in Discussion
Hi ,
I am facing a problem while doing
calculation using double data type.
When I am subtracting 2 double datatype
variable with decimal values, the fraction part of the result is not
correct.
eg: Dim dblValue1 as double =
100.55
Dim
dblValue2 as double = 90
Dim dblResult =
dblValue1 - dblValue2 'dbResult has a value
10.54999999999
Instead of having a value of 10.55,
the actual value dblResult shows is 10.54999999999
But if I use Decimal datatype, then it
shows proper value.
But I have noticed , that if the result
is greater than 32 then the value is proper
eg: Dim dblValue1 as double =
100.55
Dim
dblValue2 as double = 50
Dim dblResult =
dblValue1 - dblValue2 'dbResult has a value 50.55
can anybody explain this behaviour
?
I am using VS 2003, and VB.Net as the
language and working on .Net Compact Framework.
Thanx
Edward
Fernandes
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/mumbaiusergroup/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you received
this message by mistake, please click the "Remove" link below. On the pre-addressed
e-mail message that opens, simply click "Send". Your e-mail address will be deleted
from this group's mailing list.
mailto:[EMAIL PROTECTED]