From:             
Operating system: any
PHP version:      Irrelevant
Package:          Scripting Engine problem
Bug Type:         Bug
Bug description:*printf problem formatting numbers

Description:
------------
*printf functions have a problem correctly formatting numbers

Problem is reproducible with php 5.3.8 (win32) and php 5.3.6 (linux x86).
Numbers output were different on my two machines, but stayed the same on
each machine.

Test script:
---------------
<?php
printf("%0.31f %0.31f %0.31f",
  3.14159265359793238462643383279,
  14159265359793238462643383279.0,
  1.3
);
?>

Expected result:
----------------
3.1415926535979323846264338327900
14159265359793238462643383279.0000000000000000000000000000000
1.3000000000000000000000000000000

Actual result:
--------------
3.1415926535979323830360954161733
14159265359793237514732437504.0000000000000000000000000000000
1.3000000000000000444089209850063


-- 
Edit bug report at https://bugs.php.net/bug.php?id=55720&edit=1
-- 
Try a snapshot (PHP 5.4):            
https://bugs.php.net/fix.php?id=55720&r=trysnapshot54
Try a snapshot (PHP 5.3):            
https://bugs.php.net/fix.php?id=55720&r=trysnapshot53
Try a snapshot (trunk):              
https://bugs.php.net/fix.php?id=55720&r=trysnapshottrunk
Fixed in SVN:                        
https://bugs.php.net/fix.php?id=55720&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=55720&r=needdocs
Fixed in release:                    
https://bugs.php.net/fix.php?id=55720&r=alreadyfixed
Need backtrace:                      
https://bugs.php.net/fix.php?id=55720&r=needtrace
Need Reproduce Script:               
https://bugs.php.net/fix.php?id=55720&r=needscript
Try newer version:                   
https://bugs.php.net/fix.php?id=55720&r=oldversion
Not developer issue:                 
https://bugs.php.net/fix.php?id=55720&r=support
Expected behavior:                   
https://bugs.php.net/fix.php?id=55720&r=notwrong
Not enough info:                     
https://bugs.php.net/fix.php?id=55720&r=notenoughinfo
Submitted twice:                     
https://bugs.php.net/fix.php?id=55720&r=submittedtwice
register_globals:                    
https://bugs.php.net/fix.php?id=55720&r=globals
PHP 4 support discontinued:          
https://bugs.php.net/fix.php?id=55720&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=55720&r=dst
IIS Stability:                       
https://bugs.php.net/fix.php?id=55720&r=isapi
Install GNU Sed:                     
https://bugs.php.net/fix.php?id=55720&r=gnused
Floating point limitations:          
https://bugs.php.net/fix.php?id=55720&r=float
No Zend Extensions:                  
https://bugs.php.net/fix.php?id=55720&r=nozend
MySQL Configuration Error:           
https://bugs.php.net/fix.php?id=55720&r=mysqlcfg

Reply via email to