#20415 [Bgs]: intval "rounding" problem
| From: | rasmus@php.net | Date: | Mon, 20 Sep 2004 13:37:57 +0000 |
| Subject: | #20415 [Bgs]: intval "rounding" problem | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-66453@lists.php.net to get a copy of this message | ||
ID: 20415
Updated by: rasmus@php.net
Reported By: engival_phpbug at spamtrack dot arnet dot cx
Status: Bogus
Bug Type: Math related
Operating System: Linux 2.2.20
PHP Version: 4.2.3
New Comment:
http://www.php.net/manual/en/language.types.float.php
Previous Comments:
------------------------------------------------------------------------
[2004-09-20 11:19:41] gruniversal at gmx dot de
When it's not a bug (which i think it is), how can i do a workaround ?
------------------------------------------------------------------------
[2002-11-13 16:20:07] derick@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
------------------------------------------------------------------------
[2002-11-13 16:19:24] engival_phpbug at spamtrack dot arnet dot cx
Test program:
$n=16.9;
print intval($n*100)."<br>"; // why does this return 1689
print ($n*100)."<br>";
returns:
1689
1690
my configure line (from PhpInfo() )
'./configure' '--enable-track-vars' '--with-gd=/usr/local'
'--with-zlib-dir=/usr' '--with- png-dir=/usr'
'--with-sybase=/opt/sybase-11.9.2' '--with-apxs=/usr/local/apache/
bin/apxs' '--without-mysql' '--with-pdflib' '--enable-shared=no'
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=20415&edit=1