るりまサーチ

最速Rubyリファレンスマニュアル検索!
814件ヒット [1-100件を表示] (0.126秒)
トップページ > クエリ:l[x] > クエリ:>[x] > クエリ:**[x]

別のキーワード

  1. matrix l
  2. kernel $-l
  3. _builtin $-l
  4. lupdecomposition l
  5. l

ライブラリ

クラス

モジュール

オブジェクト

キーワード

検索結果

<< 1 2 3 ... > >>

Rational#**(other) -> Rational | Float (21324.0)

冪(べき)乗を計算します。

...に Float を指定した場合は、計算結果を Float で返しま
す。other が有理数であっても、計算結果が無理数だった場合は Float
を返します。

//emlist[例][ruby]{
r = Rational(3, 4)
r ** Rational(2, 1) # => (9/16)
r ** 2 # => (9/16)
r ** 2.0...
...# => 0.5625
r ** Rational(1, 2) # => 0.866025403784439
//}...

Float#**(other) -> Float (21318.0)

算術演算子。冪を計算します。

...算術演算子。冪を計算します。

@param other 二項演算の右側の引数(対象)

//emlist[例][ruby]{
# 冪
1.2 ** 3.0 # => 1.7279999999999998
3.0 + 4.5 - 1.3 / 2.4 * 3 % 1.2 ** 3.0 # => 5.875
0.0 ** 0 # => 1.0
//}...

Complex#**(other) -> Complex (21306.0)

冪(べき)乗を計算します。

...冪(べき)乗を計算します。

@param other 自身を other 乗する数

//emlist[例][ruby]{
Complex('i') ** 2 # => (-1+0i)
//}...

BigDecimal#**(n) -> BigDecimal (21300.0)

self の n 乗を計算します。

...self の n 乗を計算します。

戻り値の有効桁数は self の有効桁数の n 倍以上になります。

@param n selfを other 乗する数を指定します。

@param prec 有効桁数を整数で指定します。...
...self の n 乗を計算します。

戻り値の有効桁数は self の有効桁数の n 倍以上になります。

@param n selfを other 乗する数を指定します。

@param prec 有効桁数を整数で指定します。


@see Integer#pow...

OpenSSL::BN#**(other) -> OpenSSL::BN (21300.0)

自身の other 乗を返します。

...自身の other 乗を返します。

@param other 指数
@raise OpenSSL::BNError 計算時エラー
@see OpenSSL::BN#mod_exp...

絞り込み条件を変える

Rational#**(rhs) -> Numeric (21200.0)

@todo

...@todo

self のべき乗を返します。 Rational になるようであれば Rational で返します。...

Bignum#**(other) -> Fixnum | Bignum | Float (18318.0)

算術演算子。冪(べき乗)を計算します。

...算術演算子。冪(べき乗)を計算します。

@param other 二項演算の右側の引数(対象)
@return 計算結果

2 ** 3 # => 8
2 ** 0 # => 1
0 ** 0 # => 1...

Fixnum#**(other) -> Fixnum | Bignum | Float (18318.0)

算術演算子。冪(べき乗)を計算します。

...算術演算子。冪(べき乗)を計算します。

@param other 二項演算の右側の引数(対象)
@return 計算結果

2 ** 3 # => 8
2 ** 0 # => 1
0 ** 0 # => 1...

Enumerable#lazy -> Enumerator::Lazy (6336.0)

自身を lazy な Enumerator に変換したものを返します。

...身を lazy な Enumerator に変換したものを返します。

この Enumerator は、以下のメソッドが遅延評価を行う (つまり、配列ではな
くEnumeratorを返す) ように再定義されています。

* map/collect
* flat_map/collect_concat
* select/find_all
* reje...
...ct
* grep
* take, take_while
* drop, drop_while
* zip (※一貫性のため、ブロックを渡さないケースのみlazy)
* cycle (※一貫性のため、ブロックを渡さないケースのみlazy)

以下はピタゴラス数 (a**2 + b**2 = c**2 を満たす自然数 a, b, c の組)...
...//emlist[例][ruby]{
def pythagorean_triples
(1..Float::INFINITY).lazy.flat_map {|z|
(1..z).flat_map {|x|
(x..z).select {|y|
x**2 + y**2 == z**2
}.map {|y|
[x, y, z]
}
}
}
end
# 最初の10個のピタゴラス数を表示する
p pythagorean_triples.ta...

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

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

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

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

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

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

@raise TypeErr...
...らかに負の数を指定した場合に発生します。

//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 (6306.0)

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

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

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

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

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

@raise TypeErr...
...らかに負の数を指定した場合に発生します。

//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 (6306.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...
<< 1 2 3 ... > >>