Home Manual Reference Source
import {Integer} from '@aureooms/js-integer/src/Integer.js'
public class | source

Integer

Constructor Summary

Public Constructor
public

Member Summary

Private Members
private

_base: *

private
private

_limbs: *

Method Summary

Public Methods
public

abs(): *

public

add(other: *): *

public

addn(number: *): *

public

bin(): *

public

bits(): *

public

clone(): *

public

cmp(other: *): *

public

cmpn(number: *): *

public

digits(base: *): *

public

div(other: *): *

public
public

divides(other: *): *

public

divmod(other: *): undefined[]

public

divmodn(number: *): *

public

divn(number: *): *

public

divround(other: *): *

public

egcd(other: *): {"gcd": *, "x": *, "y": *, "u": *, "v": *}

public

eq(other: *): *

public

eqn(number: *): *

public

gcd(other: *): *

public

ge(other: *): *

public

gen(number: *): *

public

gt(other: *): *

public

gtn(number: *): *

public

hex(): *

public

iabs(): *

public

iadd(other: *): *

public

iaddn(number: *): *

public

idiv(other: *): *

public

idivmod(other: *): undefined[]

public

idivmodn(number: *): undefined[]

public

idivn(number: *): *

public

imod(other: *): *

public

imodn(number: *): *

public

imul(other: *): *

public

imuln(number: *): *

public

ipow(other: *): *

public

ipown(number: *): *

public

iseven(): *

public

isnegative(): *

public
public
public

isnonzero(): *

public

isodd(): *

public

isone(): *

public

ispositive(): *

public

isquare(): *

public

isub(other: *): *

public

isubn(number: *): *

public

iszero(): *

public

le(other: *): *

public

len(number: *): *

public

lt(other: *): *

public

ltn(number: *): *

public

mod(other: *): *

public

modn(number: *): *

public

move(other: *): *

public

mul(other: *): *

public

muln(number: *): *

public

ne(other: *): *

public

negate(): *

public

nen(number: *): *

public

oct(): *

public

opposite(): *

public

parity(): *

public

pow(other: *): *

public

Computes this raised to the xth power.

public

sign(): *

public

square(): *

public

sub(other: *): *

public

subn(number: *): *

public

toJSON(): *

public

toNumber(): *

public

toString(base: *): *

public

valueOf(): *

Private Methods
private

_limbs_in_base(base: *): *

Public Constructors

public constructor() source

Private Members

private _base: * source

private _is_negative: * source

private _limbs: * source

Public Methods

public abs(): * source

Return:

*

public add(other: *): * source

Params:

NameTypeAttributeDescription
other *

Return:

*

public addn(number: *): * source

Params:

NameTypeAttributeDescription
number *

Return:

*

public bin(): * source

Return:

*

public bits(): * source

Return:

*

public clone(): * source

Return:

*

public cmp(other: *): * source

Params:

NameTypeAttributeDescription
other *

Return:

*

public cmpn(number: *): * source

Params:

NameTypeAttributeDescription
number *

Return:

*

public digits(base: *): * source

Params:

NameTypeAttributeDescription
base *
  • optional
  • default: DEFAULT_DISPLAY_BASE

Return:

*

public div(other: *): * source

Params:

NameTypeAttributeDescription
other *

Return:

*

public divide_knowing_divisible_by(other: *): * source

Params:

NameTypeAttributeDescription
other *

Return:

*

public divides(other: *): * source

Params:

NameTypeAttributeDescription
other *

Return:

*

public divmod(other: *): undefined[] source

Params:

NameTypeAttributeDescription
other *

Return:

undefined[]

public divmodn(number: *): * source

Params:

NameTypeAttributeDescription
number *

Return:

*

public divn(number: *): * source

Params:

NameTypeAttributeDescription
number *

Return:

*

public divround(other: *): * source

Params:

NameTypeAttributeDescription
other *

Return:

*

public egcd(other: *): {"gcd": *, "x": *, "y": *, "u": *, "v": *} source

Params:

NameTypeAttributeDescription
other *

Return:

{"gcd": *, "x": *, "y": *, "u": *, "v": *}

public eq(other: *): * source

Params:

NameTypeAttributeDescription
other *

Return:

*

public eqn(number: *): * source

Params:

NameTypeAttributeDescription
number *

Return:

*

public gcd(other: *): * source

Params:

NameTypeAttributeDescription
other *

