るりまサーチ

最速Rubyリファレンスマニュアル検索!
48件ヒット [1-48件を表示] (0.048秒)

別のキーワード

  1. logger log
  2. webrick/log log
  3. syslog log
  4. math log
  5. _builtin log

ライブラリ

検索結果

Math.#log2(x) -> Float (24318.0)

2 を底とする x の対数(binary logarithm)を返します。

...底とする x の対数(binary logarithm)を返します。

@
param x 正の実数

@
raise TypeError xに数値以外を指定した場合に発生します。

@
raise Math::DomainError x に範囲外の実数を指定した場合に発生します。

@
raise RangeError xに実数以外の数...
...値を指定した場合に発生します。

//emlist[例][ruby]{
Math
.log2(1) # => 0.0
Math
.log2(2) # => 1.0
Math
.log2(32768) # => 15.0
Math
.log2(65536) # => 16.0
//}

@
see Math.#log, Math.#log10...

Math.#log(x) -> Float (18212.0)

x の対数(logarithm)を返します。

...の対数(logarithm)を返します。

引数 x, b の両方に 0 を指定した場合は Float::NAN を返します。

@
param x 正の実数を指定します。

@
param b 底を指定します。省略した場合は自然対数(natural logarithm)を計算します。

@
raise TypeError...
...

@
raise RangeError 引数のどちらかに実数以外の数値を指定した場合に発生します。

@
raise DomainError 引数のどちらかに負の数を指定した場合に発生します。

//emlist[例][ruby]{
Math
.log(0) # => -Infinity
Math
.log(1) # => 0.0
Math
.log...
...(Math::E) # => 1.0
Math
.log(Math::E**3) # => 3.0
Math
.log(12, 3) # => 2.2618595071429146
//}

@
see Math.#log2, Math.#log10, Math.#exp...

Math.#log(x, b) -> Float (18212.0)

x の対数(logarithm)を返します。

...の対数(logarithm)を返します。

引数 x, b の両方に 0 を指定した場合は Float::NAN を返します。

@
param x 正の実数を指定します。

@
param b 底を指定します。省略した場合は自然対数(natural logarithm)を計算します。

@
raise TypeError...
...

@
raise RangeError 引数のどちらかに実数以外の数値を指定した場合に発生します。

@
raise DomainError 引数のどちらかに負の数を指定した場合に発生します。

//emlist[例][ruby]{
Math
.log(0) # => -Infinity
Math
.log(1) # => 0.0
Math
.log...
...(Math::E) # => 1.0
Math
.log(Math::E**3) # => 3.0
Math
.log(12, 3) # => 2.2618595071429146
//}

@
see Math.#log2, Math.#log10, Math.#exp...

Math.#log10(x) -> Float (6193.0)

x の常用対数(common logarithm)を返します。

...x の常用対数(common logarithm)を返します。

@
param x 正の実数

@
raise TypeError xに数値以外を指定した場合に発生します。

@
raise Math::DomainError x に範囲外の実数を指定した場合に発生します。

@
raise RangeError xに実数以外の数値を...
...指定した場合に発生します。

//emlist[例][ruby]{
Math
.log10(1) # => 0.0
Math
.log10(10) # => 1.0
Math
.log10(10**100) # => 100.0
//}

@
see Math.#log, Math.#log2...