Comment for rescale added

This commit is contained in:
Igor Mikushkin 2018-08-29 03:53:48 +04:00
parent b836e56a4d
commit 7416128977

View file

@ -378,6 +378,10 @@ func (d Decimal) rescale(exp int32) Decimal {
} }
} }
// abs64 returns the absolute value of int64
// except the lowest possible int64 value -9223372036854775808
// that has no positive counterpart in int64 range
// and it is returned unchanged
func abs64(n int64) int64 { func abs64(n int64) int64 {
y := n >> 63 y := n >> 63
return (n ^ y) - y return (n ^ y) - y