CALC 1 Home Documentation Home Contact

Calculations Using Algebraic Expressions

In algebraic mode you enter an expression in the top part of the display and when you tap '=', the result is displayed in the bottom part of the display.

CALC 1 algebraic mode uses a similar order of operation that computer languages (like JavaScript) and spreadsheets use.

Examples of Math Operations

To Press Display
Add 6+4 6+4= 10.00
Subtract 6-4 6-4= 2.00
Multiply 6×4 6×4= 24.00
Divide 6÷4 6÷4= 1.5
Power 31.25 3 ^ 1.25 = 3.95
Square Root √15.5 √15.5= 3.94
Add to the last result 3.94+2 +2= (rgx+2) 5.94
Start with a negative sign -10+4 10+/- +4 =(-10+4) -6.00
Use EE for large numbers 100000÷2 1EE5÷2= 50,000.00

Starting with an operator (+, -, ×, ÷, ^) will insert rgx before the operator. rgx is the value of register x in the stack. This is the "ans" or "last" value used in some calculators.

To start a expression with a negative sign, tap the +/- key at any time while entering the first number.

Some keys will calculate the expression to put the result in the x register, then evaluate the expression of that key.

The top row keys for the Function Calculators and TVM Focused Calculators will also use Auto STO to automatically evaluate expressions and store them without having to press =, then STO.

Note that if you do not balance the parentheses that one (and only one) right parenthesis, ), will be appended to the end of the expression. This is to allow entry of √(15.5 without needing to always use ")". This is a common practice in calculators.

K Mode Example For ALG mode

The K mode for ALG mode can be more powerful that the K mode in CHN mode used in most business calculators. It will save any expression using the current rgx value and execute it for different values of rgx that you enter.

To Press Display
Enter an expression (with any value in rgx) π×rgx^2  
Lock the expression so subsequent numeric entries will enter new values of rgx. Note that the "K" flag will appear at the top right of the display. K
Evaluate for rgx=6 6 = 113
Evaluate for rgx=7 7= 154


A "K" flag is displayed in the upper right part of the display when the "K Mode" is active.  
The K mode is active until "C" is pressed.
Note that the K mode works differently in the Chain mode than in the Algebraic mode.

While in K mode, RPN mode is used if you need to perform arithmetic operations.  So to add 6 and 7 in the above example, you would press 6, ENTER (or shift - ENTER on some calculators), 7, +.

Using Calculator Variables for Plotting and Expression Functions

When building an expression for plotting (solving, integration,...) it is often useful to be able to change values without having to edit a value in the expression. CALC 1 has named variables, a - w that can be made part of the expression and then then can be changed without editing the expression.

Try this example from the TI-84 Guidebook: Take a 20 cm × 25 cm. sheet of paper and cut an X × X squares from two corners. Cut X × 121⁄2 cm rectangles from the other two corners as shown in the diagram below. Fold the paper into a box with a lid.
What value of X would give your box the maximum volume V?
The expression is : V = (20 - 2X) (25/2 - X) X, where x is the height of the box

In this example we will use the variable l and w for the length and width of the box so they can be changed for other stock to compute the maximum volume. 

To Press Display
Clear the current expression C  
Enter the value for l, the length of the stock 20 STO l 20.0
Enter the value for w, the width of the stock 25 STO w 25.0
Enter the expression. (RCL l - 2 × rgx)×(RCL w / 2 - rgx) × rgx (l-2×rgx)×(w÷2-rgx)×rgx
Lock the expression K

Evaluate for rgx=4 4= 408
Calculate the value of rgx for the maximum volume (Using the Expressions calculator, xMin = 0, xMax = 10) shift maxY 3.68
Calculate the maximum volume. = 410
Enter a new value for l, the length of the stock 25 STO l 25.0
Calculate the value of rgx for the maximum volume (Using the Expressions calculator) shift maxY 4.17
Calculate the maximum volume. = 579

Calculating the maxY is available on the Expressions Focused Calculator, part of the graphical, customizable version of CALC 1

Once an expression has begun, pressing RCL l, (or any of the other storage letters) will insert that letter in the expression. Pressing RCL to start an expression will recall the current value to rgx. So to start an expression with a variable, start the expression with any number, then tap the backspace key to put the expression build in "edit mode". Then RCL l will insert the variable name and not the value.

Algebraic Expressions Can Be Used to Create Custom Keys and Function Calculators

After entering an expression that contains 'rgx', you can navigate to the History Detail for that expression and there will be 2 buttons on the toolbar, "Create Key" or"Create fn". Tapping those buttons will automatically create a key (that you can paste into a custom Focused Calculator)  or a Function Calculator.

Expression Editor

Double-tap the expression to display the expression editor:

The Expression Editor allows full keyboard editing of an expression.

The text entered is JavaScript, so you can use * for multiplication and / for division. 

You can enter statements like:
listx=[2,3,4,5];
average(listx);

The calculator expects an expression to return a number in the last statement.  If the statment results in an array, the calculator will display the length of the array.

JavaScript

JavaScript is used to evaluate these expressions. CALC 1 will replace "^" with "**" as well as other math symbols.

The expression will be evaluated inside of 2 "with" blocks:

with(Math) {
  with(c1) {
    Math.PI * rgx ** 2;
  }
}

Exponentiation operator is right associative. a ^ b ^ c is equal to a ^ (b ^ c).

In JavaScript, it is impossible to write an ambiguous exponentiation expression, i.e. you cannot put a unary operator (+/-) immediately before the base number.

To invert the sign of the result of an exponentiation expression: -(2 ^ 2) // -4

To force the base of an exponentiation expression to be a negative number: (-2) ^ 2 // 4

Otherwise you will see a error:

SyntaxError: Unexpected token '**'. Ambiguous unary expression in the left hand side of the exponentiation expression; parenthesis must be used to disambiguate the expression.

See MDN Arithmetic operators for more information.

Octal Integers

Starting a number with a zero can cause it to be evaluated as a octal literal.

For example, entering 0123 = will result in 83. The decimal value of octal 123.
Entering 0128 = will result in 128. This value is not an octal value since octal integers can include only the digits 0-7.

This is a feature of JavaScript.

See MDN Numeric Literals for more information.