convert2BigInt()
Interprets a as a number with radix b and creates a return of type BigInteger.
This type avoids the effect of the number being shown in scientific notation (e.g. 1234E45), which can happen with other types (e.g. Double).
With radix 16 the function can be used as hexadecimal/decimal converter and with radix 2 as binary/decimal converter.
Parameters
Parameter |
Description |
a |
Value to be interpreted. |
b |
(optional) Radix. Default: 10. |
Examples
Parameter a |
Parameter b |
Result |
String: 12345 |
|
BigInteger: 12345 |
String: abcde |
|
BigInteger: 0 |
String: abcde |
16 |
BigInteger: 703710 |
String: FF |
16 |
BigInteger: 255 |
String: 11111111 |
2 |
BigInteger: 255 |
String: 101010 |
2 |
BigInteger: 42 |