[Linux-programlama] PHP ile float toplama ve çıkartma problemi

---------

New Message Reply About this list Date view Thread view Subject view Author view Attachment view

From: Cenk Saver (penguen@medyaserver.net)
Date: Fri 16 Feb 2007 - 16:32:40 EET


Merhaba arkadaşlar,

aşağıdaki kodda, iki işlemin sonucununda aynı çıkması gerekmiyor mu?

PHP Kodu:
<?php
echo "1.Sonuç: ". (-53.7 - (-53.7));
echo "<br>";

$sayi1 = -53.7;
$sayi2 = (-17.9)*3;
echo "2.Sonuç: ".($sayi1 - $sayi2);
?>

Çıktısı :
1.Sonuç: 0
2.Sonuç: -7.1054273576E-015

Benim mi göremediğim bişey var acaba?

Herkese teşekkürler...

_______________________________________________
Linux-programlama mailing list
Linux-programlama@liste.linux.org.tr
http://liste.linux.org.tr/mailman/listinfo/linux-programlama


New Message Reply About this list Date view Thread view Subject view Author view Attachment view

---------

Bu arsiv hypermail 2.1.2 tarafindan uretilmistir.