calc.c 2+0.1 = 2.99999991
Calculating n+0.1 returns n.99999991. Calculating n+0.2 returns n.19999982 (not that far off). Its just weird
Could you also check more than one decimal placed values? Just rechecked my code and think there might be an issue for more values like 0.23 evaluated as 0.5...
I'll check this later. PC and laptop (VM) are on a scheduled maintenance (virus scan and malware scan) and its 12:16 AM in my country, plus I have class at 9 later. I have to sleep first.
So, I accidentally typed 0+0.25 and the result it returns is 0.7. And 2+0.25 returns 2.70000008. So, I think it has something to do with floating point rounding (tested with VMware Fusion)
No 0.23 -> 0.5 is due to the code I wrote...
A pure program error... (Fixed the 0.23 -> 0.5 issue already)
This issue ism most likely caused by floating point conversions. We need a double to string method...