package main import ( "fmt" "math/big" ) func main() { num1 := big.NewInt(100000) num2 := big.NewInt(50000) diff := big.NewInt(0) diff.Sub(num1, num2) fmt.Println(diff) }
package main import ( "fmt" "math/big" ) func main() { num1 := big.NewInt(0).Exp(big.NewInt(2), big.NewInt(100), nil) num2 := big.NewInt(0).SetInt64(100) diff := big.NewInt(0) diff.Sub(num1, num2) fmt.Println(diff) }In this example, we use the `Exp` function of the big.Int type to calculate 2^100, and then subtract it from 100 using the `Sub` function. The resulting difference is printed.