From:             [EMAIL PROTECTED]
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

Reply via email to