Re: PHP 4.0 Bug #4676: Incorrect float calculation 5.5/2=2.5 (instead 2.75)

From: Date: Mon, 29 May 2000 18:03:32 +0000
Subject: Re: PHP 4.0 Bug #4676: Incorrect float calculation 5.5/2=2.5 (instead 2.75)
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-19702@lists.php.net to get a copy of this message
Can you please try PHP 4.0.0. It works for me with the latest CVS and nothing has changed since 4.0.0 in this area. Keep us updated so that we can close the bug report. BTW, it might have something to do with your character set in windows being defined to German. Let us know what the following gives you: echo "5,5"/2; If this results in 2.75 then that is the problem. We are fixing the current CVS so that no matter what your character set the standard for numbers will be in the format of 5.5 (with a period and not comma). Andi On 29 May 2000 phaigner@mbs42.de wrote: > From: phaigner@mbs42.de > Operating system: Windows98, PSW 4.0 > PHP version: 4.0 Release Candidate 2 > PHP Bug Type: Misbehaving function > Bug description: Incorrect float calculation 5.5/2=2.5 (instead 2.75) > > <HTML> > <BODY> > <? > echo "5.5/3=" . 5.5/3 . " ---> correct<br>"; > echo "5.5/2=" . 5.5/2 . " ---> result is 2.5 on Win98/PWS, should be 2.75 > "; > ?> > </BODY> > </HTML> > > >

« previous php.dev (#19702) next »