114件ヒット
[1-100件を表示]
(0.023秒)
種類
- インスタンスメソッド (92)
- 文書 (11)
- クラス (11)
ライブラリ
- ビルトイン (103)
検索結果
先頭5件
-
Float
# modulo(other) -> Float (24203.0) -
算術演算子。剰余を計算します。
算術演算子。剰余を計算します。
@param other 二項演算の右側の引数(対象)
//emlist[例][ruby]{
# 剰余
3.0 % 1.2 # => 0.6000000000000001
3.0 % 0.0 # ZeroDivisionError
//} -
Bignum
# modulo(other) -> Fixnum | Bignum | Float (15203.0) -
算術演算子。剰余を計算します。
算術演算子。剰余を計算します。
@param other 二項演算の右側の引数(対象)
@return 計算結果 -
Fixnum
# modulo(other) -> Fixnum | Bignum | Float (15203.0) -
算術演算子。剰余を計算します。
算術演算子。剰余を計算します。
@param other 二項演算の右側の引数(対象)
@return 計算結果 -
Float
# %(other) -> Float (9103.0) -
算術演算子。剰余を計算します。
算術演算子。剰余を計算します。
@param other 二項演算の右側の引数(対象)
//emlist[例][ruby]{
# 剰余
3.0 % 1.2 # => 0.6000000000000001
3.0 % 0.0 # ZeroDivisionError
//} -
Float
# divmod(other) -> [Numeric] (9006.0) -
self を other で割った商 q と余り r を、 [q, r] という 2 要素の配列にして返します。 商 q は常に整数ですが、余り r は整数であるとは限りません。
...ます。
@param other 自身を割る数を指定します。
//emlist[例][ruby]{
11.divmod(3) # => [3, 2]
(11.5).divmod(3.5) # => [3, 1.0]
11.divmod(-3) # => [-4, -1]
11.divmod(3.5) # => [3, 0.5]
(-11).divmod(3.5) # => [-4, 3.0]
//}
@see Numeric#div, Numeric#modulo... -
Integer
# pow(other , modulo) -> Integer (125.0) -
算術演算子。冪(べき乗)を計算します。
...子。冪(べき乗)を計算します。
@param other 二項演算の右側の引数(対象)
@param modulo 指定すると、計算途中に巨大な値を生成せずに (self**other) % modulo と同じ結果を返します。
@return 計算結果
@raise TypeError 2引数 pow で Integer 以外......-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
//}
判定... -
Bignum
# remainder(other) -> Fixnum | Bignum | Float (113.0) -
self を other で割った余り r を返します。
...self を other で割った余り r を返します。
r の符号は self と同じになります。
@param other self を割る数。
@see Bignum#divmod, Bignum#modulo, Numeric#modulo... -
Bignum
# %(other) -> Fixnum | Bignum | Float (103.0) -
算術演算子。剰余を計算します。
算術演算子。剰余を計算します。
@param other 二項演算の右側の引数(対象)
@return 計算結果 -
Fixnum
# %(other) -> Fixnum | Bignum | Float (103.0) -
算術演算子。剰余を計算します。
算術演算子。剰余を計算します。
@param other 二項演算の右側の引数(対象)
@return 計算結果 -
Numeric (88.0)
-
数値を表す抽象クラスです。Integer や Float などの数値クラス は Numeric のサブクラスとして実装されています。
...数値を表す抽象クラスです。Integer や Float などの数値クラス
は Numeric のサブクラスとして実装されています。
演算や比較を行うメソッド(+, -, *, /, <=>)は Numeric のサブクラスで定義されま
す。Numeric で定義されているメソッ......ださい。
=> ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]
Numeric Integer Fixnum Bignum Float Rational Complex
-------------------------------------------------------------------------------------------......o
Numeric Integer Fixnum Bignum Float Rational Complex
-------------------------------------------------------------------------------------------
modulo | o - o o o -......を参照してください。
=> ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-darwin15]
Numeric Integer Float Rational Complex
--------------------------------------------------------------------------------
% | o......Numeric Integer Float Rational Complex
--------------------------------------------------------------------------------
magnitude | o o o o o
modulo | o o o... -
ruby 1
. 6 feature (30.0) -
ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。
...gmentation fault
=> ruby 1.6.5 (2001-10-15) [i586-linux]
MatchData
NotImplementedError
FloatDomainError
LoadError
Float
Binding
SignalException
Module
-:6:in `method_missing': stack level too......メソッドが定数以外にアクセス可能になっていたバグが修正されました
((<ruby-dev:13019>))
: ((<Marshal>)).dump
((<Float>)) を dump するときの精度が "%.12g" から "%.16g" になりました。
((<ruby-list:29349>))
: ((<Fixnum>))#[]
sizeof(long) > siz......1.6.3 (2001-04-03) [i586-linux]
-1073741824
# => ruby 1.6.4 (2001-04-19) [i586-linux]
1073741824
: ((<Float>))#modulo, ((<Float>))#divmod
なんか修正されたみたいです ((<ruby-dev:12718>))
: ((<ObjectSpace>))#_id2ref
不正に例外を返す場合... -
Integer
# **(other) -> Numeric (25.0) -
算術演算子。冪(べき乗)を計算します。
...子。冪(べき乗)を計算します。
@param other 二項演算の右側の引数(対象)
@param modulo 指定すると、計算途中に巨大な値を生成せずに (self**other) % modulo と同じ結果を返します。
@return 計算結果
@raise TypeError 2引数 pow で Integer 以外......-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
//}
判定... -
Integer
# pow(other) -> Numeric (25.0) -
算術演算子。冪(べき乗)を計算します。
...子。冪(べき乗)を計算します。
@param other 二項演算の右側の引数(対象)
@param modulo 指定すると、計算途中に巨大な値を生成せずに (self**other) % modulo と同じ結果を返します。
@return 計算結果
@raise TypeError 2引数 pow で Integer 以外......-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
//}
判定...