diff --git a/src/Number.php b/src/Number.php index b2881d8..fff3730 100644 --- a/src/Number.php +++ b/src/Number.php @@ -201,8 +201,8 @@ protected static function summarize(int|float $number, int $precision = 0, ?int } switch (true) { - case $number === 0: - return '0'; + case floatval($number) === 0.0: + return $precision > 0 ? static::format(0, $precision, $maxPrecision) : '0'; case $number < 0: return sprintf('-%s', static::summarize(abs($number), $precision, $maxPrecision, $units)); case $number >= 1e15: