Home >Backend Development >PHP Tutorial >1/1000000,该怎么处理

1/1000000,该怎么处理

PHP中文网
PHP中文网Original
2016-06-13 10:27:251940browse

  1/1000000
怎么计算这个结果?
怎么才能让它等于0.000001

------解决方案--------------------
我猜他是想不输出科学计数...

  • PHP code
echo sprintf("%f",1/1000000);

不精确,用gmp,bc

以上就是1/1000000,该怎么处理的内容,更多相关内容请关注PHP中文网(www.php.cn)!


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn