Category talk:Wren-big: Difference between revisions

(→‎Source code: Added testBit method to BigInt.)
(→‎Source code: Bug fix.)
Line 114:
static integerLogarithm_(value, base) {
if (base <= value) {
System.write("") // guard against VM recursion bug
var tmp = integerLogarithm_(value, base.square)
var p = tmp[0]
Line 344 ⟶ 343:
// Private method to multiply two lists 'x' and 'y' using the Karatsuba algorithm.
static multiplyKaratsuba_(x, y) {
var n = (x.count > y.count) ? xy.count : yx.count
if (n <= 30) return multiplyLong_(x, y)
n = (n/2).ceilfloor
var a = x[0...n]
var b = x[n..-1]
var c = y[0...n]
var d = y[n..-1]
System.write("") // guard against VM recursion bug
var ac = multiplyKaratsuba_(a, c)
var bd = multiplyKaratsuba_(b, d)
9,485

edits