diff --git a/d64/math.go b/d64/math.go index 6b10170..4cfa4df 100644 --- a/d64/math.go +++ b/d64/math.go @@ -399,9 +399,9 @@ func (ctx Context) add(d, e Decimal, dp, ep *decParts) Decimal { return ans.decimal() } -// Add computes d + e +// Sub computes d - e. func (ctx Context) Sub(d, e Decimal) Decimal { - return d.Add(newDec(neg ^ e.bits)) + return ctx.Add(d, newDec(neg ^ e.bits)) } // FMA computes d*e + f