Math.sqrt

平方根を得る

構文

Math.sqrt(x)

引数

x=数値

例文

<html>
<head>
<title>Math.sqrt</title>
</head>

<body>

<!--平方根を得るのサンプル-->
<script type="text/javascript">
document.write('0の平方根は'+Math.sqrt(0)+"<br>");
document.write('1の平方根は'+Math.sqrt(1)+"<br>");
document.write('9の平方根は'+Math.sqrt(9)+"<br>");
document.write('0.64の平方根は'+Math.sqrt(0.64)+"<br>");
document.write('-9の平方根は'+Math.sqrt(-9));
</script>

</body>
</html>

関連記事

スポンサーリンク

REGR_COUNT関数 回帰直線の調整に使用されるnull以外の数値のペアの数を表す整数を返す

ホームページ製作・web系アプリ系の製作案件募集中です。

上に戻る