JavaScript 数値演算 新しいページはコチラ
提供: yonewiki
(→常用対数 $\log_2 \mathrm{e} $ Math.LOG2E/$\log_{10} \mathrm{e} $ LOG10E) |
(→平方根$ \sqrt{2} $ Math.SQRT2/$ \frac{\sqrt{2}}{2} $SQRT1_2) |
||
105行: | 105行: | ||
+ | サンプル | ||
+ | <syntaxhighlight lang="javascript" line start="1"> | ||
+ | <HTML> | ||
+ | <HEAD> | ||
+ | <TITLE>JavaScript Math 定数</TITLE> | ||
+ | </HEAD> | ||
+ | <BODY> | ||
+ | JavaScript Math 定数<br /> | ||
+ | <SCRIPT Language="JavaScript"> | ||
+ | <!-- | ||
+ | document.write("Math.PI = ", Math.PI, "<BR />"); | ||
+ | document.write("Math.E = ", Math.E, "<BR />"); | ||
+ | document.write("Math.LN2 = ", Math.LN2, "<BR />"); | ||
+ | document.write("Math.LN10 = ", Math.LN10, "<BR />"); | ||
+ | document.write("Math.LOG2E = ", Math.LOG2E, "<BR />"); | ||
+ | document.write("Math.LOG10E = ", Math.LOG10E, "<BR />"); | ||
+ | document.write("Math.SQRT2 = ", Math.SQRT2, "<BR />"); | ||
+ | document.write("Math.SQRT1_2 = ", Math.SQRT1_2, "<BR />"); | ||
+ | --> | ||
+ | </SCRIPT> | ||
+ | </BODY> | ||
+ | </HTML> | ||
+ | </syntaxhighlight> | ||
− | |||
− | |||
− | |||
− | |||
− | |||