This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use an integer literal to instantiate | |
let a: BigInt = 23559821412349283 | |
// Or use a string literal if you want to start with a number that is greater than IntMax | |
let b: BigInt = "123456789876543234567876543234567876543" | |
// Perform arithmetic operations | |
let c: BigInt = 123456 + 321 // -> 12777 | |
let d = c / 100 // -> 127 | |
let e = d << d // -> 12700000000......(127 zeros) |