This repository was archived by the owner on Mar 18, 2021. It is now read-only.

Description
big.Int instances are mutable. Which means that if a caller calls math.MaxBigInt(a, b) and later changes a or b, then what math.MaxBigInt returned could change unexpectedly
Consider the following code
a := big.NewInt(3)
b := big.NewInt(5)
c := math.MaxBigInt(a, b) // c = 5, c and b point to the same big.Int
b.SetInt64(2)
// Oops, now c = 2, not 5. Caller won't be expecting this.
Although it would be slower, consider having math.MaxBigInt() and similar functions return a copy of the max value rather than the actual max value.