I have this formula to get the FinalQuantity = Quantity / Price
. Quantity
is declared as double
and Price
is float
.
If I enter the values manually in the Code. FinalQuantity = 9000000 / 102.6411
it will have an output of 87684.173299000118
.
But if I assign the values to the variables Quantity
and Price
. It will output 87684.174988370942
. I have tried converting Quantity
to Integer
and Price
to double
but still getting this same result.
Could someone help me how to fix it.