PrecisionCalc
xl
Precision

What are "Significant Digits"?

"Significant Digits", also called "Significant Digits of Precision", are the digits in a number starting with the first non-zero digit and ending with the last non-zero digit. Those digits can be anywhere relative to the decimal.

Examples:

 Number Significant Digits 123 3 significant digits ("123") 987600 4 significant digits ("9876") 10001 5 significant digits ("10001") 5.0000 1 significant digit ("5") 5.00005000 6 significant digits ("5.00005") 100000.000000 1 significant digit ("1") 0.00000000001 1 significant digit ("1") 0.00010000001 8 significant digits ("10000001") 1.00000000001 12 significant digits ("1.00000000001")

In some contexts, trailing zeros in a number containing a decimal are considered significant; indicating that the number is in fact accurate to that decimal place. For example, in that context, "2" is taken to mean "at least 1.5, and less than 2.5", while "2.00" is taken to mean "at least 1.995, and less than 2.005".

Spreadsheet programs do not follow that convention, but it could be added to xlPrecision as an option. For example, a parameter named something like "preserve_input_precision" could be added; when set to True in the formula, the result would be set to the precision of the lowest-precision input number, so that e.g. "2.00" + "3.00000" would return "5.00", instead of just "5" (returning "5.00000" in that example would be false precision). It might also be necessary to add a way to mark individual input numbers as pure numbers, not subject to precision limitations, so that e.g. "2.00/3", where the "3" is marked as a pure number, returned "0.67" instead of returning "1". Let me know if you're interested.