From:             
Operating system: Windows XP
PHP version:      Irrelevant
Package:          Math related
Bug Type:         Bug
Bug description:Problema com cálculo

Description:
------------
Problema com cálculo

Test script:
---------------
<?
$v = 10;
$i = -0.15;

for ($a = 0; $a < 100; $a++) {
        $v += $i;
        echo $v, '<br>';
}

?>

Actual result:
--------------
9.85
9.7
9.55
9.4
9.25
9.1
8.95
8.8
8.65
8.5
8.35
8.2
8.05
7.9
7.75
7.6
7.45
7.3
7.15
7
6.85
6.7
6.55
6.4
6.25
6.1
5.95
5.8
5.65
5.5
5.35
5.2
5.05
4.9
4.75
4.6
4.45
4.3
4.15
4
3.85
3.7
3.55
3.4
3.25
3.1
2.95
2.8
2.65
2.5
2.35
2.2
2.05
1.9
1.75
1.6
1.45
1.3
1.15
0.99999999999999
0.84999999999999
0.69999999999999
0.54999999999999
0.39999999999999
0.24999999999999
0.099999999999988
-0.050000000000012
-0.20000000000001
-0.35000000000001
-0.50000000000001
-0.65000000000001
-0.80000000000001
-0.95000000000001
-1.1
-1.25
-1.4
-1.55
-1.7
-1.85
-2
-2.15
-2.3
-2.45
-2.6
-2.75
-2.9
-3.05
-3.2
-3.35
-3.5
-3.65
-3.8
-3.95
-4.1
-4.25
-4.4
-4.55
-4.7
-4.85
-5


-- 
Edit bug report at https://bugs.php.net/bug.php?id=60548&edit=1
-- 
Try a snapshot (PHP 5.4):            
https://bugs.php.net/fix.php?id=60548&r=trysnapshot54
Try a snapshot (PHP 5.3):            
https://bugs.php.net/fix.php?id=60548&r=trysnapshot53
Try a snapshot (trunk):              
https://bugs.php.net/fix.php?id=60548&r=trysnapshottrunk
Fixed in SVN:                        
https://bugs.php.net/fix.php?id=60548&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=60548&r=needdocs
Fixed in release:                    
https://bugs.php.net/fix.php?id=60548&r=alreadyfixed
Need backtrace:                      
https://bugs.php.net/fix.php?id=60548&r=needtrace
Need Reproduce Script:               
https://bugs.php.net/fix.php?id=60548&r=needscript
Try newer version:                   
https://bugs.php.net/fix.php?id=60548&r=oldversion
Not developer issue:                 
https://bugs.php.net/fix.php?id=60548&r=support
Expected behavior:                   
https://bugs.php.net/fix.php?id=60548&r=notwrong
Not enough info:                     
https://bugs.php.net/fix.php?id=60548&r=notenoughinfo
Submitted twice:                     
https://bugs.php.net/fix.php?id=60548&r=submittedtwice
register_globals:                    
https://bugs.php.net/fix.php?id=60548&r=globals
PHP 4 support discontinued:          
https://bugs.php.net/fix.php?id=60548&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=60548&r=dst
IIS Stability:                       
https://bugs.php.net/fix.php?id=60548&r=isapi
Install GNU Sed:                     
https://bugs.php.net/fix.php?id=60548&r=gnused
Floating point limitations:          
https://bugs.php.net/fix.php?id=60548&r=float
No Zend Extensions:                  
https://bugs.php.net/fix.php?id=60548&r=nozend
MySQL Configuration Error:           
https://bugs.php.net/fix.php?id=60548&r=mysqlcfg

Reply via email to