Math.log

値の対数を得る

構文

Math.log(x)

引数

x=数値

例文

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

<body>

<!--値の対数を得るのサンプル-->
<script type="text/javascript">
document.write('2の対数は'+Math.log(2)+"です<br>");
document.write('1の対数は'+Math.log(1)+"です<br>");
document.write('0の対数は'+Math.log(0)+"です<br>");
document.write('-1の対数は'+Math.log(-1)+"です<br>");
</script>

</body>
</html>

関連記事

スポンサーリンク

free メモリーの使用状況を表示する

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

上に戻る