php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5453 Round() precision doesn?t work
Submitted: 2000-07-08 10:34 UTC Modified: 2000-07-11 04:26 UTC
From: marten at jerbro dot se Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 4.0 Latest CVS (08/07/2000) OS: Linux - Debian Slink
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: marten at jerbro dot se
New email:
PHP Version: OS:

 

 [2000-07-08 10:34 UTC] marten at jerbro dot se
<? echo round(1.95583, 2);  // Should output 1.96 ?>
Snippet outputs: 1.9599999999999999645

Works with 4.0.1 but not latest CVS snapshot.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-08 11:09 UTC] stas at cvs dot php dot net
Works with latest CVS for me.
 [2000-07-08 11:11 UTC] marten at jerbro dot se
Maybe this isn?t a PHP bug after all? The cause was that I changed the precision ini directive from default 14 to 20. Is this the correct behaviour of round()?
 [2000-07-11 04:26 UTC] marten at jerbro dot se
See #5500 instead.
 [2016-08-06 02:07 UTC] kalle@php.net
Automatic comment on behalf of kalle
Revision: http://git.php.net/?p=php-src.git;a=commit;h=7813e9de11500b51b9e30193fcdb7d09cf99a7cf
Log: Fixed bug #5453 (WSA cleanup executes before MSHUTDOWN)
 [2016-10-10 11:17 UTC] krakjoe@php.net
Automatic comment on behalf of kalle
Revision: http://git.php.net/?p=php-src.git;a=commit;h=7813e9de11500b51b9e30193fcdb7d09cf99a7cf
Log: Fixed bug #5453 (WSA cleanup executes before MSHUTDOWN)
 [2017-01-12 09:12 UTC] krakjoe@php.net
Automatic comment on behalf of kalle
Revision: http://git.php.net/?p=php-src.git;a=commit;h=7813e9de11500b51b9e30193fcdb7d09cf99a7cf
Log: Fixed bug #5453 (WSA cleanup executes before MSHUTDOWN)
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sat Oct 10 02:00:02 2026 UTC