mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Faster Integer.sqrt for large bignum
Integer.sqrt uses Newton's method. This pull request reduces the precision which was unnecessarily high in each calculation step.
This commit is contained in:
parent
dcfbe36cb5
commit
0ff2c7fe6f
3 changed files with 13 additions and 70 deletions
|
@ -86,6 +86,7 @@ VALUE rb_int_equal(VALUE x, VALUE y);
|
|||
VALUE rb_int_divmod(VALUE x, VALUE y);
|
||||
VALUE rb_int_and(VALUE x, VALUE y);
|
||||
VALUE rb_int_lshift(VALUE x, VALUE y);
|
||||
VALUE rb_int_rshift(VALUE x, VALUE y);
|
||||
VALUE rb_int_div(VALUE x, VALUE y);
|
||||
int rb_int_positive_p(VALUE num);
|
||||
int rb_int_negative_p(VALUE num);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue