PHP/Math/Scientific Notation

Материал из Web эксперт
Перейти к: навигация, поиск

doubles can be specified in scientific notation

   <source lang="html4strict">

<? $small_positive = 5.5e-3; print("small_positive is $small_positive
"); $large_positive = 2.8e+16; print("large_positive is $large_positive
"); $small_negative = -2222e-10; print("small_negative is $small_negative
"); $large_negative = -0.00189e6; print("large_negative is $large_negative
"); ?>

      </source>