ID: 25290 Updated by: [EMAIL PROTECTED] Reported By: oli_pla at hotmail dot com -Status: Open +Status: Bogus Bug Type: Strings related Operating System: Windows 2000/XP PHP Version: 4.3.3 New Comment:
Maybe you're mixing some old dlls with news ones (PHP related). This works just fine for me on XP. Previous Comments: ------------------------------------------------------------------------ [2003-08-28 07:35:32] oli_pla at hotmail dot com Description: ------------ For some particular values, printf('%.2f',$val) gives incorrect results on Windows 2000 and XP. The behaviour is that a digit is one unit too low. For instance, with 813.54, you get 803.54, and 349.61 becomes 348.61. On Windows 98 or Linux, the problem doesn't appear. I'm aware it may be a bug in Microsoft's C runtime, in which case it wouldn't be a PHP problem. But it would be interesting to be sure... Reproduce code: --------------- printf('%.2f',813.54); Expected result: ---------------- 813.54 Actual result: -------------- 803.54 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=25290&edit=1