View source

class thx.bigint.Bigs

Available on all platforms

Class Fields

static inline var BASE(default,null):Int

static inline var DOUBLE_BASE(default,null):Float

static inline var LOG_BASE(default,null):Int

static var LOG_MAX_INT(default,null):Float

static var MAX_INT(default,null):Int

static var MAX_INT_ARR(default,null):Array<Int>

static var bigHighestPower2(default,null):BigIntImpl

static var bigPowersOfTwo(default,null):Array<BigIntImpl>

static var highestPower2(default,null):Int

static var powers2Length(default,null):Int

static var powersOfTwo(default,null):Array<Int>

static function add(a:Array<Int>, b:Array<Int>):Array<Int>

static function addAny(a:Array<Int>, b:Array<Int>):Array<Int>

static function addSmall(a:Array<Int>, carry:Int):Array<Int>

static function arrayToSmall(arr:Array<Int>):Null<Int>

static function bitwise(x:BigIntImpl, y:BigIntImpl, fn:Int -> Int -> Int):BigIntImpl

static function canAdd(a:Int, b:Int):Bool

static function canMultiply(a:Int, b:Int):Bool

static function canPower(a:Int, b:Int):Bool

static function compareToAbs(a:Array<Int>, b:Array<Int>):Int

static function createArray(length:Int):Array<Int>

static function createFloatArray(length:Int):Array<Float>

static function divMod1(a:Array<Int>, b:Array<Int>):Array<{small:Null<Int>, big:Array<Int>}>

static function divMod2(a:Array<Int>, b:Array<Int>):Array<{small:Null<Int>, big:Array<Int>}>

static function divModSmall(value:Array<Int>, lambda:Int):{r:Int, q:Array<Int>}

static function fromFloat(value:Float):BigIntImpl

static function fromInt(value:Int):BigIntImpl

static function fromInt64(value:Int64):BigInt

static function isPrecise(value:Int):Bool

static function multiplyKaratsuba(x:Array<Int>, y:Array<Int>):Array<Int>

static function multiplyLong(a:Array<Int>, b:Array<Int>):Array<Int>

static function multiplySmall(a:Array<Int>, b:Int):Array<Int>

static function parseBase(text:String, base:Int):BigIntImpl

static function shiftLeft(x:Array<Int>, n:Int):Array<Int>

static function smallToArray(n:Int):Array<Int>

static function square(a:Array<Int>):Array<Int>

static function subtract(a:Array<Int>, b:Array<Int>):Array<Int>

static function subtractAny(a:Array<Int>, b:Array<Int>, sign:Bool):BigIntImpl

static function subtractSmall(a:Array<Int>, b:Int, sign:Bool):BigIntImpl

static function toInt64(value:BigIntImpl):Int64

static function trim(v:Array<Int>):Void

Toggle inherited fields