Excel not parsing very small floating point numbers from text to value
From a calculation I get results in text form that I want to paste into Excel. Some of the numbers are absolute small, down to the minimum IEEE 754 double value larger zero, 2^-1074, e.g. about 10^-324.
When I paste this into Excel, Excel only parses numbers down to 2^-1022, e.g. about 10^-308, as if it ignored the small mantissa.
The numbers are not significant and could just be parsed to zero, but Excel will instead take them as text, which is extremely inconvenient.
I have two questions:
- Why doesn't Excel parse the values to a number or zero?
- Is there a way to mitigate this problem other than prefiltering the small numbers during the export?
Example:
Correctly parsed only below the line.
4696.57419374627 1.64825190702534E-317
4610.79539316943 4.5992506248762E-316
4526.58326700779 1.27364779881474E-314
4443.90920132986 3.50034092033703E-313
4362.74510481244 9.54706896850641E-312
4283.0633991957 2.58421411361223E-310
4204.83700991247 6.94201659277496E-309
-----------------------------------------
4128.03935688878 1.85072341656942E-307
4052.64434551232 4.89661672712669E-306
3978.62635776597 1.2857289504059E-304
3905.96024352317 3.35043697803301E-303
3834.62131200233 8.66467350863874E-302
3764.58532337728 2.22383044536139E-300
Solution 1:
Why doesn't Excel parse the values to a number or zero?
Excel doesn’t support a floating point number this small.
For Excel, the maximum number that can be stored is 1.79769313486232E+308 and the minimum positive number that can be stored is 2.2250738585072E-308
Source: https://docs.microsoft.com/en-us/office/troubleshoot/excel/floating-point-arithmetic-inaccurate-result