758件ヒット
[501-600件を表示]
(0.185秒)
ライブラリ
- ビルトイン (758)
キーワード
- % (11)
- & (11)
- * (11)
- ** (11)
- + (11)
- - (11)
- -@ (11)
-
/ (10) - < (11)
- << (11)
- <= (11)
- <=> (11)
- == (11)
- === (11)
- > (11)
- >= (11)
- >> (11)
- [] (21)
- ^ (11)
- abs (11)
- allbits? (7)
- anybits? (7)
-
bit
_ length (11) - ceil (11)
- ceildiv (2)
- chr (22)
- denominator (11)
- digits (22)
- div (11)
- divmod (11)
- downto (22)
- even? (11)
- fdiv (11)
- floor (11)
- gcd (11)
- gcdlcm (11)
- inspect (11)
- integer? (11)
- lcm (11)
- magnitude (11)
- modulo (11)
- next (11)
- nobits? (7)
- numerator (11)
- odd? (11)
- ord (11)
- pow (22)
- pred (11)
- rationalize (22)
- remainder (11)
- round (11)
- size (11)
- succ (11)
- times (22)
-
to
_ f (11) -
to
_ i (11) -
to
_ int (11) -
to
_ r (11) -
to
_ s (11) - truncate (11)
- upto (22)
- | (11)
- ~ (11)
検索結果
先頭5件
-
Integer
# numerator -> Integer (8002.0) -
分子(常に自身)を返します。
...分子(常に自身)を返します。
@return 分子を返します。
//emlist[][ruby]{
10.numerator # => 10
-10.numerator # => -10
//}
@see Integer#denominator... -
Integer
# odd? -> bool (8002.0) -
自身が奇数であれば真を返します。 そうでない場合は偽を返します。
自身が奇数であれば真を返します。
そうでない場合は偽を返します。
//emlist[][ruby]{
5.odd? # => true
10.odd? # => false
//} -
Integer
# ord -> Integer (8002.0) -
自身を返します。
自身を返します。
//emlist[][ruby]{
10.ord #=> 10
# String#ord
?a.ord #=> 97
//}
@see String#ord -
Integer
# pow(other) -> Numeric (8002.0) -
算術演算子。冪(べき乗)を計算します。
...に巨大な値を生成せずに (self**other) % modulo と同じ結果を返します。
@return 計算結果
@raise TypeError 2引数 pow で Integer 以外を指定した場合に発生します。
@raise RangeError 2引数 pow で other に負の数を指定した場合に発生します。
//... -
Integer
# pow(other , modulo) -> Integer (8002.0) -
算術演算子。冪(べき乗)を計算します。
...に巨大な値を生成せずに (self**other) % modulo と同じ結果を返します。
@return 計算結果
@raise TypeError 2引数 pow で Integer 以外を指定した場合に発生します。
@raise RangeError 2引数 pow で other に負の数を指定した場合に発生します。
//... -
Integer
# pred -> Integer (8002.0) -
self から -1 した値を返します。
...self から -1 した値を返します。
//emlist[][ruby]{
1.pred #=> 0
(-1).pred #=> -2
//}
@see Integer#next... -
Integer
# rationalize -> Rational (8002.0) -
自身を Rational に変換します。
自身を Rational に変換します。
@param eps 許容する誤差
引数 eps は常に無視されます。
//emlist[][ruby]{
2.rationalize # => (2/1)
2.rationalize(100) # => (2/1)
2.rationalize(0.1) # => (2/1)
//} -
Integer
# rationalize(eps) -> Rational (8002.0) -
自身を Rational に変換します。
自身を Rational に変換します。
@param eps 許容する誤差
引数 eps は常に無視されます。
//emlist[][ruby]{
2.rationalize # => (2/1)
2.rationalize(100) # => (2/1)
2.rationalize(0.1) # => (2/1)
//} -
Integer
# remainder(other) -> Numeric (8002.0) -
self を other で割った余り r を返します。
.../emlist[][ruby]{
5.remainder(3) # => 2
-5.remainder(3) # => -2
5.remainder(-3) # => 2
-5.remainder(-3) # => -2
-1234567890987654321.remainder(13731) # => -6966
-1234567890987654321.remainder(13731.24) # => -9906.22531493148
//}
@see Integer#divmod, Integer#modulo, Numeric#modulo... -
Integer
# round(ndigits = 0 , half: :up) -> Integer (8002.0) -
self ともっとも近い整数を返します。
self ともっとも近い整数を返します。
@param ndigits 10進数での小数点以下の有効桁数を整数で指定します。
負の整数を指定した場合、小数点位置から左に少なくとも n 個の 0 が並びます。
@param half ちょうど半分の値の丸め方を指定します。
サポートされている値は以下の通りです。
* :up or nil: 0から遠い方に丸められます。
* :even: もっとも近い偶数に丸められます。
* :down: 0に近い方に丸められます。
//emlist[][ruby]{
1.round # =...