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.
我正在尝试将 5e-08 转换为正确的小数点,我如何使用 PHP 完成此操作
<?php $value = 5; $real_btc = $value/1e8; echo $real_btc;
这返回
5.0E-8
我需要它返回正确的十进制值 0.00000005
我怎么能用 PHP 做到这一点?
printf与适当的格式说明符一起使用:
printf
printf("%.8f", 5 / 1e8);