在PHP中将指数转换为整数 [英] Convert exponential to a whole number in PHP
本文介绍了在PHP中将指数转换为整数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
可能重复:
在php中将指数转换为十进制
Possible Duplicate:
Convert exponential number to decimal in php
是否可以使用内置函数在PHP中将指数转换为整数?格式功能?
Is there a way to convert an exponential number to a whole number in PHP using built in functions? A format function?
1.2378147769392E + 14至123781477693917
1.2378147769392E+14 to 123781477693917
推荐答案
number_format(1.2378147769392E+14,0,'','')
However, for working with large numbers, if you want to keep precision, you should look into BCMath extension
这篇关于在PHP中将指数转换为整数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文