I am trying to prove the 0.1+0.2=0.30000000000000004 by adding the numbers 0.1, and 0.2 in IEEE floating-point representation. I have added the operand values in IEEE format, with the general addition of bits the result I got is 1.0011001100110011001100110011001100110011001100110100 as mantissa, and the exponent value is 01111111101. Now When I tried to convert this binary number into a decimal number I have used the formula
$(-1)^s * $(1+mantissa) * $(2)^e$ , where s is sign bit and e stands for exponent bit value
where I need to calculate the 2^-48 and other values wherever the value is 1 in the result mantissa bits. I have used an online precision calculator to calculate the values of 2^-49, and others where the results are as below negative exponent of 2 values
And the final decimal value I got is 0.3000000000000000444089209850062616169452667236328125 but the value I should get it as 0.30000000000000004, the answer which many of the programming languages give you. Do not know where I am going wrong. Can anyone let me know If I am following any wrong process or my calculation part is going wrong?