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

ruby-changes:29955

From: akr <ko1@a...>
Date: Tue, 16 Jul 2013 20:23:14 +0900 (JST)
Subject: [ruby-changes:29955] akr:r42007 (trunk): * bignum.c (bigsq): Renamed from bigsqr.

akr	2013-07-16 20:23:03 +0900 (Tue, 16 Jul 2013)

  New Revision: 42007

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

  Log:
    * bignum.c (bigsq): Renamed from bigsqr.

  Modified files:
    trunk/ChangeLog
    trunk/bignum.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 42006)
+++ ChangeLog	(revision 42007)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Jul 16 20:21:28 2013  Tanaka Akira  <akr@f...>
+
+	* bignum.c (bigsq): Renamed from bigsqr.
+
 Tue Jul 16 19:42:08 2013  Tanaka Akira  <akr@f...>
 
 	* bignum.c (USHORT): Unused macro removed.
Index: bignum.c
===================================================================
--- bignum.c	(revision 42006)
+++ bignum.c	(revision 42007)
@@ -122,7 +122,7 @@ static VALUE bigmul1_toom3(VALUE x, VALU https://github.com/ruby/ruby/blob/trunk/bignum.c#L122
 static VALUE bignew_1(VALUE klass, long len, int sign);
 static inline VALUE bigtrunc(VALUE x);
 
-static VALUE bigsqr(VALUE x);
+static VALUE bigsq(VALUE x);
 static void bigdivmod(VALUE x, VALUE y, volatile VALUE *divp, volatile VALUE *modp);
 
 static int
@@ -3371,7 +3371,7 @@ power_cache_get_power0(int base, int i) https://github.com/ruby/ruby/blob/trunk/bignum.c#L3371
     if (NIL_P(big2str_power_cache[base - 2][i])) {
 	big2str_power_cache[base - 2][i] =
 	    i == 0 ? rb_big_pow(rb_int2big(base), INT2FIX(KARATSUBA_DIGITS))
-		   : bigsqr(power_cache_get_power0(base, i - 1));
+		   : bigsq(power_cache_get_power0(base, i - 1));
 	rb_gc_register_mark_object(big2str_power_cache[base - 2][i]);
     }
     return big2str_power_cache[base - 2][i];
@@ -3396,7 +3396,7 @@ power_cache_get_power(int base, long n1, https://github.com/ruby/ruby/blob/trunk/bignum.c#L3396
 
     j = KARATSUBA_DIGITS*(1 << i);
     while (n1 > j) {
-	t = bigsqr(t);
+	t = bigsq(t);
 	j *= 2;
     }
     return t;
@@ -5357,7 +5357,7 @@ rb_big_fdiv(VALUE x, VALUE y) https://github.com/ruby/ruby/blob/trunk/bignum.c#L5357
 }
 
 static VALUE
-bigsqr(VALUE x)
+bigsq(VALUE x)
 {
     return bigtrunc(bigmul0(x, x));
 }
@@ -5417,7 +5417,7 @@ rb_big_pow(VALUE x, VALUE y) https://github.com/ruby/ruby/blob/trunk/bignum.c#L5417
 		break;
 	    }
 	    for (mask = FIXNUM_MAX + 1; mask; mask >>= 1) {
-		if (z) z = bigsqr(z);
+		if (z) z = bigsq(z);
 		if (yy & mask) {
 		    z = z ? bigtrunc(bigmul0(z, x)) : x;
 		}

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

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