On Tue, Mar 6, 2012 at 4:18 PM, Anthony Ferrara <ircmax...@gmail.com> wrote: > I initially like the concept (arbitrary precision operations). > > But please don't add another ini setting. Especially one where > *logic* can change depending on the setting. I don't want a case > where pow(2, 65)-1 will return different answers depending on the ini. > That's just asking for problems.
I edited the RFC while you were sending this for clarification. This setting would only affect the math operators (+,/,*,-) mapping them to their bcmath equivalents. Math functions like pow would not be affected. > > Instead, perhaps a pythonic approach may be useful (storing as > int/float for small values, but auto-converting to arbitrary precision > if the int/float can't exactly represent what was > requested/computed)... Just a thought to make it useful without the > ini complexity or performance hits. > > Although this will present a significant BC break (internally, zend > engine wise), so it would probably be limited to a major release > anyway... > With a setting there would be no BC break since, if you turn it on, presumably you want it on. Also, for scripts where the author wasn't aware of the peril of floating point math the setting could actually fix their existing code. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php