554件ヒット
[201-300件を表示]
(0.044秒)
別のキーワード
キーワード
- % (12)
- & (12)
- * (12)
- ** (12)
- + (12)
- - (12)
-
/ (11) - < (12)
- << (12)
- <= (12)
- <=> (12)
- == (12)
- === (12)
- > (12)
- >= (12)
- >> (12)
- [] (24)
- ^ (12)
- allbits? (8)
- anybits? (8)
- ceil (12)
- ceildiv (3)
- chr (24)
- digits (24)
- div (12)
- divmod (12)
- downto (24)
- fdiv (12)
- floor (12)
- inspect (12)
- modulo (12)
- nobits? (8)
- pow (24)
-
prime
_ division (12) - rationalize (24)
- remainder (12)
- round (12)
-
to
_ s (12) - truncate (12)
- upto (24)
- | (12)
検索結果
先頭5件
-
Integer
# ===(other) -> bool (8.0) -
比較演算子。数値として等しいか判定します。
...比較演算子。数値として等しいか判定します。
@param other 比較対象の数値
@return self と other が等しい場合 true を返します。
そうでなければ false を返します。
//emlist[][ruby]{
1 == 2 # => false
1 == 1.0 # => true
//}... -
Integer
# >(other) -> bool (8.0) -
比較演算子。数値として大きいか判定します。
...比較演算子。数値として大きいか判定します。
@param other 比較対象の数値
@return self よりも other の方が小さい場合 true を返します。
そうでなければ false を返します。
//emlist[][ruby]{
1 > 0 # => true
1 > 1 # => fals... -
Integer
# >=(other) -> bool (8.0) -
比較演算子。数値として等しいまたは大きいか判定します。
...比較演算子。数値として等しいまたは大きいか判定します。
@param other 比較対象の数値
@return self よりも other の方が小さい場合か、
両者が等しい場合 true を返します。
そうでなければ false を返しま... -
Integer
# >>(bits) -> Integer (8.0) -
シフト演算子。bits だけビットを右にシフトします。
...、符号ビット(最上位ビット(MSB))が保持されます。
bitsが実数の場合、小数点以下を切り捨てた値でシフトします。
@param bits シフトさせるビット数
//emlist[][ruby]{
printf("%#b\n", 0b0101 >> 1) # => 0b10
p -1 >> 1 # => -1
//}... -
Integer
# [](nth) -> Integer (8.0) -
nth 番目のビット(最下位ビット(LSB)が 0 番目)が立っている時 1 を、そうでなければ 0 を返します。
...nth 番目のビット(最下位ビット(LSB)が 0 番目)が立っている時 1
を、そうでなければ 0 を返します。
@param nth 何ビット目を指すかの数値
@return 1 か 0
//emlist[][ruby]{
a = 0b11001100101010
30.downto(0) {|n| print a[n] }
# => 00000000000000000110... -
Integer
# ^(other) -> Integer (8.0) -
ビット二項演算子。排他的論理和を計算します。
...ビット二項演算子。排他的論理和を計算します。
@param other 数値
//emlist[][ruby]{
1 ^ 1 # => 0
2 ^ 3 # => 1
//}... -
Integer
# allbits?(mask) -> bool (8.0) -
self & mask の全てのビットが 1 なら true を返します。
...@param mask ビットマスクを整数で指定します。
//emlist[][ruby]{
42.allbits?(42) # => true
0b1010_1010.allbits?(0b1000_0010) # => true
0b1010_1010.allbits?(0b1000_0001) # => false
0b1000_0010.allbits?(0b1010_1010) # => false
//}
@see Integer#anybits?
@see Integer#n... -
Integer
# anybits?(mask) -> bool (8.0) -
self & mask のいずれかのビットが 1 なら true を返します。
...@param mask ビットマスクを整数で指定します。
//emlist[][ruby]{
42.anybits?(42) # => true
0b1010_1010.anybits?(0b1000_0010) # => true
0b1010_1010.anybits?(0b1000_0001) # => true
0b1000_0010.anybits?(0b0010_1100) # => false
//}
@see Integer#allbits?
@see Integer#n... -
Integer
# ceil(ndigits = 0) -> Integer (8.0) -
self と等しいかより大きな整数のうち最小のものを返します。
...self と等しいかより大きな整数のうち最小のものを返します。
@param ndigits 10進数での小数点以下の有効桁数を整数で指定します。
負の整数を指定した場合、小数点位置から左に少なくとも n 個の 0 が並びます。... -
Integer
# ceil(ndigits = 0) -> Integer | Float (8.0) -
self と等しいかより大きな整数のうち最小のものを返します。
...。
@param ndigits 10進数での小数点以下の有効桁数を整数で指定します。
正の整数を指定した場合、Float を返します。
小数点以下を、最大 n 桁にします。
負の整数を指定した場合、Integer を返... -
Integer
# ceildiv(other) -> Integer (8.0) -
self を other で割り、その(剰余を考えない)商を整数に切り上げたものを返します。 すなわち、self を other で割った商を q とすると、q 以上で最小の整数を返します。
...上げたものを返します。
すなわち、self を other で割った商を q とすると、q 以上で最小の整数を返します。
@param other self を割る数を指定します。
//emlist[][ruby]{
3.ceildiv(3) # => 1
4.ceildiv(3) # => 2
5.ceildiv(3) # => 2
3.ceildiv(1.2)... -
Integer
# chr -> String (8.0) -
self を文字コードとして見た時に、引数で与えたエンコーディング encoding に対応する文字を返します。
...先的に解釈します。
//emlist[][ruby]{
p 0x79.chr.encoding # => #<Encoding:US_ASCII>
p 0x80.chr.encoding # => #<Encoding:ASCII_8BIT>
//}
@param encoding エンコーディングを表すオブジェクト。Encoding::UTF_8、'shift_jis' など。
@return 一文字からなる文字列
@...