Creates a new CheckedBigInt. with custom boundaries
initial value
the set boundaries for the instance
Creates a new CheckedBigInt. with a specific bit size and signedness
initial value
the bit size of the integer
whether the integer is signed or not
Add another integer to this integer, checking for overflow.
The integer to add.
A new CheckedBigInt with the result of the addition.
Bitwise AND operation.
The integer to AND with.
A new CheckedBigInt with the result.
Divide this integer by another integer, checking for overflow.
The integer to divide by.
A new CheckedBigInt with the result of the division.
Check equality with another value.
The value to compare with.
true if equal, false otherwise.
Check if this value is greater than another.
The value to compare with.
true if greater than, false otherwise.
Check if this value is greater than or equal to another.
The value to compare with.
true if greater than or equal, false otherwise.
Check if this value is less than another.
The value to compare with.
true if less than, false otherwise.
Check if this value is less than or equal to another.
The value to compare with.
true if less than or equal, false otherwise.
Modulo operation (always returns non-negative result for positive divisor). Unlike rem(), mod() follows mathematical modulo semantics where the result has the same sign as the divisor.
The integer to divide by.
A new CheckedBigInt with the modulo result.
Multiply this integer by another integer, checking for overflow.
The integer to multiply by.
A new CheckedBigInt with the result of the multiplication.
Check inequality with another value.
The value to compare with.
true if not equal, false otherwise.
Bitwise NOT operation (two's complement).
A new CheckedBigInt with the bitwise complement.
Bitwise OR operation.
The integer to OR with.
A new CheckedBigInt with the result.
Power this integer to another integer, checking for overflow.
The integer to power by.
A new CheckedBigInt with the result of the power.
Remainder of the division of this integer by another integer, checking for overflow.
The integer to divide by.
A new CheckedBigInt with the result of the remainder.
Bitwise shift left this integer by another integer, checking for overflow.
The integer to shift by.
A new CheckedBigInt with the result of the shift.
Bitwise shift right this integer by another integer, checking for overflow.
The integer to shift by.
A new CheckedBigInt with the result of the shift.
Subtract another integer from this integer, checking for overflow.
The integer to subtract.
A new CheckedBigInt with the result of the subtraction.
Returns the value for JSON serialization. Note: BigInt values are converted to strings in JSON.
The string representation of the value.
Returns the string representation of the value.
Optionalradix: numberOptional radix for the string representation (default: 10).
The string representation of the value.
Returns the primitive value (for use with valueOf).
The bigint value.
Bitwise XOR operation.
The integer to XOR with.
A new CheckedBigInt with the result.
A class that represents a signed or unsigned integer of a specific bit size.