Golang Big Int

Run Settings
LanguageGo
Language Version
Run Command
package main import ( "fmt" // "strconv" "math/big" ) func main() { largeNumber := "21888242000111122232188824200011112223" largeNumber2 := "00000000000000000000000000000000000007" // asInt64,_ := strconv.ParseInt(largeNumber, 10, 64) // asFloat,_ := strconv.ParseFloat(largeNumber, 64) // newBigInt := big.newInt(largeNumber) var bignum, _ = new(big.Int).SetString(largeNumber, 0) var bignum2, _ = new(big.Int).SetString(largeNumber2, 0) sum := new(big.Int).Add(bignum2, bignum) fmt.Printf("%v", sum) }
Editor Settings
Theme
Key bindings
Full width
Lines