Re: Beware of round() function

From: Date: Wed, 26 Mar 2008 13:47:45 +0000
Subject: Re: Beware of round() function
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-272120@lists.php.net to get a copy of this message
Kirk.Johnson@zootweb.com wrote: > Thanks for the info, Jeremy. Regardless of the technical details, my code > still broke. I am little discouraged that an operation that should be so > simple has these sorts of gotchas. There can also be some surprisingly awkward to find bugs that are not even "deliberate" as this appears to be: See: https://qa.mandriva.com/show_bug.cgi?id=37171 Here GCC optimisations can cause "Buggy float to string conversion (ex "0.0:" instead of "0.1")". Comment 16 or there abouts highlights the "solution" for those interested. It's not a PHP bug but still thought it worth mentioning on this thread. Col

« previous php.general (#272120) next »