Tag Link | [BigInt] | Category | Math |
---|---|---|---|
Type | Substitution | Source Available | Yes |
Support | Preferred | Version | 8.5 |
Change | New | Data Source | Any |
Output Type | BigInt | Security | None |
Implementation | Sets | Lasso 8.5 |
[BigInt] is a data type which allows integer values larger than 64 bits to be manipulated using Lasso. The maximum value representable by the built
A big integer is created by casting a string using [BigInt: '1000']. It is also possible to cast integer and decimal values to big integers, but care should be taken that the number is not modified by Lasso before the big integer is created. In general, it is safest to use a string to represent the value.
Big integers support the + - * symbols for basic math with no loss of precision. The big integer should always occur on the left side of the symbol in order to ensure that the result is a big integer.
The / symbol is also supported for division, however since floating point is used in the calculation it is possible to lose precision in division operations. The % symbol is not supported for big integers.
Big integers can be cast to string and the [BigInt->(SetFormat:
[BigInt: '10000000000000000000']
[(BigInt: '10000000000000000000')->(SetFormat:
[(BigInt: '10000000000000000000') * 2]
[(BigInt: '10000000000000000000') * 2.5]
[(BigInt: '10000000000000000000') + 150000]
[(BigInt: '10000000000000000000') - 150000]
Optional Parameters | |
---|---|
String Value | A string which will be parsed into a big integer. |
See the Lasso 8 Language Guide for examples of how to use this tag.