问题
What is the difference in PHP between a value that prints as -9.838335106976932e18 and one that prints as -9.838335106976932E+18? (note the "e18" vs "E+18")
回答1:
Absolutely no difference. Those are two different conventions in printing a number in scientific notation. Specifically:
- the
E
can be either lower or upper case. The former is printed with format string%e
, the latter (which is less common), with format string%E
. - the
+
before exponent (and/or base) can be omitted.
Regarding the first point, maybe those two values are printed using different format strings, but without code, it is hard to tell.
来源:https://stackoverflow.com/questions/21216316/difference-between-e-and-e-in-scientific-notation