Bug #17787: integer/double problem

From: Date: Sun, 16 Jun 2002 15:49:13 +0000
Subject: Bug #17787: integer/double problem
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-10747@lists.php.net to get a copy of this message
From: j.neubert@21torr.com Operating system: Windows NT 5.0 build 2195 PHP version: 4.1.2 PHP Bug Type: Math related Bug description: integer/double problem $f = 2.26; $g = $f*100; echo(intval($g)."::".$g."<br>"); //output = 225::226 $f = 2.26; $g = $f*1000/10; echo(intval($g)."::".$g."<br>"); //output = 226::226 could anybody explain this to me i also tested on Linux / php version 4.0.6 as far as i know 2.26 is the only double value creating this bug... -- Edit bug report at http://bugs.php.net/?id=17787&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=17787&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=17787&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=17787&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=17787&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=17787&r=support Expected behavior: http://bugs.php.net/fix.php?id=17787&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=17787&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=17787&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=17787&r=globals

« previous php.bugs (#10747) next »