diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-10-30 10:31:01 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-10-30 10:31:01 +0000 |
commit | 53f01519ab4aa76362c0ab88362ad5d77493e896 (patch) | |
tree | b665becdaefdd374063e8cda75d33f50e1590c94 /bignum.c | |
parent | fdd234c6769035b69fe98523d861f4498176136b (diff) |
* bignum.c (rb_big2str0): use better approximation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r-- | bignum.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -636,7 +636,7 @@ rb_big2str0(x, base, trim) switch (base) { case 2: break; case 3: - j = j * 647L / 1024; + j = j * 53L / 84 + 1; break; case 4: case 5: case 6: case 7: j /= 2; @@ -645,7 +645,7 @@ rb_big2str0(x, base, trim) j /= 3; break; case 10: case 11: case 12: case 13: case 14: case 15: - j = j * 241L / 800 + 1; + j = j * 28L / 93 + 1; break; case 16: case 17: case 18: case 19: case 20: case 21: case 22: case 23: case 24: case 25: case 26: case 27: |