From: ruslan_y at list dot ru Operating system: Linux Fedore Core 4 PHP version: 4.3.11 PHP Bug Type: Math related Bug description: round problems
Description: ------------ It's something wrong with round() and number_format() function on "new" Fedora Core 4. I'm try to compile php4.4.0RC2 on the same box but get just the same result. Configure options: './configure' '--prefix=/usr/local' '--program-suffix=4' '--with-config-file-path=/etc/php4' '--enable-memory-limit' '--enable-versioning' '--enable-bcmath' '--with-apxs=/usr/local/httpd/bin/apxs' '--disable-cgi' '--enable-sigchild' '--with-zlib' '--enable-calendar' '--with-dom' '--with-zlib-dir' '--with-dom-xslt' '--with-gd' '--with-jpeg-dir' '--with-png-dir' '--with-ttf' '--with-freetype-dir' '--enable-gd-native-ttf' '--with-iconv' '--with-mysql' '--with-oci8' '--enable-xslt' '--with-xslt-sablot' '--with-expat' '--with-iconv-dir' '--without-pear' OS: Linux - Linux localhost.localhost 2.6.11-1.1369_FC4smp #1 SMP Thu Jun 2 23:08:39 EDT 2005 i686 Automake: automake (GNU automake) 1.9.5 Autoconf: autoconf (GNU Autoconf) 2.59 Libtool: ltmain.sh (GNU libtool) 1.4.3 (1.922.2.111 2002/10/23 02:54:36) Compiler: Using built-in specs. Target: i386-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,java,f95,ada --enable-java-awt=gtk --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --host=i386-redhat-linux Thread model: posix gcc version 4.0.0 20050519 (Red Hat 4.0.0-8) Bison: bison (GNU Bison) 2.0 Reproduce code: --------------- <?php echo "<br/>0.112=>".round(0.112, 2); echo "<br/>0.115=>".round(0.115, 2); echo "<br/>0.105=>".round(0.105, 2); echo "<br/>0.107=>".round(0.107, 2); ?> Expected result: ---------------- 0.112=>0.11 0.115=>0.12 0.105=>0.11 0.107=>0.11 Actual result: -------------- 0.112=>0.11 0.115=>0.12 0.105=>0.1 0.107=>0.11 -- Edit bug report at http://bugs.php.net/?id=33584&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33584&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33584&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33584&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=33584&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=33584&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=33584&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=33584&r=needscript Try newer version: http://bugs.php.net/fix.php?id=33584&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=33584&r=support Expected behavior: http://bugs.php.net/fix.php?id=33584&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=33584&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=33584&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=33584&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33584&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=33584&r=dst IIS Stability: http://bugs.php.net/fix.php?id=33584&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=33584&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=33584&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=33584&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=33584&r=mysqlcfg
