php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24828 round() function doesn't round !
Submitted: 2003-07-27 06:34 UTC Modified: 2003-07-28 17:08 UTC
From: christophe dot bidaux at netcourrier dot com Assigned: edink (profile)
Status: Closed Package: Math related
PHP Version: 4CVS-2003-07-27 (stable) OS: Windows 98SE
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: christophe dot bidaux at netcourrier dot com
New email:
PHP Version: OS:

 

 [2003-07-27 06:34 UTC] christophe dot bidaux at netcourrier dot com
Description:
------------
the round() function doesn't give me the results described in the documentation example.


Reproduce code:
---------------
// from the documentation example

$foo = round( 3.4 );   // $foo == 3.0
var_dump($foo);

$foo = round( 3.5 );   // $foo == 4.0
var_dump($foo);

$foo = round( 3.6 );   // $foo == 4.0
var_dump($foo);


Expected result:
----------------
float(3) float(4) float(4)

(PHP Version 4.3.3RC1 version)

Actual result:
--------------
float(3) float(3) float(3)

(PHP Version 4.3.3RC2-dev (Jul 27 2003 10:11:04) version)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-28 17:08 UTC] edink@php.net
Fixed in the lates snapshot from snaps.php.net.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 05:01:29 2024 UTC