るりまサーチ

最速Rubyリファレンスマニュアル検索!
37件ヒット [1-37件を表示] (0.040秒)
トップページ > クエリ:Integer[x] > クエリ:size[x] > クエリ:bit_length[x]

別のキーワード

  1. _builtin size
  2. net/imap size
  3. _builtin size?
  4. rexml/document size
  5. fiddle sizeof_size_t

ライブラリ

クラス

キーワード

検索結果

Integer#bit_length -> Integer (39304.0)

self を表すのに必要なビット数を返します。

...by]{
(-2**12-1).bit_length # => 13
(-2**12).bit_length # => 12
(-2**12+1).bit_length # => 12
-0x101.bit_length # => 9
-0x100.bit_length # => 8
-0xff.bit_length # => 8
-2.bit_length # => 1
-1.bit_length # => 0
0.bit_length #...
...=> 0
1.bit_length # => 1
0xff.bit_length # => 8
0x100.bit_length # => 9
(2**12-1).bit_length # => 12
(2**12).bit_length # => 13
(2**12+1).bit_length # => 13
//}

@see Integer#size...

Integer#size -> Integer (39226.0)

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

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

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

@see Integer#bit_length...

Numeric (88.0)

数値を表す抽象クラスです。Integer や Float などの数値クラス は Numeric のサブクラスとして実装されています。

...数値を表す抽象クラスです。Integer や Float などの数値クラス
は Numeric のサブクラスとして実装されています。

演算や比較を行うメソッド(+, -, *, /, <=>)は Numeric のサブクラスで定義されま
す。Numeric で定義されているメソッ...
...- o - o
arg | o - - - o - o
bit_length
| - - o o - - -
ceil | o o -...
...dded | o - - - - - -
size
| - - o o - - -
Numeric Integer Fixnum Bignum Float Rational Complex
-----------...
...angle | o - o - o
arg | o - o - o
bit_length
| - o - - -
ceil | o o o o -...
...round | o o o o -
singleton_method_added | o - - - -
size
| - o - - -
step | o - - - -...

NEWS for Ruby 3.0.0 (36.0)

NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...eql? are now defined and will return true for separate Proc instances if the procs were created from the same block. 14267
* Queue / SizedQueue
* Queue#pop, SizedQueue#push and related methods may now invoke the `block`/`unblock` scheduler hooks in a non-blocking context. 16786
* Ractor...
...redirected to a closed pipe, no broken pipe error message will be shown now. 14413
* `TRUE`/`FALSE`/`NIL` constants are no longer defined.
* Integer#zero? overrides Numeric#zero? for optimization. 16961
* Enumerable#grep and Enumerable#grep_v when passed a Regexp and no block no longer modi...
...heir subclasses.
* Method inlining support for some C methods
* `Kernel`: `#class`, `#frozen?`
* `Integer`: `#-@`, `#~`, `#abs`, `#bit_length`, `#even?`, `#integer?`, `#magnitude`, `#odd?`, `#ord`, `#to_i`, `#to_int`, `#zero?`
* `Struct`: reader methods for 10th or later...