>>-NUMERIC--+-DIGITS--+-------------+----------+--;------------>< | +-expression1-+ | | +-SCIENTIFIC-------------+ | +-FORM--+------------------------+-+ | +-ENGINEERING------------+ | | +-+-------+--expression2-+ | | +-VALUE-+ | +-FUZZ--+-------------+------------+ +-expression3-+
NUMERIC changes the way in which a program carries out arithmetic operations. The options of this instruction are described in detail in Numbers and Arithmetic.
controls the precision to which arithmetic operations and built-in functions are evaluated. If you omit expression1, the precision defaults to 9 digits. Otherwise, the character string value result of expression1 must evaluate to a positive whole number and must be larger than the current NUMERIC FUZZ setting.
There is no limit to the value for DIGITS (except the amount of storage available), but high precisions are likely to require a great amount of processing time. It is recommended that you use the default value whenever possible.
You can retrieve the current NUMERIC DIGITS setting with the DIGITS built-in function. See DIGITS.
controls the form of exponential notation for the result of arithmetic operations and built-in functions. This can be either SCIENTIFIC (in which case only one, nonzero digit appears before the decimal point) or ENGINEERING (in which case the power of 10 is always a multiple of 3). The default is SCIENTIFIC. The subkeywords SCIENTIFIC or ENGINEERING set the FORM directly, or it is taken from the character string result of evaluating the expression (expression2) that follows VALUE. The result in this case must be either SCIENTIFIC or ENGINEERING. You can omit the subkeyword VALUE if expression2 does not begin with a symbol or a literal string, that is, if it starts with a special character, such as an operator character or parenthesis.
You can retrieve the current NUMERIC FORM setting with the FORM built-in function. See FORM.
controls how many digits, at full precision, are ignored during a numeric comparison operation. (See Numeric Comparisons.) If you omit expression3, the default is 0 digits. Otherwise, the character string value result of expression3 must evaluate to 0 or a positive whole number rounded, if necessary, according to the current NUMERIC DIGITS setting, and must be smaller than the current NUMERIC DIGITS setting.
NUMERIC FUZZ temporarily reduces the value of NUMERIC DIGITS by the NUMERIC FUZZ value during every numeric comparison. The numbers are subtracted under a precision of DIGITS minus FUZZ digits during the comparison and are then compared with 0.
You can retrieve the current NUMERIC FUZZ setting with the FUZZ built-in function. See FUZZ.
Note: The three numeric settings are automatically saved across internal subroutine and function calls. See the CALL instruction (CALL) for more details.