Bug? wrong multiplication result?

ajk

Active Member
Licensed User
Longtime User
I have
Dim CenaDBL,RownaSieDBL, KrotnoscDBL, StaraKrotnoscDBL As Double

then in code:
RownaSieDBL = KrotnoscDBL*CenaDBL
I got:

CenaDBL=2.2
KrotnoscDBL=99999.0
RownaSieDBL=219997.80000000002

Something went wrong?
 

sorex

Expert
Licensed User
Longtime User
smells like a typical floating point issue. round it to 2 values behind the comma?
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…