summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-12-01 09:24:48 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-12-01 09:24:48 +0000
commita9fe26f1749b2e3f6607c739caa52faa9384c252 (patch)
treef7f7c3660de0b444cbbcff4bd378120c59f3fe37 /bignum.c
parent7b319538c27af2928a20c4e1f0108386f7fe2a37 (diff)
19991201
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_4@573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bignum.c b/bignum.c
index 36a46af3fd..05df7c1683 100644
--- a/bignum.c
+++ b/bignum.c
@@ -20,7 +20,7 @@ typedef unsigned short USHORT;
#define BIGRAD (1L << BITSPERDIG)
#define DIGSPERINT ((unsigned int)(sizeof(long)/sizeof(short)))
#define BIGUP(x) ((unsigned long)(x) << BITSPERDIG)
-#define BIGDN(x) (((x)<0) ? ~((~(x))>>BITSPERDIG) : (x)>>BITSPERDIG)
+#define BIGDN(x) RSHIFT(x,BITSPERDIG)
#define BIGLO(x) ((USHORT)((x) & (BIGRAD-1)))
static VALUE