Hi, I tried to minus two double, but the result is not correct.
doubleA (11.38) - doubleB (11)
it returns 0.380000000000001.
May I have any comments. Thanks.
Hi, I tried to minus two double, but the result is not correct.
doubleA (11.38) - doubleB (11)
it returns 0.380000000000001.
May I have any comments. Thanks.
Hello,
I think that is same across many languages. Others can correct me if I am wrong because python also give same o/p.
yes, the output precision is an approximate binary representation in case of some decimal values.
This is sometimes greater or less than the actual answer
Please format your result 2 decimal places and you should be good