php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14195 i think i found a bug in adding in PHP v4.0.5
Submitted: 2001-11-23 07:03 UTC Modified: 2001-11-23 07:12 UTC
From: kwysiadly at gddp dot szczecin dot pl Assigned:
Status: Not a bug Package: Math related
PHP Version: 4.0.5 OS: win98se
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: kwysiadly at gddp dot szczecin dot pl
New email:
PHP Version: OS:

 

 [2001-11-23 07:03 UTC] kwysiadly at gddp dot szczecin dot pl
<?PHP
$var = "2500";
$temp = "0.00";
$i = "1";
For ($i = 1; $i <= $var; $i++)
{
	$temp += 0.01;
	print ($i.") ".$temp."<br>");
}
?>
---------------------------------------------------------
;extension=php_bz2.dll
;extension=php_ctype.dll
;extension=php_cpdf.dll
;extension=php_curl.dll
;extension=php_cybercash.dll
;extension=php_db.dll
;extension=php_dba.dll
;extension=php_dbase.dll
;extension=php_domxml.dll
;extension=php_dotnet.dll
;extension=php_exif.dll
;extension=php_fdf.dll
;extension=php_filepro.dll
extension=php_gd.dll
;extension=php_gettext.dll
;extension=php_hyperwave.dll
;extension=php_iconv.dll
;extension=php_ifx.dll
;extension=php_iisfunc.dll
;extension=php_imap.dll
;extension=php_ingres.dll
;extension=php_interbase.dll
;extension=php_java.dll
;extension=php_ldap.dll
;extension=php_mcrypt.dll
;extension=php_mhash.dll
;extension=php_ming.dll
;extension=php_mssql.dll
;extension=php_oci8.dll
;extension=php_openssl.dll
;extension=php_oracle.dll
;extension=php_pdf.dll
;extension=php_pgsql.dll
;extension=php_printer.dll
;extension=php_sablot.dll
;extension=php_snmp.dll
;extension=php_sybase_ct.dll
;extension=php_yaz.dll
extension=php_zlib.dll
-----------------------------------------------------

i think i found a bug in adding in PHP v4.0.5
please, run this script above and take a look on lines from 444 to 1000 and then from 2111 to 2500 in your browser.

my system: win98se, php v4.0.5, Apache 1.3.19

sorry for my english.
best wishes.
/k.wysiadly

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-11-23 07:12 UTC] derick@php.net
Not a bug. This how floating point arithmetic works. PHP can't do anything about it.
On a computer, floating point numbers are stored as the 'best possible' representation of it, and this does not always match the exact number.

Derick
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 07:01:33 2024 UTC