tags:

views:

53

answers:

1

Does php has Decimal(±1.0 × 10−28 to ±7.9 × 1028) type?

+3  A: 

The BC Math extension implements arbitrary-precision decimal math:

$a = '0.1';
$b = '0.2';
echo bcadd($a, $b);     // prints 0.3

(From The Floating-Point Guide)

Michael Borgwardt