2026-02-08 15:20:10 -05:00

9 lines
220 B
Go

package utilities
import "math/big"
func ProductWouldOverflowInt64(a, b int64) (product int64, overflows bool) {
results := new(big.Int).Mul(big.NewInt(a), big.NewInt(b))
return results.Int64(), !results.IsInt64()
}