Bug #17787 Updated: integer/double problem

From: Date: Sun, 16 Jun 2002 18:57:44 +0000
Subject: Bug #17787 Updated: integer/double problem
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-10788@lists.php.net to get a copy of this message
ID: 17787 Updated by: j.neubert@21torr.com Reported By: j.neubert@21torr.com Status: Bogus Bug Type: Math related Operating System: Windows NT 5.0 build 2195 PHP Version: 4.1.2 New Comment: Derick, the explanation on http://www.php.net/manual/en/language.types.float.php#language.types.float seems to be pretty lame excuse for not being able or willing to check for a c-math-lib on the corrosponding system to be able to do such simple mathematic equations transparent to the user... you have to admit that this could be very well regarded as a bug or a not very well documented feature... true, binary equations are a hastle to do, but with all of the things php does for you, this shouldn't be to much of a hastle for the php-developers... In the end it _IS_ an expected behaviour that 2.26 multiplied with 100 equals to 226, binary equation or not, statet in an obscure place in the documentation or not... anyhow, have a nice day too and thanks for your quick reply. Previous Comments: ------------------------------------------------------------------------ [2002-06-16 14:16:13] derick@php.net Sorry, but the bug system is not the appropriate forum for asking support questions. 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 Thank you for your interest in PHP. See also: http://www.php.net/manual/en/language.types.float.php#language.types.float ------------------------------------------------------------------------ [2002-06-16 11:49:13] j.neubert@21torr.com $f = 2.26; $g = $f*100; echo(intval($g)."::".$g."<br>"); //output = 225::226 $f = 2.26; $g = $f*1000/10; echo(intval($g)."::".$g."<br>"); //output = 226::226 could anybody explain this to me i also tested on Linux / php version 4.0.6 as far as i know 2.26 is the only double value creating this bug... ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=17787&edit=1

« previous php.bugs (#10788) next »