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
|
@ -5169,7 +5169,7 @@ fix_rshift(long val, unsigned long i)
|
|||
*
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
VALUE
|
||||
rb_int_rshift(VALUE x, VALUE y)
|
||||
{
|
||||
if (FIXNUM_P(x)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue