returns the min or max precision (significant figures) of entries for a certain variable.
GPREC(Start/End Flag,Grouping/EndDate, GroupOffset/StartDate, Type, optional MinVal)
Start/End Flag: Enter 1 to get the start date. Enter 2 to get the end date. All other numbers may return unknown results.
Grouping/EndDate: Used to set which dates to calculate the stat for. If the Grouping is a date literal string (i.e. "07/16/2004") or refers to a cell with a date in it, it is assumed to be the end date to calculate the stat for. Common Groupings are:
"R" Report Dates
Click here for available Grouping options
GroupOffset/StartDate: Used with the Grouping parameter to set the dates to calculate the stat for. Sets the number of Groups (set by the Grouping Parameter) to be added to set the dates. See examples below. If this field is a date string (i.e. "07/16/2004") or refers to a cell with a date in it, it is assumed to be the start date to calculate the stat for.
Type: Tells the function to either return min or max. Possible inputs are "min" or "max"
MinVal: The minimum value to to check against, returns this number if all values are below MinVal. This is an optional parameter.
GPREC can only be used on variables that allow symbols. When entires are made of this type of variable, users can enter data with different precision and a different number of decimal places.
Rules for significant figures:
Digits from 1-9 are always significant.
Zeros between two other significant digits are always significant
One or more additional zeros to the right of both the decimal place and another significant digit are significant.
Zeros used solely for spacing the decimal point (placeholders) are not significant.
SEE ALSO: GDP, SFRZ, SFR, DPC
GPREC(1, 1, "M", "min") This will return the minimum precision of the variable 1.
GPREC(1, 1, "M", "max") This will return the maximum precision of the variable 1.
GPREC(1, 1, "M", "min", 3) This will return the minimum precision of the variable 1, ignoring anything with a precision smaller than 3.