It might include a general math question.
I am using Math calculation library trader
trader_stddev function returns like -7.5E+37
I need to round this for mor simple percentage.
round($number,2)
doesn't work.
How can I make it ? and How do you call this E
??( I would like to google around about this E but I am not sure how to call this)
This is scientific notation. The e
stands for exponent or the exponential function, and this is how PHP reports extremely large (or extremely small) numbers. So your number is actually -7.5 x (10^37)
.
Instead of round()
, you can use number_format()
to get what you need:
number_format($number, 2);
E is exponential function, a shortcut in computer to imply a power that the number 10
is raised into then be multiplied to the number that means the output is actually
-7.5x(10^37).