bcdiv using very small float with scientific notation cause “Division by zero” error
Using bcdiv, i can't divide with small float using scientific notation : Working code : bcscale(30); $a = '1' ; $b = '0.00000001'; $result = bcdiv($a, $b); var_dump($result); Results in : string(20) "100000000.0000000000" Non-working code : bcscale(30); $a = '1' ; $b = '1e-8'; $result = bcdiv($a, $b); var_dump($result); Results in : Warning: bcdiv() [function.bcdiv]: Division by zero in C:\wamp\www\utilitaires\test_bcdiv.php on line XX NULL How can i do this division properly, with the less precision loss ? That is because, actually, bcmath doesn't support scientific notation. It isn't