php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24342 Failure in float operations
Submitted: 2003-06-26 05:32 UTC Modified: 2003-06-26 10:51 UTC
From: hostmaster at bemarnet dot es Assigned:
Status: Not a bug Package: Math related
PHP Version: 4.3.2 OS: Gentoo Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: hostmaster at bemarnet dot es
New email:
PHP Version: OS:

 

 [2003-06-26 05:32 UTC] hostmaster at bemarnet dot es
Description:
------------
Float operations (sprintf, number_format, etc..) fail.

Reproduce code:
---------------
<?
 
  $num = 57.4523;    
  echo "1 : $num<br>";   
  echo "2 : ".sprintf("%2.02f", $num)."<br>";   
  echo "3 : ".number_format($num,2,'.',',');   
 
?>

Expected result:
----------------
1 : 57.4523
2 : 57.45
3 : 57.45


Actual result:
--------------
1 : 57.4523
2 : i.00
3 : i00 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-26 06:28 UTC] hostmaster at bemarnet dot es
I have also tested with the latest revision (4.3.2-r2 dated 25 June)
 [2003-06-26 10:51 UTC] iliaa@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

Over optimization by gentoo can often result of corruption of floats. This is not a php bug.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 23:01:28 2024 UTC