diff --git a/src/Util/Filter/DataNormalizer.php b/src/Util/Filter/DataNormalizer.php index 8ab5b9a..21a639e 100644 --- a/src/Util/Filter/DataNormalizer.php +++ b/src/Util/Filter/DataNormalizer.php @@ -643,6 +643,12 @@ public static function number(mixed $number) : ?string 'Exponent is too large' ); } + // check additional exponent + $additionalExponent = 0; + if (!$isDecimalPoint && str_contains($mantissa, '.')) { + $additionalExponent = strlen(explode('.', $mantissa)[0]); + } + $exponent = $exponent + $additionalExponent; $mantissa = str_replace('.', '', $mantissa); if ($isDecimalPoint) { // - is decimal point, convert mantissa