Skip to content

Replace the public surface with exact arbitrary-precision numbers. - #40

Merged
gustavofreze merged 1 commit into
mainfrom
feature/ecosystem-alignment
Aug 17, 2026
Merged

Replace the public surface with exact arbitrary-precision numbers.#40
gustavofreze merged 1 commit into
mainfrom
feature/ecosystem-alignment

Conversation

@gustavofreze

Copy link
Copy Markdown
Member

Three operations on the old surface routed through float and every comparison used PHP's string operators, so the library was not arbitrary precision past 53 bits. Nothing from 3.x is preserved: division returns a BigRational so it never rounds, rounding happens only where a scale and a mode are named, and the arithmetic runs on an integer engine that is bcmath when the extension is loaded and a pure PHP backend when it is not.

Three operations on the old surface routed through float and every
comparison used PHP's string operators, so the library was not arbitrary
precision past 53 bits. Nothing from 3.x is preserved: division returns a
BigRational so it never rounds, rounding happens only where a scale and a
mode are named, and the arithmetic runs on an integer engine that is
bcmath when the extension is loaded and a pure PHP backend when it is not.
@gustavofreze
gustavofreze merged commit 8e95185 into main Aug 17, 2026
5 checks passed
@gustavofreze
gustavofreze deleted the feature/ecosystem-alignment branch August 17, 2026 21:03
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