# [Ride v5] BigInt
⚠️ This is the documentation for the Standard Library version 5, which is currently available for Stagenet only.
BigInt variable has a size of 64 bytes (512 bits) and contains an integer between –2511 to 2511–1, inclusive. The weight of the value is 64.
BigInt variable can only be used inside a script. A callable function does not accept arguments of
BigInt type and does not return a value of
BigInt type. You can pass a big integer value as a string, then use the
# BigInt Operations
The following operators support
- Arithmetic operators: +, -, *, /, %, unary minus.
- Comparison operators: <, >, <=, and >=.
- Equality operators: == and !=.
Both operands should be
The following functions operate
- fraction(BigInt, BigInt, BigInt): BigInt
- fraction(BigInt, BigInt, BigInt, Union): BigInt
- log(BigInt, Int, BigInt, Int, Int, Union): BigInt
- max(List[BigInt]): BigInt
- median(List[BigInt]): BigInt
- min(List[BigInt]): BigInt
- pow(BigInt, Int, BigInt, Int, Int, Union): BigInt
- parseBigInt(String): BigInt|Unit
- parseBigIntValue(String): BigInt
- toBigInt(ByteVector): BigInt
- toBigInt(ByteVector, Int, Int): BigInt
- toBigInt(Int): BigInt
- toBytes(BigInt): ByteVector
- toInt(BigInt): Int
- toString(BigInt): String