backoff/utilities/math.go

9 lines
220 B
Go
Raw Normal View History

2026-02-08 15:20:10 -05:00
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()
}