[前][次][番号順一覧][スレッド一覧]

ruby-changes:30675

From: akr <ko1@a...>
Date: Sun, 1 Sep 2013 11:39:12 +0900 (JST)
Subject: [ruby-changes:30675] akr:r42754 (trunk): * bignum.c (maxpow_in_bdigit): Removed.

akr	2013-09-01 11:39:05 +0900 (Sun, 01 Sep 2013)

  New Revision: 42754

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42754

  Log:
    * bignum.c (maxpow_in_bdigit): Removed.

  Modified files:
    trunk/ChangeLog
    trunk/bignum.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 42753)
+++ ChangeLog	(revision 42754)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sun Sep  1 11:38:26 2013  Tanaka Akira  <akr@f...>
+
+	* bignum.c (maxpow_in_bdigit): Removed.
+
 Sun Sep  1 10:30:42 2013  Tanaka Akira  <akr@f...>
 
 	* numeric.c (rb_fix_bit_length): Moved from bignum.c.
Index: bignum.c
===================================================================
--- bignum.c	(revision 42753)
+++ bignum.c	(revision 42754)
@@ -358,40 +358,6 @@ maxpow_in_bdigit_dbl(int base, int *exp_ https://github.com/ruby/ruby/blob/trunk/bignum.c#L358
     return maxpow;
 }
 
-static BDIGIT
-maxpow_in_bdigit(int base, int *exp_ret)
-{
-    BDIGIT maxpow;
-    int exponent;
-
-    {
-#if SIZEOF_BDIGITS == 0
-#elif SIZEOF_BDIGITS == 2
-        maxpow = maxpow16_num[base-2];
-        exponent = maxpow16_exp[base-2];
-#elif SIZEOF_BDIGITS == 4
-        maxpow = maxpow32_num[base-2];
-        exponent = maxpow32_exp[base-2];
-#elif SIZEOF_BDIGITS == 8 && defined HAVE_UINT64_T
-        maxpow = maxpow64_num[base-2];
-        exponent = maxpow64_exp[base-2];
-#elif SIZEOF_BDIGITS == 16 && defined HAVE_UINT128_T
-        maxpow = maxpow128_num[base-2];
-        exponent = maxpow128_exp[base-2];
-#else
-        maxpow = base;
-        exponent = 1;
-        while (maxpow <= BDIGMAX / base) {
-            maxpow *= base;
-            exponent++;
-        }
-#endif
-    }
-
-    *exp_ret = exponent;
-    return maxpow;
-}
-
 static inline BDIGIT_DBL
 bary2bdigitdbl(const BDIGIT *ds, size_t n)
 {
@@ -4213,8 +4179,6 @@ big2str_find_n1(VALUE x, int base) https://github.com/ruby/ruby/blob/trunk/bignum.c#L4179
 struct big2str_struct {
     int negative;
     int base;
-    BDIGIT hbase;
-    int hbase_numdigits;
     BDIGIT_DBL hbase2;
     int hbase2_numdigits;
     VALUE result;
@@ -4481,7 +4445,6 @@ rb_big2str1(VALUE x, int base) https://github.com/ruby/ruby/blob/trunk/bignum.c#L4445
 
     b2s_data.negative = RBIGNUM_NEGATIVE_P(x);
     b2s_data.base = base;
-    b2s_data.hbase = maxpow_in_bdigit(base, &b2s_data.hbase_numdigits);
     b2s_data.hbase2 = maxpow_in_bdigit_dbl(base, &b2s_data.hbase2_numdigits);
 
     b2s_data.result = Qnil;

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]