INNER CODE UNIT · Go
diff
ericlagergren/decimal · big.go:529
diff := int64(x.exp) - int64(y.exp)
shift := uint64(arith.Abs(diff))
if arith.Safe(shift) && x.isCompact() && y.isCompact() {
p, _ := arith.Pow10(shift)
if diff < 0 {
return arith.CmpShift(x.compact, y.compact, p)
}
return -arith.CmpShift(y.compact, x.compact, p)
}
xw, yw := x.unscaled.Bits(), y.unscaled.Bits()
if x.isCompact() {
xw = arith.Words(x.compact)
}
if y.isCompact() {
yw = arith.Words(y.compact)
}