I am using the following PHP code...
echo round(($satoshiValue/pow(10,8)),8);
When,
$satoshiValue = 10000, result is
0.0001 as expected.
But, when,
$satoshiValue = 10000000, result is
0.10000000000000001. Expected was
0.1 though.
Why is this happening?
p.s. I could not find a better place to ask this question on BitcoinTalk. So, asking it here. If mods think, it does not fit here, feel free to move.