9 lines
220 B
Go
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()
|
|
}
|