# Simple Operations for the Pop-up Calculator

The pop-up calculator lets you perform calculations on measured values (snap to an element, then multiply the distance, for example), or to simply type in the entire equation, such as "5.23 + 1.34."

Not only does the pop-up calculator eliminate the need to use a physical calculator, you may notice that with the "+" and "-" operations, you do not have to reposition AccuDraw's origin to move relative to a snapped or keyed-in offset.

The calculator is designed to be very efficient, to work seamlessly with AccuDraw, and to be entirely "keyboard-driven," letting you keep the mouse in the view window rather than having to click in the dialog. Also, the calculator works in a "per-keystroke" manner — the result of the calculation is expressed both numerically and graphically with every keystroke typed.

The pop-up calculator is "format aware;" it accepts expressions in feet and inches or degrees-minutes-seconds, if appropriate. You cannot multiply feet times feet, so the calculator properly adjusts to interpret this type of string.

When performing operations on a measured value, the pop-up calculator always operates on the underlying precise value, rather than the string which is truncated to whatever coordinate readout you have. This dynamic value displays at the bottom of the pop-up calculator.

### Creating a relative offset (by snapping then typing "+2" when the X field has input focus).

You may notice that sometimes pressing +, -, or / does not bring up the calculator, but is interpreted by AccuDraw as either an explicit positive or negative, or as a fraction. The rule with the"+"and "-" operators is: If the value is locked or a tentative point is active, the calculator displays. If you type something like "3 3/8," the "/" is interpreted as part of a fraction because of the space. If you simply type "3/8," AccuDraw uses the calculator but the result will be the same as 3 divided by 8, or the fraction 3/8. To enter "1 foot and 3/8 inches" you must type a space ("1: 3/8") so the value is not misinterpreted as "1 foot 3 inches, divided by 8." "1+:3/8" would also work.

When entering planar data points (not polar coordinates), there are some special procedures to prevent unexpected results. Since AccuDraw interprets values as negative when the cursor is pointed in the negative direction, the calculator, when appropriate, prepends the entered expression with a minus sign.