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 build 7601(Windows 7 Ultimate Edition Service Pack 1)中使用 PHP 5.4.4
round()PHP中有函数吗?
round()
<?php print round(8.553577896, 2); ?>
试试看,我不完全确定。