General format. For a given precision p >= 1, this rounds the number
to p significant digits and then formats the result in either
fixed-point format or in scientific notation, depending on its
magnitude.
The precise rules are as follows: suppose that the result formatted
with presentation type 'e' and precision p-1 would have exponent exp.
Then if -4 <= exp < p, the number is formatted with presentation type
'f' and precision p-1-exp. Otherwise, the number is formatted with
presentation type 'e' and precision p-1. In both cases insignificant
trailing zeros are removed from the significand, and the decimal point
is also removed if there are no remaining digits following it.
Positive and negative infinity, positive and negative zero, and nans,
are formatted as inf, -inf, 0, -0 and nan respectively, regardless of
the precision.
A precision of 0 is treated as equivalent to a precision of 1. The
default precision is 6.
最后
以上就是强健航空最近收集整理的关于php 正数 加号,在正数前加一个加号的全部内容,更多相关php内容请搜索靠谱客的其他文章。
发表评论 取消回复