Skip to content

Instantly share code, notes, and snippets.

@akihiromukae
Created February 3, 2018 09:28
Show Gist options
  • Save akihiromukae/089bb25a0fe5e9da4e92de3ca002fc21 to your computer and use it in GitHub Desktop.
Save akihiromukae/089bb25a0fe5e9da4e92de3ca002fc21 to your computer and use it in GitHub Desktop.
$num = (0.1 + 0.7) * 10;
$num = bcmul(bcadd(0.1, 0.7, 1), 10, 1);
php -r 'echo bcmul(bcadd(0.1, 0.7), 10)."\n";'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment