diff options
| author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-03-11 10:37:09 +0000 |
|---|---|---|
| committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-03-11 10:37:09 +0000 |
| commit | 6c93dee7ed9eddf55431ae734502bad335f7e50a (patch) | |
| tree | eee2ddb6d51f0f8bed81ac943b75f3cbe6c92cb0 | |
| parent | b5154b0eb71f0b1c523a1361fff2221907c87fc5 (diff) | |
merge revision(s) 57179:
bignum.c: precise fdiv
* bignum.c (big_fdiv): more precise calculation. [ruby-dev:49915]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@57832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | bignum.c | 2 | ||||
| -rw-r--r-- | version.h | 2 |
2 files changed, 3 insertions, 1 deletions
@@ -6101,6 +6101,8 @@ big_fdiv(VALUE x, VALUE y, long ey) l = BIGNUM_LEN(x); ex = l * BITSPERDIG - nlz(BDIGITS(x)[l-1]); ex -= 2 * DBL_BIGDIG * BITSPERDIG; + if (ex > BITSPERDIG) ex -= BITSPERDIG; + else if (ex > 0) ex = 0; if (ex) x = big_shift(x, ex); bigdivrem(x, y, &z, 0); @@ -1,6 +1,6 @@ #define RUBY_VERSION "2.4.0" #define RUBY_RELEASE_DATE "2017-03-11" -#define RUBY_PATCHLEVEL 2 +#define RUBY_PATCHLEVEL 3 #define RUBY_RELEASE_YEAR 2017 #define RUBY_RELEASE_MONTH 3 |
