PHP 4.0 Bug #4789: Math operations aren't correct with floating point variables

From: Date: Fri, 02 Jun 2000 21:23:45 +0000
Subject: PHP 4.0 Bug #4789: Math operations aren't correct with floating point variables
Groups: php.dev 
Request: Send a blank email to php-dev+get-20101@lists.php.net to get a copy of this message
From: twan@ecreation.nl Operating system: Windows 98 SE PHP version: 4.0.0 Release PHP Bug Type: Misbehaving function Bug description: Math operations aren't correct with floating point variables I am using PHP 4.0.0 (final release). When I execute this script: <? echo (4/3); ?> I get the following result: 1.3333333333333 But when I execute: <? echo (4.5/3.1); ?> I still get 1.3333333333333 Now, when I put back the PHP 4 beta 3, but still use the same PHP.ini, I do get the correct result: <? echo (4.5/3.1); ?> 1.4516129032258 Seems that the final PHP 4 release ignores the decimals.

« previous php.dev (#20101) next »