542件ヒット
[1-100件を表示]
(0.017秒)
種類
- 特異メソッド (218)
- インスタンスメソッド (199)
- モジュール関数 (90)
- 文書 (35)
クラス
- Data (9)
-
Enumerator
:: Lazy (48) - Float (21)
- IO (180)
- Integer (74)
- Matrix (12)
-
OpenSSL
:: BN (36) - Prime (24)
- Rational (1)
オブジェクト
-
Readline
:: HISTORY (12)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) -
NEWS for Ruby 2
. 7 . 0 (6) -
NEWS for Ruby 3
. 0 . 0 (5) - [] (33)
-
enum
_ for (24) - exp! (6)
-
for
_ fd (12) - frexp (12)
- getrlimit (12)
- load (12)
- log (24)
- log10 (12)
-
mod
_ exp (12) -
mod
_ sqr (12) - new (15)
- open (24)
- pipe (96)
- pow (24)
-
prime
_ division (36) - read (36)
- restore (12)
- round (21)
-
ruby 1
. 6 feature (12) - sqrt (8)
-
to
_ enum (24) - with (3)
検索結果
先頭5件
-
Integer
# **(other) -> Numeric (18148.0) -
算術演算子。冪(べき乗)を計算します。
...elf**other) % modulo と同じ結果を返します。
@return 計算結果
@raise TypeError 2引数 pow で Integer 以外を指定した場合に発生します。
@raise RangeError 2引数 pow で other に負の数を指定した場合に発生します。
//emlist[][ruby]{
2 ** 3 # => 8
2 ** 0......# => 1
0 ** 0 # => 1
3.pow(3, 8) # => 3
3.pow(3, -8) # => -5
3.pow(2, -2) # => -1
-3.pow(3, 8) # => 5
-3.pow(3, -8) # => -3
5.pow(2, -8) # => -7
//}
結果が巨大すぎる整数になりそうなとき、警告を出したうえで Float::INFINITY を返します。
//emlist[計算を......放棄して Float::INFINITY を返す例][ruby]{
p 100**9999999
# => warning: in a**b, b may be too big
# Infinity
//}
判定の閾値は変わりえます。
@see BigDecimal#power......成せずに (self**other) % modulo と同じ結果を返します。
@return 計算結果
@raise TypeError 2引数 pow で Integer 以外を指定した場合に発生します。
@raise RangeError 2引数 pow で other に負の数を指定した場合に発生します。
@raise ArgumentError 計......算結果が巨大になりすぎる場合に発生します。
//emlist[][ruby]{
2 ** 3 # => 8
2 ** 0 # => 1
0 ** 0 # => 1
3.pow(3, 8) # => 3
3.pow(3, -8) # => -5
3.pow(2, -2) # => -1
-3.pow(3, 8) # => 5
-3.pow(3, -8) # => -3
5.pow(2, -8) # => -7
//}
計算結果が巨大すぎるとき......は ArgumentError が発生します。
//emlist[計算結果が巨大すぎる例][ruby]{
p 100**9999999999999999999
# => exponent is too large (ArgumentError)
//}
判定の閾値は変わりえます。
@see BigDecimal#power... -
Rational
# **(other) -> Rational | Float (18130.0) -
冪(べき)乗を計算します。
...冪(べき)乗を計算します。
@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
//}... -
Matrix
# **(n) -> Matrix (18106.0) -
self の n 乗を返します。
...self の n 乗を返します。
@param n べき数の指定
@raise ExceptionForMatrix::ErrNotRegular n が 0 以下で、行列が正則でない場合に発生します... -
OpenSSL
:: BN # **(other) -> OpenSSL :: BN (18106.0) -
自身の other 乗を返します。
...自身の other 乗を返します。
@param other 指数
@raise OpenSSL::BNError 計算時エラー
@see OpenSSL::BN#mod_exp... -
Integer
# pow(other) -> Numeric (3048.0) -
算術演算子。冪(べき乗)を計算します。
...elf**other) % modulo と同じ結果を返します。
@return 計算結果
@raise TypeError 2引数 pow で Integer 以外を指定した場合に発生します。
@raise RangeError 2引数 pow で other に負の数を指定した場合に発生します。
//emlist[][ruby]{
2 ** 3 # => 8
2 ** 0......# => 1
0 ** 0 # => 1
3.pow(3, 8) # => 3
3.pow(3, -8) # => -5
3.pow(2, -2) # => -1
-3.pow(3, 8) # => 5
-3.pow(3, -8) # => -3
5.pow(2, -8) # => -7
//}
結果が巨大すぎる整数になりそうなとき、警告を出したうえで Float::INFINITY を返します。
//emlist[計算を......放棄して Float::INFINITY を返す例][ruby]{
p 100**9999999
# => warning: in a**b, b may be too big
# Infinity
//}
判定の閾値は変わりえます。
@see BigDecimal#power......成せずに (self**other) % modulo と同じ結果を返します。
@return 計算結果
@raise TypeError 2引数 pow で Integer 以外を指定した場合に発生します。
@raise RangeError 2引数 pow で other に負の数を指定した場合に発生します。
@raise ArgumentError 計......算結果が巨大になりすぎる場合に発生します。
//emlist[][ruby]{
2 ** 3 # => 8
2 ** 0 # => 1
0 ** 0 # => 1
3.pow(3, 8) # => 3
3.pow(3, -8) # => -5
3.pow(2, -2) # => -1
-3.pow(3, 8) # => 5
-3.pow(3, -8) # => -3
5.pow(2, -8) # => -7
//}
計算結果が巨大すぎるとき......は ArgumentError が発生します。
//emlist[計算結果が巨大すぎる例][ruby]{
p 100**9999999999999999999
# => exponent is too large (ArgumentError)
//}
判定の閾値は変わりえます。
@see BigDecimal#power... -
Integer
# pow(other , modulo) -> Integer (3048.0) -
算術演算子。冪(べき乗)を計算します。
...elf**other) % modulo と同じ結果を返します。
@return 計算結果
@raise TypeError 2引数 pow で Integer 以外を指定した場合に発生します。
@raise RangeError 2引数 pow で other に負の数を指定した場合に発生します。
//emlist[][ruby]{
2 ** 3 # => 8
2 ** 0......# => 1
0 ** 0 # => 1
3.pow(3, 8) # => 3
3.pow(3, -8) # => -5
3.pow(2, -2) # => -1
-3.pow(3, 8) # => 5
-3.pow(3, -8) # => -3
5.pow(2, -8) # => -7
//}
結果が巨大すぎる整数になりそうなとき、警告を出したうえで Float::INFINITY を返します。
//emlist[計算を......放棄して Float::INFINITY を返す例][ruby]{
p 100**9999999
# => warning: in a**b, b may be too big
# Infinity
//}
判定の閾値は変わりえます。
@see BigDecimal#power......成せずに (self**other) % modulo と同じ結果を返します。
@return 計算結果
@raise TypeError 2引数 pow で Integer 以外を指定した場合に発生します。
@raise RangeError 2引数 pow で other に負の数を指定した場合に発生します。
@raise ArgumentError 計......算結果が巨大になりすぎる場合に発生します。
//emlist[][ruby]{
2 ** 3 # => 8
2 ** 0 # => 1
0 ** 0 # => 1
3.pow(3, 8) # => 3
3.pow(3, -8) # => -5
3.pow(2, -2) # => -1
-3.pow(3, 8) # => 5
-3.pow(3, -8) # => -3
5.pow(2, -8) # => -7
//}
計算結果が巨大すぎるとき......は ArgumentError が発生します。
//emlist[計算結果が巨大すぎる例][ruby]{
p 100**9999999999999999999
# => exponent is too large (ArgumentError)
//}
判定の閾値は変わりえます。
@see BigDecimal#power... -
IO
. read(path , **opt) -> String | nil (115.0) -
path で指定されたファイルを offset 位置から length バイト分読み込んで返します。
...使われるオプションをキーワード引数で指定します。
@raise Errno::EXXX path のオープン、offset 位置への設定、ファイルの読み込みに失敗した場合に発生します。
@raise ArgumentError length が負の場合に発生します。
キーワード引... -
IO
. read(path , length = nil , **opt) -> String | nil (115.0) -
path で指定されたファイルを offset 位置から length バイト分読み込んで返します。
...使われるオプションをキーワード引数で指定します。
@raise Errno::EXXX path のオープン、offset 位置への設定、ファイルの読み込みに失敗した場合に発生します。
@raise ArgumentError length が負の場合に発生します。
キーワード引... -
IO
. read(path , length = nil , offset = 0 , **opt) -> String | nil (115.0) -
path で指定されたファイルを offset 位置から length バイト分読み込んで返します。
...使われるオプションをキーワード引数で指定します。
@raise Errno::EXXX path のオープン、offset 位置への設定、ファイルの読み込みに失敗した場合に発生します。
@raise ArgumentError length が負の場合に発生します。
キーワード引... -
IO
. for _ fd(fd , mode = "r" , **opts) -> IO (110.0) -
オープン済みのファイルディスクリプタ fd に対する新しい IO オブジェクトを生成して返します。
...定した fd のモードを引き継ぎ、
利用できない環境では "r" になります。
@param opts キーワード引数
@raise Errno::EXXX IO オブジェクトの生成に失敗した場合に発生します。
//emlist[例:IO.new による読み込みモードでのフ...