Hi Benjamin, Brick\Math looks awesome. I really like the static initializers and descriptive method names. I recognize some of the patterns from OpenJDK's BigDecimal source. :)
The major difference to me is scale vs precision, ie. number of significant digits vs number of digits behind the decimal point. Not sure which is better, just noticing the difference. Your production is so good, by the way. I really appreciate it. Rudi On Tue, Oct 23, 2018 at 5:45 AM Benjamin Morel <benjamin.mo...@gmail.com> wrote: > Just for the record, I've written a userland arbitrary precision > arithmetic library, that provides a BigDecimal class which should be pretty > similar to what you're aiming to do: > > https://github.com/brick/math > > > This library uses the existing GMP or BCMath extensions when available, > but also works without them, using a (slower, but fully functional) pure > PHP implementation. > > > A new PHP extension that would provide native arbitrary precision numbers > with an OO API would be welcome, IMO. > > Maybe brick/math can help inspire your API? > > > Benjamin > > Le 29 sept. 2018 à 01:05, Rudi Theunissen <rtheunis...@php.net> a écrit : > > Hi everyone, > > I've been working on adding arbitrary precision decimal support as an > alternative to *bcmath. *I have created an extension based on *mpdecimal*, > which is what Python 3's decimal module is also based on. I haven't > released or broadcast this project yet, because I wanted to discuss the API > and implementation with internals first. > > See: https://github.com/php-decimal/php-decimal > > Any advice, commentary or objection is welcome. :) > > Thank you, > Rudi Theunissen > > --0000000000001ef4ff0576f68080-- > >