Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
これを実行すると:
<?php echo round(8.553577896, 2); ?>
8.550000000000000710542735760100185871124267578125の代わりに返します8.55。なんで?round関数を使用して正しく動作させる方法はありますか?
8.550000000000000710542735760100185871124267578125
8.55
round
Windows NT 6.1 ビルド 7601 (Windows 7 Ultimate Edition Service Pack 1) で PHP 5.4.4 を使用しています。
round()PHPに関数はありますか?
round()
<?php print round(8.553577896, 2); ?>
それを試してみてください。完全にはわかりません。