bug (ou pas bug) avec des nombres décimaux
Salut
J'ai un soucis avec php
le script suivant
Code:
1 2 3 4 5 6
| <?php
$test=-3.77;
$test+=3.20;
$test+=0.57;
print($test);
?> |
me donne le résultat
Code:
1.1102230246252E-16
quelqu'un a une idée ?
est-ce un bug ?
phpinfo
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| PHP Version 4.4.4
System Linux saous10033 2.4.21-37.EL #1 Wed Sep 7 13:35:21 EDT 2005 i686
Build Date Jul 26 2007 16:49:00
Configure Command './configure' '--prefix=/usr/local/php' '--with-config-file-path=/usr/local/php/etc' '--with-apxs=/usr/local/apache/bin/apxs' '--enable-ftp' '--disable-debug' '--with-gettext' '--with-zlib' '--enable-track-vars' '--with-regex=system' '--with-xml' '--enable-trans-sid' '--without-mysql' '--with-gd' '--with-png-dir' '--enable-exif' '--with-ttf' '--with-openssl' '--with-oci8=/usr/local/oracle' '--enable-sigchild' '--with-bz2' '--enable-calendar' '--enable-sysvsem' '--enable-sysvshm' '--enable-xdebug=shared' '--enable-eaccelerator=shared'
Server API Apache
Virtual Directory Support disabled
Configuration File (php.ini) Path /usr/local/php/etc/php.ini
PHP API 20020918
PHP Extension 20020429
Zend Extension 20050606
Debug Build no
Zend Memory Manager enabled
Thread Safety disabled
Registered PHP Streams php, http, ftp, https, ftps, compress.bzip2, compress.zlib |
Merci d'avance