![]() |
Basic math calculators
|
• Mathematically impossible operations (such as attempting to take the square root of a negative number) will generate a warning notice (this calculator only deals with real numbers).
For addition, subtraction, multiplication, and division the calculator works in a simple RPN mode. Enter the first number in the X-value edit field, hit 'return' and enter the second number, and then hit the '+', '-', '*', or '/ ' key. Note that for performing subtraction in RPN, the ‘_’ (underline) key is substituted for the '-' (minus) key. The result appears in the X-value field. |
Some general considerations:
NOTE: This routine will only 'catch' errors in the basic numeric expression. It may not detect invalid or meaningless math operations that may be attempted when data are processed, such as division by zero, or taking the log or a non-integer exponent of a negative number. If such situations occur, results may be unpredicatable. The algorithm does find most such errors during processing, however.
The underlying code for the expression evaluator was developed by the late, great Robert Purves (recently deceased and greatly missed). I 'borrowed' it - with his permission - and made some modifications for LabAnalyst. But Robert P. deserves all the credit.
Other links: |