php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20415 intval "rounding" problem
Submitted: 2002-11-13 16:19 UTC Modified: 2004-09-20 15:37 UTC
From: engival_phpbug at spamtrack dot arnet dot cx Assigned:
Status: Not a bug Package: Math related
PHP Version: 4.2.3 OS: Linux 2.2.20
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: engival_phpbug at spamtrack dot arnet dot cx
New email:
PHP Version: OS:

 

 [2002-11-13 16:19 UTC] 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'

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-13 16:20 UTC] 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
 [2004-09-20 11:19 UTC] gruniversal at gmx dot de
When it's not a bug (which i think it is), how can i do a workaround ?
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 18:01:29 2024 UTC