NumFracDigits Function
Returns the number of digits in a given number that appear to the right of the decimal point, not counting trailing zeros.
Syntax
NumFracDigits(value)
Returns the number of digits in a given number that appear to the right of the decimal point, not counting trailing zeros.
Arguments
value
Numeric - The number whose fractional digits should be counted. Some input numbers will be rounded because the computer cannot store all the places.
Remarks
Example:
NumFracDigits(123.4567); // returns 4
Example:
NumFracDigits(1234567890.1234567890123456789012345); // returns 19 because the input is rounded to 1234567890.1234567890123456789
Example:
NumFracDigits(0.12345678901234567890123456789012345); // returns 28 because the input is rounded to 0.1234567890123456789012345679
Example:
NumFracDigits(0.00123000); // returns 5 because trailing zeros are not counted, but leading zeros in the fractional part are