Yukihiro "Matz" Matsumoto
e60acfc6ff
mruby-numeric-ext: add Integer#bit_length
...
Implement Integer#bit_length in mrbgems/mruby-numeric-ext.
- Fixnum: zero returns 0; negatives follow ~self rule; count bits by shifts.
- Bigint (MRB_USE_BIGINT): handle sign; negatives via mrb_bint_rev, then bit
length via length of mrb_bint_to_s(..., 2).
- Add tests in mrbgems/mruby-numeric-ext/test/numeric.rb.
- Update README with examples.
Co-authored-by: Codex CLI <codex@openai.com >
2025-08-14 10:53:12 +09:00
..
2025-08-14 10:53:07 +09:00
2025-08-14 10:53:02 +09:00
2024-06-09 22:49:46 +09:00
2025-07-05 16:49:26 +09:00
2025-05-19 08:00:36 +09:00
2025-06-24 04:02:41 +00:00
2025-05-19 08:00:36 +09:00
2025-05-14 01:14:02 +10:00
2025-07-17 12:51:35 +09:00
2025-08-14 10:52:47 +09:00
2025-07-05 18:32:46 +09:00
2025-08-14 10:52:49 +09:00
2025-08-14 10:52:49 +09:00
2025-07-11 10:09:35 +09:00
2025-08-14 10:52:45 +09:00
2025-08-14 10:52:49 +09:00
2025-08-14 10:52:45 +09:00
2025-07-15 11:54:12 +09:00
2025-08-14 10:52:45 +09:00
2025-08-14 10:52:49 +09:00
2025-08-14 10:52:46 +09:00
2025-08-14 10:52:49 +09:00
2025-08-14 10:52:46 +09:00
2025-08-14 10:52:47 +09:00
2025-07-29 01:27:49 +10:00
2025-08-14 10:52:49 +09:00
2025-08-14 10:53:09 +09:00
2025-08-14 10:52:49 +09:00
2025-08-14 10:53:10 +09:00
2025-08-14 10:52:49 +09:00
2025-08-14 10:52:49 +09:00
2025-08-14 10:53:03 +09:00
2025-08-14 10:52:46 +09:00
2025-08-14 10:53:12 +09:00
2025-08-14 10:52:49 +09:00
2025-08-14 10:52:49 +09:00
2025-06-24 13:56:07 +09:00
2025-08-14 10:53:12 +09:00
2025-07-17 12:53:58 +09:00
2025-08-14 10:52:49 +09:00
2025-08-14 10:53:10 +09:00
2025-08-14 10:52:49 +09:00
2025-08-14 10:52:45 +09:00
2025-08-14 10:53:05 +09:00
2025-08-14 10:52:47 +09:00
2025-08-14 10:52:44 +09:00
2025-08-14 10:52:49 +09:00
2025-08-14 10:52:54 +09:00
2025-08-14 10:52:49 +09:00
2025-08-14 10:52:49 +09:00
2025-05-10 08:59:18 +09:00
2024-09-24 00:14:24 +10:00
2025-08-14 10:53:08 +09:00
2025-08-14 10:52:47 +09:00
2021-01-06 18:10:21 +09:00
2021-01-06 18:10:21 +09:00
2023-04-04 19:31:42 +10:00
2025-01-14 13:30:33 +09:00
2025-05-14 15:58:23 +09:00
2025-05-14 15:58:24 +09:00
2022-11-29 15:58:05 +09:00
2025-01-06 13:57:23 +09:00
2025-05-19 08:00:36 +09:00