Skip to content

Explain division precision in the README - #459

Open
ac1982 wants to merge 1 commit into
shopspring:masterfrom
ac1982:docs/division-precision
Open

ac1982 wants to merge 1 commit into
shopspring:masterfrom
ac1982:docs/division-precision

Conversation

@ac1982

@ac1982 ac1982 commented Oct 13, 2026

Copy link
Copy Markdown

Explain in the README that Div defaults to 16 decimal places via DivisionPrecision, and show DivRound for choosing precision per operation. Clarify decimal places versus significant digits, halfway rounding, and why rounding afterward cannot restore discarded digits.

Addresses #338. This documents existing behavior without changing arithmetic or defaults.

Validation: extracted and ran the example; checked exact division, positive/negative halfway rounding and precision loss through the public API. go test ./..., go build ./..., go vet ./..., and golangci-lint 2.14.0 pass on Go 1.27.1.

AI assistance was used to prepare and verify the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant