[PHP-DEV] Re: Extension: arbitrary precision decimal arithmetic in PHP 7

2018-10-27 Thread Benjamin Morel
> > I recognize some of the patterns from OpenJDK's BigDecimal source. :) Indeed, Brick\Math was largely inspired by Java's implementation! 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 > bette

[PHP-DEV] Re: Extension: arbitrary precision decimal arithmetic in PHP 7

2018-10-27 Thread Rudi Theunissen
> Because the result is an infinite repeating decimal, in my opinion, your Decimal class should not allow such a division without explicitly specifying a scale and a rounding mode. In other words, I would expect an exception here. There is already an internal flag for inexact division, but is curr

Re: [PHP-DEV] Idea for better function callbacks (another syntactic sugar)

2018-10-27 Thread Levi Morrison
On Fri, Oct 26, 2018 at 3:09 PM Kalle Sommer Nielsen wrote: > > Den fre. 26. okt. 2018 kl. 18.03 skrev Levi Morrison : > > In my opinion "ideal" here is that our symbol tables are merged, so > > referring to "trim" in any context will resolve to at most one symbol, > > *and* that we also have a sh