MCPcopy
hub / github.com/shopspring/decimal / Div

Method Div

decimal.go:590–592  ·  view source on GitHub ↗

Div returns d / d2. If it doesn't divide exactly, the result will have DivisionPrecision digits after the decimal point.

(d2 Decimal)

Source from the content-addressed store, hash-verified

588// Div returns d / d2. If it doesn't divide exactly, the result will have
589// DivisionPrecision digits after the decimal point.
590func (d Decimal) Div(d2 Decimal) Decimal {
591 return d.DivRound(d2, int32(DivisionPrecision))
592}
593
594// QuoRem does division with remainder
595// d.QuoRem(d2,precision) returns quotient q and remainder r such that

Callers 8

TestDecimal_DivFunction · 0.80
RoundCashMethod · 0.80
FloorMethod · 0.80
AvgFunction · 0.80
xatanMethod · 0.80
satanMethod · 0.80
TanMethod · 0.80

Calls 1

DivRoundMethod · 0.95

Tested by 2

TestDecimal_DivFunction · 0.64