#21628 [Fbk->NoF]: decimal numbers without decimal places
| From: | sniper@php.net | Date: | Tue, 28 Jan 2003 04:42:06 +0000 |
| Subject: | #21628 [Fbk->NoF]: decimal numbers without decimal places | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-31430@lists.php.net to get a copy of this message | ||
ID: 21628
Updated by: sniper@php.net
Reported By: czapel@go2.pl
-Status: Feedback
+Status: No Feedback
Bug Type: *Math Functions
Operating System: SuSE Linux 8.0
PHP Version: 4.2.2
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2003-01-14 03:42:45] nicos@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
------------------------------------------------------------------------
[2003-01-14 02:41:32] czapel@go2.pl
I have some unexplicable problem, when I try to perform any
mathematical
operation. This is my example script:
<?
echo microtime()."<br>";
$a=1.121212;
$b=2.999999;
echo gettype($a)."<br>";
echo gettype($b)."<br>";
echo bcmul($a,bcmul($b,$b,10),10)."<br>";
$c=$a*$b*$b;
echo $c;
?>
To make sure that browser doesn't read from cache I put microtime. The
problem is that sometimes as a result I get number with decimal places
(and
this is ok), but sometimes I get just integers as a result, in this
case it
is 4. Maybe somebody has already heart about that. I have no idea, how
should I lose this problem. Please, help me.
Regards
Michal
Configuration I use:
PHP 4.2.2
SuSE Linux
Apache 1.3.12
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=21628&edit=1