#22207 [NEW]: e-format in sprintf

From: Date: Thu, 13 Feb 2003 15:22:29 +0000
Subject: #22207 [NEW]: e-format in sprintf
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-33041@lists.php.net to get a copy of this message
From: andreas.maul@bgr.de Operating system: W2K PHP version: 4.3.0 PHP Bug Type: Output Control Bug description: e-format in sprintf Hi, the following script <?php $x=sprintf("%10.5e", 1.1); echo "$x"; ?> produces 1.1000e+ whereas <?php $x=sprintf("%10.5e", 0.11); echo "$x"; ?> returns the correct result 1.1000e-1 I would expect that output for the first example should be something like 1.1000e+0 or 1.1000e0 Regards Andreas Maul -- Edit bug report at http://bugs.php.net/?id=22207&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=22207&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=22207&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=22207&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=22207&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=22207&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=22207&r=support Expected behavior: http://bugs.php.net/fix.php?id=22207&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=22207&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=22207&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=22207&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22207&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=22207&r=dst IIS Stability: http://bugs.php.net/fix.php?id=22207&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=22207&r=gnused

« previous php.bugs (#33041) next »