#19189 [NEW]: sprintf yields wrong result
| From: | gwenzel at emb dot de | Date: | Fri, 30 Aug 2002 07:20:42 +0000 |
| Subject: | #19189 [NEW]: sprintf yields wrong result | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-18218@lists.php.net to get a copy of this message | ||
From: gwenzel@emb.de
Operating system: Linux Suse 7.1
PHP version: 4.2.0
PHP Bug Type: Strings related
Bug description: sprintf yields wrong result
echo ( sprintf("%012d", 68.85*100 ) );
yields
000000006884
Strangly enough:
echo ( sprintf("%012d", 68.95*100 ) );
yields the correct result:
000000006895
'./configure' '--with-apxs=/usr/local/apache/bin/apxs'
'--enable-trans-sid' '--with-mysql' '--enable-ftp'
'--with-config-file-path=/www/conf' '--with-zlib-dir=/usr/local'
'--with-gd=/usr/local' '--with-png-dir=/usr/local'
'--with-jpeg-dir=/usr/local' '--with-freetype-dir=/usr/local'
--
Edit bug report at http://bugs.php.net/?id=19189&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=19189&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=19189&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=19189&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=19189&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=19189&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=19189&r=support
Expected behavior: http://bugs.php.net/fix.php?id=19189&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=19189&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=19189&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=19189&r=globals