Re: [RFC] Config setting to force all math operations to pass through BCMath library.

From: Date: Tue, 06 Mar 2012 22:03:11 +0000
Subject: Re: [RFC] Config setting to force all math operations to pass through BCMath library.
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Michael, I'm with Anthony, in that you shouldn't change behaviour of
this nature with an ini setting.
I would bring more pain than what it takes away.

This is one of those gotchas that everyone comes across, like you noted.
The main issue is that floating point arithmetic != real number
arithmetic; and bc functions do solve the issue, but make for some
ugly code in complex operations...

Since Anthony mentioned Python, maybe the discussion should be if PHP
should/could support decimal like Python does
http://docs.python.org/library/decimal
Now that would be something interesting to see discussed!!


Thread (25 messages)

« previous php.internals (#58693) next »