Methods
Defined in big-integer.d.ts:7
Returns the absolute value of a bigInt.
Returns
BigInteger
public add( number: number ) : BigInteger
Defined in big-integer.d.ts:10
Performs addition
Parameters
Returns
BigInteger
Defined in big-integer.d.ts:12
Performs addition
Parameters
Returns
BigInteger
public add( number: string ) : BigInteger
Defined in big-integer.d.ts:14
Performs addition
Parameters
Returns
BigInteger
public compare( number: number ) : BigInteger
Defined in big-integer.d.ts:136
Performs a comparison between two numbers. If the numbers are equal, it returns 0.
If the first number is greater, it returns 1. If the first number is lesser, it returns -1.
Parameters
Returns
BigInteger
Defined in big-integer.d.ts:141
Performs a comparison between two numbers. If the numbers are equal, it returns 0.
If the first number is greater, it returns 1. If the first number is lesser, it returns -1.
Parameters
Returns
BigInteger
public compare( number: string ) : BigInteger
Defined in big-integer.d.ts:146
Performs a comparison between two numbers. If the numbers are equal, it returns 0.
If the first number is greater, it returns 1. If the first number is lesser, it returns -1.
Parameters
Returns
BigInteger
public compareAbs( number: number ) : BigInteger
Defined in big-integer.d.ts:149
Performs a comparison between the absolute value of two numbers.
Parameters
Returns
BigInteger
Defined in big-integer.d.ts:151
Performs a comparison between the absolute value of two numbers.
Parameters
Returns
BigInteger
public compareAbs( number: string ) : BigInteger
Defined in big-integer.d.ts:153
Performs a comparison between the absolute value of two numbers.
Parameters
Returns
BigInteger
public divide( number: number ) : BigInteger
Defined in big-integer.d.ts:52
Performs integer division, disregarding the remainder.
Parameters
Returns
BigInteger
Defined in big-integer.d.ts:54
Performs integer division, disregarding the remainder.
Parameters
Returns
BigInteger
public divide( number: string ) : BigInteger
Defined in big-integer.d.ts:56
Performs integer division, disregarding the remainder.
Parameters
Returns
BigInteger
public divmod( number: number ) : { quotient: BigInteger; remainder: BigInteger; }
Defined in big-integer.d.ts:86
Performs division and returns an object with two properties: quotient and remainder. The sign of the remainder will match the sign of the dividend.
Parameters
Returns
{ quotient: BigInteger; remainder: BigInteger; }
public divmod( number: BigInteger ) : { quotient: BigInteger; remainder: BigInteger; }
Defined in big-integer.d.ts:88
Performs division and returns an object with two properties: quotient and remainder. The sign of the remainder will match the sign of the dividend.
Parameters
Returns
{ quotient: BigInteger; remainder: BigInteger; }
public divmod( number: string ) : { quotient: BigInteger; remainder: BigInteger; }
Defined in big-integer.d.ts:90
Performs division and returns an object with two properties: quotient and remainder. The sign of the remainder will match the sign of the dividend.
Parameters
Returns
{ quotient: BigInteger; remainder: BigInteger; }
public equals( number: number ) : boolean
Defined in big-integer.d.ts:156
Checks if two numbers are equal.
Parameters
Returns
boolean
public equals( number: BigInteger ) : boolean
Defined in big-integer.d.ts:158
Checks if two numbers are equal.
Parameters
Returns
boolean
public equals( number: string ) : boolean
Defined in big-integer.d.ts:160
Checks if two numbers are equal.
Parameters
Returns
boolean
public greater( number: number ) : boolean
Defined in big-integer.d.ts:93
Checks if the first number is greater than the second.
Parameters
Returns
boolean
public greater( number: BigInteger ) : boolean
Defined in big-integer.d.ts:95
Checks if the first number is greater than the second.
Parameters
Returns
boolean
public greater( number: string ) : boolean
Defined in big-integer.d.ts:97
Checks if the first number is greater than the second.
Parameters
Returns
boolean
public greaterOrEquals( number: number ) : boolean
Defined in big-integer.d.ts:100
Checks if the first number is greater than or equal to the second.
Parameters
Returns
boolean
public greaterOrEquals( number: BigInteger ) : boolean
Defined in big-integer.d.ts:102
Checks if the first number is greater than or equal to the second.
Parameters
Returns
boolean
public greaterOrEquals( number: string ) : boolean
Defined in big-integer.d.ts:104
Checks if the first number is greater than or equal to the second.
Parameters
Returns
boolean
public isEven( ) : boolean
Defined in big-integer.d.ts:121
Returns true if the number is even, false otherwise.
Returns
boolean
public isNegative( ) : boolean
Defined in big-integer.d.ts:130
Returns true if the number is negative, false otherwise. Returns false for 0 and true for -0.
Returns
boolean
public isOdd( ) : boolean
Defined in big-integer.d.ts:124
Returns true if the number is odd, false otherwise.
Returns
boolean
public isPositive( ) : boolean
Defined in big-integer.d.ts:127
Return true if the number is positive, false otherwise. Returns true for 0 and false for -0.
Returns
boolean
public lesser( number: number ) : boolean
Defined in big-integer.d.ts:107
Checks if the first number is lesser than the second.
Parameters
Returns
boolean
public lesser( number: BigInteger ) : boolean
Defined in big-integer.d.ts:109
Checks if the first number is lesser than the second.
Parameters
Returns
boolean
public lesser( number: string ) : boolean
Defined in big-integer.d.ts:111
Checks if the first number is lesser than the second.
Parameters
Returns
boolean
public lesserOrEquals( number: number ) : boolean
Defined in big-integer.d.ts:114
Checks if the first number is less than or equal to the second.
Parameters
Returns
boolean
public lesserOrEquals( number: BigInteger ) : boolean
Defined in big-integer.d.ts:116
Checks if the first number is less than or equal to the second.
Parameters
Returns
boolean
public lesserOrEquals( number: string ) : boolean
Defined in big-integer.d.ts:118
Checks if the first number is less than or equal to the second.
Parameters
Returns
boolean
public minus( number: number ) : BigInteger
Defined in big-integer.d.ts:24
Alias for the subtract method.
Parameters
Returns
BigInteger
Defined in big-integer.d.ts:26
Alias for the subtract method.
Parameters
Returns
BigInteger
public minus( number: string ) : BigInteger
Defined in big-integer.d.ts:28
Alias for the subtract method.
Parameters
Returns
BigInteger
public mod( number: number ) : BigInteger
Defined in big-integer.d.ts:79
Performs division and returns the remainder, disregarding the quotient. The sign of the remainder will match the sign of the dividend.
Parameters
Returns
BigInteger
Defined in big-integer.d.ts:81
Performs division and returns the remainder, disregarding the quotient. The sign of the remainder will match the sign of the dividend.
Parameters
Returns
BigInteger
public mod( number: string ) : BigInteger
Defined in big-integer.d.ts:83
Performs division and returns the remainder, disregarding the quotient. The sign of the remainder will match the sign of the dividend.
Parameters
Returns
BigInteger
public multiply( number: number ) : BigInteger
Defined in big-integer.d.ts:38
Performs multiplication.
Parameters
Returns
BigInteger
Defined in big-integer.d.ts:40
Performs multiplication.
Parameters
Returns
BigInteger
public multiply( number: string ) : BigInteger
Defined in big-integer.d.ts:42
Performs multiplication.
Parameters
Returns
BigInteger
Defined in big-integer.d.ts:73
Adds one to the number.
Returns
BigInteger
public notEquals( number: number ) : boolean
Defined in big-integer.d.ts:163
Checks if two numbers are not equal.
Parameters
Returns
boolean
public notEquals( number: BigInteger ) : boolean
Defined in big-integer.d.ts:165
Checks if two numbers are not equal.
Parameters
Returns
boolean
public notEquals( number: string ) : boolean
Defined in big-integer.d.ts:167
Checks if two numbers are not equal.
Parameters
Returns
boolean
public over( number: number ) : BigInteger
Defined in big-integer.d.ts:59
Alias for the divide method.
Parameters
Returns
BigInteger
Defined in big-integer.d.ts:61
Alias for the divide method.
Parameters
Returns
BigInteger
public over( number: string ) : BigInteger
Defined in big-integer.d.ts:63
Alias for the divide method.
Parameters
Returns
BigInteger
public plus( number: number ) : BigInteger
Defined in big-integer.d.ts:17
Alias for the add method.
Parameters
Returns
BigInteger
Defined in big-integer.d.ts:19
Alias for the add method.
Parameters
Returns
BigInteger
public plus( number: string ) : BigInteger
Defined in big-integer.d.ts:21
Alias for the add method.
Parameters
Returns
BigInteger
public pow( number: number ) : BigInteger
Defined in big-integer.d.ts:66
Performs exponentiation. If the exponent is less than 0, pow returns 0. bigInt.zero.pow(0) returns 1.
Parameters
Returns
BigInteger
Defined in big-integer.d.ts:68
Performs exponentiation. If the exponent is less than 0, pow returns 0. bigInt.zero.pow(0) returns 1.
Parameters
Returns
BigInteger
public pow( number: string ) : BigInteger
Defined in big-integer.d.ts:70
Performs exponentiation. If the exponent is less than 0, pow returns 0. bigInt.zero.pow(0) returns 1.
Parameters
Returns
BigInteger
Defined in big-integer.d.ts:76
Subtracts one from the number.
Returns
BigInteger
public subtract( number: number ) : BigInteger
Defined in big-integer.d.ts:31
Performs subtraction.
Parameters
Returns
BigInteger
Defined in big-integer.d.ts:33
Performs subtraction.
Parameters
Returns
BigInteger
public subtract( number: string ) : BigInteger
Defined in big-integer.d.ts:35
Performs subtraction.
Parameters
Returns
BigInteger
public times( number: number ) : BigInteger
Defined in big-integer.d.ts:45
Alias for the multiply method.
Parameters
Returns
BigInteger
Defined in big-integer.d.ts:47
Alias for the multiply method.
Parameters
Returns
BigInteger
public times( number: string ) : BigInteger
Defined in big-integer.d.ts:49
Alias for the multiply method.
Parameters
Returns
BigInteger
public toJSNumber( ) : number
Defined in big-integer.d.ts:170
Converts a bigInt into a native Javascript number. Loses precision for numbers outside the range.
Returns
number
public toString( ) : string
Defined in big-integer.d.ts:173
Converts a bigInt to a string.
Returns
string
public valueOf( ) : number
Defined in big-integer.d.ts:176
Converts a bigInt to a native Javascript number. This override allows you to use native arithmetic operators without explicit conversion.
Returns
number