JavaScript/双精度浮点数:修订间差异
来自康健生活
| 第59行: | 第59行: | ||
科学计数法可以方便的表示小数点的位置。 | 科学计数法可以方便的表示小数点的位置。 | ||
使用科学计数法表达浮点数的公式为 <math>value = (-1)^{sign} \times mantissa \times \text{base}^{exponent}</math>, 并且 <math>(1 \leq mantissa < base , exponent \in Z)</math>;<math>base</math> | 使用科学计数法表达浮点数的公式为 <math>value = (-1)^{sign} \times mantissa \times \text{base}^{exponent}</math>, 并且 <math>(2 \leq base < \infty, 1 \leq mantissa < base , exponent \in Z)</math>;<math>base</math> 为基数(进制)。 | ||
比如十进制 <code>-27.15625</code>,推导 <math>-27.15625 = (-1)^{1} \times 2.715625 \times 10^{1} = -2.715625E+1</math>。 | 比如十进制 <code>-27.15625</code>,推导 <math>-27.15625 = (-1)^{1} \times 2.715625 \times 10^{1} = -2.715625E+1</math>。 | ||