DBIG

Kind: global class
this: {DBIG}

new DBIG()

General purpose Constructor

dbiG.zero() ⇒

set to zero

Kind: instance method of DBIG
Returns: BIG number
this: {DBIG}

dbiG.copy() ⇒

set to b

Kind: instance method of DBIG
Returns: DBIG number
this: {DBIG}
Parameter: b DBIG number

dbiG.hcopy() ⇒

copy from ctx.BIG

Kind: instance method of DBIG
Returns: DBIG number
this: {DBIG}
Parameter: b BIG number

dbiG.norm() ⇒

normalise DBIG - force all digits < 2^BASEBITS

Kind: instance method of DBIG
Returns: DBIG number
this: {DBIG}

dbiG.muladd()

this[i]+=x*y+c, and return high part

Kind: instance method of DBIG
this: {DBIG}

dbiG.shr() ⇒

General shift right by k bits

Kind: instance method of DBIG
Returns: BIG number
this: {DBIG}
Parameter: k Number of bits to shift

dbiG.shl() ⇒

General shift left by k bits

Kind: instance method of DBIG
Returns: BIG number
this: {BIG}
Parameter: k Number of bits to shift

dbiG.cmove()

Conditional move of BIG depending on d using XOR - no branches

Kind: instance method of DBIG
this: {DBIG}
Parameter: b DBIG number
Parameter: d DBIG number

dbiG.add() ⇒

Sum two DBIG mumbers

Kind: instance method of DBIG
Returns: this+=x
this: {DBIG}
Parameter: x DBIG object

dbiG.sub() ⇒

Subtract DBIG from one another

Kind: instance method of DBIG
Returns: this-=x
this: {DBIG}
Parameter: x BIG object

dbiG.nbits() ⇒

length in bits

Kind: instance method of DBIG
Returns: The number of bigs in DBIG object
this: {DBIG}

dbiG.toString() ⇒

Convert to string

Kind: instance method of DBIG
Returns: string representation of a BIG number
this: {DBIG}

dbiG.mod() ⇒

reduces this DBIG mod a ctx.BIG, and returns the ctx.BIG

Kind: instance method of DBIG
Returns: BIG object
this: {DBIG}

dbiG.div() ⇒

this/=c

Kind: instance method of DBIG
Returns: DBIG number
this: {DBIG}
Paramter: c divisor

dbiG.split() ⇒

split this DBIG at position n, return higher half, keep lower half

Kind: instance method of DBIG
Returns: lower half BIG number
this: {DBIG}
Paramter: n Position to splitdivisor

DBIG.comp() ⇒

Compare a and b

Kind: static method of DBIG
Returns: 0 if a==b, -1 if a<b, +1 if a>b
this: {DBIG}
Parameter: a DBIG number (normalised)
Parameter: b DBIG number (normalised