I have a java code to do a multiplication like this:
TickSize = minTick * AdjustFactor;
They are all double. When the code runs here, the miniSize value is 5.0E-7, AdjustFactor is 100. But I get a result as 4.9999999999999996E-5, instead of a 5.0E-5. This is very annoying and break the other module of my software.
The following is the debug message print out right after the above statement is executed.
minTick is 5.0E-7 Tick adjust factor is : 100.0 TickSize set to: 4.9999999999999996E-5
I wonder if anybody know what is going on? and what I can do to correct it to get result 5.0E-5?
Thanks,