るりまサーチ

最速Rubyリファレンスマニュアル検索!
722件ヒット [601-700件を表示] (0.152秒)
トップページ > クエリ:t[x] > クエリ:Ruby[x] > クエリ:ruby[x] > クエリ:@[x] > 種類:インスタンスメソッド[x] > クラス:Integer[x]

別のキーワード

  1. rbconfig ruby
  2. fiddle ruby_free
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

キーワード

検索結果

<< < ... 5 6 7 8 > >>

Integer#&(other) -> Integer (3120.0)

ビット二項演算子。論理積を計算します。

...ビット二項演算子。論理積を計算します。

@
param other 数値

//emlist[][ruby]{
1 & 1 # => 1
2 & 3 # => 2
//}...

Integer#<<(bits) -> Integer (3120.0)

シフト演算子。bits だけビットを左にシフトします。

...シフト演算子。bits だけビットを左にシフトします。

@
param bits シフトさせるビット数

//emlist[][ruby]{
printf("%#b\n", 0b0101 << 1) # => 0b1010
p -1 << 1 # => -2
//}...

Integer#>>(bits) -> Integer (3120.0)

シフト演算子。bits だけビットを右にシフトします。

...。bits だけビットを右にシフトします。

右シフトは、符号ビット(最上位ビット(MSB))が保持されます。
bitsが実数の場合、小数点以下を切り捨てた値でシフトします。

@
param bits シフトさせるビット数

//emlist[][ruby]{
printf("%#b\n...

Integer#^(other) -> Integer (3120.0)

ビット二項演算子。排他的論理和を計算します。

...ビット二項演算子。排他的論理和を計算します。

@
param other 数値

//emlist[][ruby]{
1 ^ 1 # => 0
2 ^ 3 # => 1
//}...

Integer#ceildiv(other) -> Integer (3120.0)

self を other で割り、その(剰余を考えない)商を整数に切り上げたものを返します。 すなわち、self を other で割った商を q とすると、q 以上で最小の整数を返します。

...self を other で割り、その(剰余を考えない)商を整数に切り上げたものを返します。
すなわち、self を other で割った商を q とすると、q 以上で最小の整数を返します。

@
param other self を割る数を指定します。

//emlist[][ruby]{
3.ceil...

絞り込み条件を変える

Integer#ord -> Integer (3120.0)

自身を返します。

...自身を返します。

//emlist[][ruby]{
10.ord #=> 10
# String#ord
?a.ord #=> 97
//}

@
see String#ord...

Integer#pred -> Integer (3120.0)

self から -1 した値を返します。

...self から -1 した値を返します。

//emlist[][ruby]{
1.pred #=> 0
(-1).pred #=> -2
//}

@
see Integer#next...

Integer#size -> Integer (3120.0)

整数の実装上のサイズをバイト数で返します。

...整数の実装上のサイズをバイト数で返します。

//emlist[][ruby]{
p 1.size # => 8
p 0x1_0000_0000.size # => 8
//}

@
see Integer#bit_length...

Integer#succ -> Integer (3120.0)

self の次の整数を返します。

...self の次の整数を返します。

//emlist[][ruby]{
1.next #=> 2
(-1).next #=> 0
1.succ #=> 2
(-1).succ #=> 0
//}

@
see Integer#pred...

Integer#|(other) -> Integer (3120.0)

ビット二項演算子。論理和を計算します。

...ビット二項演算子。論理和を計算します。

@
param other 数値

//emlist[][ruby]{
1 | 1 # => 1
2 | 3 # => 3
//}...

絞り込み条件を変える

<< < ... 5 6 7 8 > >>