10
Hat PHP Dezimal (± 1.0 × 10-28 bis ± 7.9 × 1028) Datentyp?Dezimal Typ in PHP
Hat PHP Dezimal (± 1.0 × 10-28 bis ± 7.9 × 1028) Datentyp?Dezimal Typ in PHP
Die BC Math Erweiterung implementiert beliebiger Genauigkeit dezimal Mathematik:
$a = '0.1';
$b = '0.2';
echo bcadd($a, $b); // prints 0.3
(Von The Floating-Point Guide)
Verwandte: Gleitkommazahlen in PHP: http://www.php.net/manual/en/ Sprache.Typen.Float.php –