From:             [EMAIL PROTECTED]
Operating system: linux and windows
PHP version:      4.3.0
PHP Bug Type:     Scripting Engine problem
Bug description:  converting float to int failed sometime

<?php

$nb = (15.2 - 15) * 100;
echo $nb."\n";
echo (int)$nb; 

?>

The output should be 20 and 20, but it's  20 and 19 !!!!

this strange behavior does not appear for all value.

I test on Redhat 6.2 and windows 2000 SP3

I think there was a link to another bug n°21458

-- 
Edit bug report at http://bugs.php.net/?id=21459&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=21459&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=21459&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=21459&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=21459&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=21459&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=21459&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=21459&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=21459&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=21459&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=21459&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21459&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=21459&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=21459&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=21459&r=gnused

Reply via email to