- Entering and editing calculations
- Undo / redo
- Navigating around the equation
- Saving and loading calculations
- Setting default angle units
- Copying equations to the clipboard
- Exporting equations via email
- Plotting equations in Grafly

### Entering and editing calculations

When you first start Pi Cubed, you are presented with a screen that contains an equation at its center. This is the main math entry view, and where you will do most of your work.

(While most images shown here are for the iPhone version, the same principles apply to the iPad, except where indicated.)

An equation has two sides, divided by an equals sign. The left side is the editable calculation, where you will enter your mathematical expression. The right side shows the numerical evaluation of that expression. If the expression cannot be evaluated, due to incomplete information (as in this case), or a computational error (such as a square root of a negative number), the result will be a red ?.

To begin entering or editing an expression, tap on any part of the expression. This will highlight that section of the equation and present the math operation menu.

The bottom row of the menu contains items representing the different classes of math operations that can be inserted. Above that are menu items for each operation within that class. Tapping on one of the operator class items will highlight that class and switch the math operations displayed in the menu above. All menu operations are described in detail in the math operation reference section of the documentation.

If a menu is wider than the screen, you can scroll across it by swiping your finger horizontally across that menu.

Tapping on a math operation will apply that operation to the currently selected item in the equation. For example, tapping on the addition operation will generate a plus sign and a new blank operation to the right of the selected number or expression.

Blank operations, numbers, and variables can also take numerical input from that menu, which can include numbers, a locale-specific decimal separator, and a minus sign for negative numbers. Numbers can be edited by using the backspace item to remove the last-entered character.

Numbers need to be entered into all blank operations or variables in order for the equation to evaluate. The equation result will update as you type, with no need to recalculate manually. If the numerical value is too large for the screen, you can follow the instructions below to scale and pan across the equation.

When editing equations, you may wish to delete previously input operations or values. To delete a selected operation, tap on the black circle with an X that appears in the upper-left-corner of the selection.

This will delete the entire selection from the equation. You can also use this to clear out numerical values or remove parts of an addition, subtraction, multiplication, or division operation.

If you wish to remove a mathematical operation while preserving its contents, tap once to select it and tap a second time to just select the surrounding operation.

Now when you tap on the X to delete the operation, only the surrounding operation will be removed.

To start with a fresh calculation, select the entire calculation by tapping on the equals sign for the equation, then tapping on the delete item for that selection.

### Undo / redo

If you make a mistake at any time while editing an equation, you can use undo to step back to the previous state of the equation. Up to five levels of undo are maintained at any given time.

There are two ways to undo an action. First, you can shake the device to bring up a dialog box letting you undo the last edit (and / or redo if you've already undone an action).

Second, you can tap on the undo button when it appears in the upper left of the interface on the iPhone and iPad.

If there is only one possible course of action (undo or redo), that action will be committed instantly. On the iPhone, if there is a choice between undo and redo you will be presented with the dialog shown previously. On the iPad, you can tap and hold on the undo button to show the undo / redo options.

### Navigating around the equation

When the application evaluates your expression and produces a numerical result, it may have more digits than can fit on the screen. Additionally, you may construct a calculation that is larger than the screen, or has elements that are a little too small to read or touch. For these cases, Pi Cubed supports common multitouch gestures, such as scrolling and pinch zooming.

To scroll around an equation that is larger than the screen, move a single finger across the display. Additionally, a quick flick of the finger will move the display a short distance. White scroll bars will appear at the bottom and right sides of the screen to indicate where you are in the overall equation.

To zoom in and out, place two fingers on the display and either move them apart (zoom in) or pinch them together (zoom out). The equation will re-render at the new zoom level, and you will be able to edit it or pan around as you could before.

### Saving and loading calculations

If you wish to save the calculation you are currently working on, you can tap the appropriate icon (second from the right) to store it in the database. Note that your current calculation is always preserved on exiting the application, and restored on the next startup, so you don't need to worry about saving to avoid losing work. This save function is for when you want to return to this same calculation after working on another.

To load a previously saved calculation, simply bring up the equation library interface. On the iPhone, you will need to tap on the equation library icon to present this view. On the iPad, this will either display on the left side of the screen in the landscape orientation or in a popover display in portrait.

Initially, the list of recent calculations will be displayed.

This list will contain saved calculations in reverse chronological order. To return to the current calculation on the iPhone, simply tap on the "Current calculation" tab in the lower left corner of the screen.

You can edit the list by selecting the Edit button at the upper-right-hand corner of the display.

From here, you can delete calculations from the list by tapping on the red minus sign to their left, followed by a tap on the red Delete button that appears. The calculation will then be removed from the database.

Loading a previous calculation is as simple as tapping on it. The selection will replace your current calculation and you will be able to edit it however you want. If you made a mistake and want to revert to the previous calculation, simply undo this operation.

Beyond loading saved calculations from this list, you can load one of the preprogrammed equations that ship with Pi Cubed. This is covered in detail within the equation library section of this documentation. Similarly, equations can be saved to and loaded from the custom equation library, as described within the custom equations section.

### Setting default angle units

Pi Cubed normally uses degrees as the default unit type for all trigonometry calculations. To change this, you need to go to the Pi Cubed group within the Settings application.

Tap on the "Default angle type" option to bring up a list and select either Degrees or Radians.

Pi Cubed will use the selected angle unit for all trigonometry operations until the next time you change this setting.

### Copying equations to the clipboard

Pi Cubed has support for copying equations as plain text, LaTeX, and as images to allow pasting into various other applications. To copy an equation, double-tap anywhere on an equation or area around the equation on the main math display.

This will bring up the Copy menu, and tapping on that menu will copy the equation to the system clipboard. You can then exit Pi Cubed and paste the equation anywhere that supports that operation.

By default, the equation will be copied as plain text, but you can change that format to a LaTeX, image, or PDF representation by going to the Settings application, as described above.

The next time you start Pi Cubed, it will be able to copy equations in the selected format for pasting elsewhere.

### Exporting equations via email

Any calculation or equation you are working with can be exported out of Pi Cubed via email. Three export formats are supported: plain text, LaTeX, and PDF. Plain text simply generates a text representation of the equation. Exporting in LaTeX format creates a LaTeX equation that can be copied and pasted into a LaTeX document for typesetting, or into an equation layout application. A PDF representation of the typeset equation can also be send as an email attachment.

To start the export process, tap on the appropriate icon.

You will be presented with options for what format to mail the equation in. On the iPhone, this will appear as a fullscreen sheet with the option to cancel the action and return to the math screen. On the iPad, this will appear as a popover, where you can tap anywhere else to cancel.

The option to mail the equation as text will present an in-application email composition containing both plain text and LaTeX representations of the equation. You can edit this message, address it to others, and send it right from this screen. Either sending the message or canceling it will return you to the main math interface.

Like with plain text, you can choose to mail a PDF representation of the equation. The message composition screen will show the PDF as an attachment to the message, but everything else in this email screen is the same as for sending plain text.

### Plotting equations in Grafly

Pi Cubed has the ability to pass equations to Grafly for graphing. Grafly (link opens in App Store) is a powerful 2-D and 3-D plotting application for iPhone / iPod touch that is able to take in and plot equations expressed in terms of x, y, and z.

Exporting an equation for plotting is very similar to sending it via email. First, select the export icon (third from the right at the top of the screen).

This will bring up the list of export options.

Choosing the "Plot equation in Grafly" option will exit Pi Cubed (after saving your current equation) and start up Grafly with the equation already loaded.