#47865 [Opn->Bgs]: muliplication problem with 0.3

From: Date: Wed, 01 Apr 2009 16:40:26 +0000
Subject: #47865 [Opn->Bgs]: muliplication problem with 0.3
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-135455@lists.php.net to get a copy of this message
ID: 47865 Updated by: pajoye@php.net Reported By: pelhamny at gmail dot com -Status: Open +Status: Bogus Bug Type: Math related Operating System: i5/OS PHP Version: 5.2.9 New Comment: . Previous Comments: ------------------------------------------------------------------------ [2009-04-01 16:36:29] pelhamny at gmail dot com Description: ------------ There appears to be a bug when multiplying by 0.3 I only tested this under i5/OS. Reproduce code: --------------- <?php $tax = 90 * 0.3; echo $tax; ?> ALSO with same results: <?php $tax = (float)(90 * 0.3); echo $tax; ?> Expected result: ---------------- 30 Actual result: -------------- 27 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=47865&edit=1

« previous php.bugs (#135455) next »