diff --git a/context.go b/context.go index 0b804cd..acd353f 100644 --- a/context.go +++ b/context.go @@ -362,7 +362,6 @@ func (c *Context) Quo(d, x, y *Decimal) (Condition, error) { } res |= d.setExponent(c, nd, res, shift, -adjCoeffs, -adjExp10) - d.Reduce(d) // remove trailing zeros return c.goError(res) } @@ -552,7 +551,6 @@ func (c *Context) Sqrt(d, x *Decimal) (Condition, error) { d.Exponent += int32(e / 2) nc.Precision = c.Precision nc.Rounding = RoundHalfEven - d.Reduce(d) // remove trailing zeros res := nc.round(d, d) return nc.goError(res) } diff --git a/example_test.go b/example_test.go index 70bd264..f60a1e7 100644 --- a/example_test.go +++ b/example_test.go @@ -56,9 +56,10 @@ func ExampleContext_inexact() { return } } - // Output: d: 9, inexact: false, err: - // d: 3, inexact: false, err: - // d: 1, inexact: false, err: + // Output: + // d: 9.0000, inexact: false, err: + // d: 3.0000, inexact: false, err: + // d: 1.0000, inexact: false, err: // d: 0.33333, inexact: true, err: }