PHP Large Float, need to round
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.
精彩评论