<?
$x = 0; for ($i = 1; $i <= 63; $i++) { $x = ($x + pow(2 , $i)); print $i . " - " . $x . "<br>"; } ?>
with this code i calculate a very big number like this... 63 - 1.844674407371E+019 but i want that as a real number... anybody knows how to ?
printf('%d - %f <br>', $i, $x);
that will format the output for you. Check the manual for more info.
yes that works... but it just adds 0s at the end of calculated number... i need exacly correct value of the number...
You may have top look at the maximum precision defined in the php.ini. Check the manual for more info on how many decimals PHP uses max.