MCPcopy Create free account
hub / github.com/cockroachdb/apd / Abs

Method Abs

decimal.go:698–702  ·  view source on GitHub ↗

Abs sets d to |x| and returns d.

(x *Decimal)

Source from the content-addressed store, hash-verified

696
697// Abs sets d to |x| and returns d.
698func (d *Decimal) Abs(x *Decimal) *Decimal {
699 d.Set(x)
700 d.Negative = false
701 return d
702}
703
704// Reduce sets d to x with all trailing zeros removed and returns d and the
705// number of zeros removed.

Callers 7

CbrtMethod · 0.95
LnMethod · 0.95
ExpMethod · 0.95
PowMethod · 0.95
setExponentMethod · 0.95
NewWithBigIntFunction · 0.45
setCoefficientMethod · 0.45

Calls 1

SetMethod · 0.95

Tested by

no test coverage detected