701件ヒット
[1-100件を表示]
(0.101秒)
ライブラリ
- ビルトイン (499)
- bigdecimal (77)
- csv (22)
- mathn (4)
- matrix (11)
- openssl (33)
- pathname (11)
- prime (33)
-
rinda
/ tuplespace (11)
クラス
- Array (11)
- BigDecimal (77)
- Bignum (6)
- Complex (44)
- Data (2)
-
Enumerator
:: Lazy (44) - Fixnum (6)
- Float (30)
- IO (33)
- Integer (76)
- Matrix (11)
- Method (11)
- Object (26)
-
OpenSSL
:: BN (33) - Pathname (11)
- Prime (22)
- Proc (11)
- Rational (26)
-
Rinda
:: TupleEntry (11) - String (55)
モジュール
- Enumerable (155)
キーワード
- % (22)
- [] (21)
- abs (11)
- abs2 (11)
-
bit
_ length (17) - encode (33)
-
enum
_ for (22) - expires (11)
- inject (33)
-
int
_ from _ prime _ division (11) - lazy (11)
- magnitude (11)
-
max
_ by (44) -
mod
_ exp (11) -
mod
_ sqr (11) - modulo (11)
- parameters (22)
-
parse
_ csv (11) - pow (22)
- power (22)
-
prime
_ division (22) - reduce (33)
- remainder (11)
- round (19)
-
set
_ encoding (33) - split (11)
- then (12)
-
to
_ csv (11) -
to
_ enum (22) -
to
_ f (11) -
to
_ h (12) - uniq (22)
- with (2)
- write (11)
-
yield
_ self (14)
検索結果
先頭5件
-
Integer
# **(other) -> Numeric (18137.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... -
Rational
# **(other) -> Rational | Float (18125.0) -
冪(べき)乗を計算します。
...す。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
//}... -
Bignum
# **(other) -> Fixnum | Bignum | Float (18119.0) -
算術演算子。冪(べき乗)を計算します。
...算術演算子。冪(べき乗)を計算します。
@param other 二項演算の右側の引数(対象)
@return 計算結果
2 ** 3 # => 8
2 ** 0 # => 1
0 ** 0 # => 1... -
Fixnum
# **(other) -> Fixnum | Bignum | Float (18119.0) -
算術演算子。冪(べき乗)を計算します。
...算術演算子。冪(べき乗)を計算します。
@param other 二項演算の右側の引数(対象)
@return 計算結果
2 ** 3 # => 8
2 ** 0 # => 1
0 ** 0 # => 1... -
Float
# **(other) -> Float (18119.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 (18107.0) -
冪(べき)乗を計算します。
...冪(べき)乗を計算します。
@param other 自身を other 乗する数
//emlist[例][ruby]{
Complex('i') ** 2 # => (-1+0i)
//}... -
BigDecimal
# **(n) -> BigDecimal (18101.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 -
Matrix
# **(n) -> Matrix (18101.0) -
self の n 乗を返します。
self の n 乗を返します。
@param n べき数の指定
@raise ExceptionForMatrix::ErrNotRegular n が 0 以下で、行列が正則でない場合に発生します -
OpenSSL
:: BN # **(other) -> OpenSSL :: BN (18101.0) -
自身の other 乗を返します。
自身の other 乗を返します。
@param other 指数
@raise OpenSSL::BNError 計算時エラー
@see OpenSSL::BN#mod_exp -
Rational
# **(rhs) -> Numeric (18101.0) -
@todo
@todo
self のべき乗を返します。 Rational になるようであれば Rational で返します。 -
Integer
# pow(other) -> Numeric (3037.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... -
Integer
# pow(other , modulo) -> Integer (3037.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...