You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Excel, entering the string 5e-324 into a cell gives a string; 1e-307 gives the number value of 1e-307; 1e-308 gives 0 (0.00E+00); 0.000000001 (1e-9) remains displayed as a decimal point, whereas 0.0000000001 (1e-10) starts displaying as scientific notation.
In Excel, entering the string 1e308 into a cell gives a string; 1e307 gives the number value of 1e307; 10000000000 (1e10) remains displayed as a decimal point, whereas 100000000000 (1e11) starts displaying as scientific notation.
File size would increase significantly for certain types of datasets if e.g. 1e100 was getting written out as 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 each time.
Saving from Excel to a CSV prints cells with scientific notation as n.nnE[+-]n format. Re-opening them in Excel gives a dialog box that gives the option to treat them as numbers. Excel also seems to handle numbers formatted like 1.2e-8 the same way (YMMV with other spreadsheet software).
JS and (I think?) most other programming languages handle the formatting variations between 1e5, 1E5, 1.0E+05 etc. perfectly fine, so if using scientific notation at all, it might be worth preferring whichever version of scientific notation is most widely compatible with spreadsheet programs (if there's a difference).
For pure plaintext readability, scientific notation is obviously preferable for very small and very large numbers.
When outputting CSV fields that are small numbers, the output can end up in scientific notation. This can confuse spreadsheet software.
Describe the solution you'd like
A StringifyOption to disable scientific notation.
Describe alternatives you've considered
Using Big.js.
The text was updated successfully, but these errors were encountered: