るりまサーチ

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

別のキーワード

  1. net/imap param
  2. win32ole win32ole_param
  3. win32ole_param retval?
  4. win32ole_param output?
  5. win32ole_param input?

ライブラリ

検索結果

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

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

...

@param other 自身を other 乗する数

other に 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
//}...
...冪(べき)乗を計算します。

@param other 自身を other 乗する数
@raise ArgumentError 計算結果の分母・分子が巨大すぎる場合に発生します。

other に 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
//}...