mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* bignum.c (bigdivrem_normal): Add assertions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
35f11f306d
commit
dd95c9b1cd
2 changed files with 7 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
Wed Sep 4 20:22:43 2013 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* bignum.c (bigdivrem_normal): Add assertions.
|
||||
|
||||
Wed Sep 4 19:18:40 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* internal.h (vm_state_version_t): prefer LONG_LONG to uint64_t.
|
||||
|
|
3
bignum.c
3
bignum.c
|
@ -2640,6 +2640,9 @@ bigdivrem_normal(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, BDIGIT *y
|
|||
{
|
||||
int shift;
|
||||
|
||||
assert(zn == xn + 1);
|
||||
assert(yn < xn || (xn == yn && yds[yn - 1] <= xds[xn - 1]));
|
||||
|
||||
shift = nlz(yds[yn-1]);
|
||||
if (shift) {
|
||||
bary_small_lshift(yds, yds, yn, shift);
|
||||
|
|
Loading…
Add table
Reference in a new issue