#33576 [NEW]: 19.6*100 != 19.6*10*10
| From: | rick at ninjafoo dot com | Date: | Tue, 05 Jul 2005 18:11:19 +0000 |
| Subject: | #33576 [NEW]: 19.6*100 != 19.6*10*10 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-81414@lists.php.net to get a copy of this message | ||
From: rick at ninjafoo dot com
Operating system: Gentoo Linux
PHP version: 4.3.11
PHP Bug Type: Math related
Bug description: 19.6*100 != 19.6*10*10
Description:
------------
100* certain values is not the same as 10*10* the same
value.
The following code should produce no output. I see output.
Reproduce code:
---------------
<?php
$value1 = 19.6*100;
$value2 = 19.6*10*10;
if ($value1 != $value2) {
echo 'funny, i thaught 100x was exactly the same as 10x10x....<br>';
echo 'value1='.$value1.', value2='.$value2.',';
}
?>
Expected result:
----------------
I expect nothing to happen.
Actual result:
--------------
funny, i thaught 100x was exactly the same as 10x10x....
value1=1960, value2=1960,
--
Edit bug report at http://bugs.php.net/?id=33576&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33576&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33576&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33576&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=33576&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=33576&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=33576&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=33576&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=33576&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=33576&r=support
Expected behavior: http://bugs.php.net/fix.php?id=33576&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=33576&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=33576&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=33576&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33576&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=33576&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=33576&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=33576&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=33576&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=33576&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=33576&r=mysqlcfg