Return:

*

public ge(other: *): * source

Params:

NameTypeAttributeDescription
other *

Return:

*

public gen(number: *): * source

Params:

NameTypeAttributeDescription
number *

Return:

*

public gt(other: *): * source

Params:

NameTypeAttributeDescription
other *

Return:

*

public gtn(number: *): * source

Params:

NameTypeAttributeDescription
number *

Return:

*

public hex(): * source

Return:

*

public iabs(): * source

Return:

*

public iadd(other: *): * source

Params:

NameTypeAttributeDescription
other *

Return:

*

public iaddn(number: *): * source

Params:

NameTypeAttributeDescription
number *

Return:

*

public idiv(other: *): * source

Params:

NameTypeAttributeDescription
other *

Return:

*

public idivmod(other: *): undefined[] source

Params:

NameTypeAttributeDescription
other *

Return:

undefined[]

public idivmodn(number: *): undefined[] source

Params:

NameTypeAttributeDescription
number *

Return:

undefined[]

public idivn(number: *): * source

Params:

NameTypeAttributeDescription
number *

Return:

*

public imod(other: *): * source

Params:

NameTypeAttributeDescription
other *

Return:

*

public imodn(number: *): * source

Params:

NameTypeAttributeDescription
number *

Return:

*

public imul(other: *): * source

Params:

NameTypeAttributeDescription
other *

Return:

*

public imuln(number: *): * source

Params:

NameTypeAttributeDescription
number *

Return:

*

public ipow(other: *): * source

Params:

NameTypeAttributeDescription
other *

Return:

*

public ipown(number: *): * source

Params:

NameTypeAttributeDescription
number *

Return:

*

public iseven(): * source

Return:

*

public isnegative(): * source

Return:

*

public isnonnegative(): * source

Return:

*

public isnonpositive(): * source

Return:

*

public isnonzero(): * source

Return:

*

public isodd(): * source

Return:

*

public isone(): * source

Return:

*

public ispositive(): * source

Return:

*

public isquare(): * source

Return:

*

public isub(other: *): * source

Params:

NameTypeAttributeDescription
other *

Return:

*

public isubn(number: *): * source

Params:

NameTypeAttributeDescription
number *

Return:

*

public iszero(): * source

Return:

*

public le(other: *): * source

Params:

NameTypeAttributeDescription
other *

Return:

*

public len(number: *): * source

Params:

NameTypeAttributeDescription
number *

Return:

*

public lt(other: *): * source

Params:

NameTypeAttributeDescription
other *

Return:

*

public ltn(number: *): * source

Params:

NameTypeAttributeDescription
number *

Return:

*

public mod(other: *): * source

Params:

NameTypeAttributeDescription
other *

Return:

*

public modn(number: *): * source

Params:

NameTypeAttributeDescription
number *

Return:

*

public move(other: *): * source

Params:

NameTypeAttributeDescription
other *

Return:

*

public mul(other: *): * source

Params:

NameTypeAttributeDescription
other *

Return:

*

public muln(number: *): * source

Params:

NameTypeAttributeDescription
number *

Return:

*

public ne(other: *): * source

Params:

NameTypeAttributeDescription
other *

Return:

*

public negate(): * source

Return:

*

public nen(number: *): * source

Params:

NameTypeAttributeDescription
number *

Return:

*

public oct(): * source

Return:

*

public opposite(): * source

Return:

*

public parity(): * source

Return:

*

public pow(other: *): * source

Params:

NameTypeAttributeDescription
other *

Return:

*

public pown(x: Number): Integer source

Computes this raised to the xth power. x is a double smaller or equal to 2^53.

Params:

NameTypeAttributeDescription
x Number

The power to raise this to.

Return:

Integer

this ^ x

public sign(): * source

Return:

*

public square(): * source

Return:

*

public sub(other: *): * source

Params:

NameTypeAttributeDescription
other *

Return:

*

public subn(number: *): * source

Params:

NameTypeAttributeDescription
number *

Return:

*

public toJSON(): * source

Return:

*

public toNumber(): * source

Return:

*

public toString(base: *): * source

Params:

NameTypeAttributeDescription
base *
  • optional
  • default: DEFAULT_DISPLAY_BASE

Return:

*

public valueOf(): * source

Return:

*

Private Methods

private _limbs_in_base(base: *): * source

Params:

NameTypeAttributeDescription
base *

Return:

*