开发者

PHP Large Float, need to round

开发者 https://www.devze.com 2023-04-06 19:02 出处:网络
I have a program that is giv开发者_如何学Pythoning me this number: 9.1466606511048E-8 I need to round that, using most obvious functions in PHP gives me 0.That\'s because that number has a value of 0.

I have a program that is giv开发者_如何学Pythoning me this number: 9.1466606511048E-8 I need to round that, using most obvious functions in PHP gives me 0.


That's because that number has a value of 0.000000091466606511048, which is very close to zero. Perhaps you need to be more specific about what sort of rounding you want.


How many decimals are you attempting to round to?

The number that you specified is the same as: 0.000000091466606511048

If you're using the round function without specifying to what decimal place you want to round, then it is going to round to zero because of the value.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号