On Mon, Feb 07, 2005 at 10:04:46PM +0100, Ron Korving wrote: > I just did a long test from 1 - 10000 and I noticed that every time the > number was increased with one bit (starting with 2048, then 4096, then 8192) > behaviour changes. You were right, my bad. > > Makes me wonder though, what's the point of a bankers' algorithm if .005 can > never be reached, only approached? :) This unpredictable rounding behaviour > is a real b*tch, but what can you do :)
you want to use integers or bcmath (http://php.net/bc) or gmp (http://php.net/gmp) to get your own control of rounding and accuracy. this makes this thread more appropiate for php-general than for internals. greetings messju > Ron -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php