In QA-format, we show how to use McCal here.

McCal performs floating point calculations in the 64 bit double format, and integer calculations in the long (64bit). Sometimes you will observe rounding errors and calculation errors, which are inherent in computer science.

McCal has an equation solver, #polySolv(). This function takes an array for the coefficients of the polynomial of your interest, and returns the roots of the equation.

First, users need to change the equation to the form of 'f(x) = 0'. Let's take a look at an **example**:

2x^{5}-13x^{4}+ 22x^{3}= 28x^{2}+ 40x - 25

Move the all elements in the right side to the left.

2x^{5}-13x^{4}+ 22x^{3}- 28x^{2}- 40x + 25 = 0

Next, pass the array for the coefficients to #polySolv(), which is under 'Polynomial' of FunctionViewer. In the following example, we used the box brackets to construct the array. #polySolv() returns the found roots in an array.

#polySolv([2, -13, 22, -28, -40, 25]) ▶︎ array[5]

The following figure is the screen shot. The polynomial is displayed in a block box using 'x'.

Press

button, to see the contents of the array. As you can see, we get the roots, -1, 0.5, 1-2i, 1+2i, 5.

'Print' command is also utilized to show the array elements.

#polySolv([2, -13, 22, -28, -40, 25]) ▽ -1.0000 ▽ 0.5000 ▽ 1.0000 -2.0000i ▽ 1.0000 +2.0000i ▽ 5.0000 ▶︎ array[5]

Please read Polynomial calculation and solving equations document for more information.

In McCal, please use mathematical matrices. We explain the method using the following example.

x＋２y＋３z＝１４ ２x−y＋２z＝６ ３x−２yーz＝−４

Let's assume we need to solve the above equations. Those equations are the same to the following martix notation.

First, we construct the matrices, A and B, using arrays in McCal. In the following example, we used the nested box brackets to enter the matrix elements. Array Viewer can be used for this purpose, too. A document for arrays and matrices is also availabe.

A = [[1,2,3],[2,-1,2],[3,-2,-1]] ▶︎ array[3][3] B = [14,6,-4] ▶︎ array[3]

Since we want to multiply the inverse of A from the left side, we use the left-division operator of McCal script: x = A^{-1}B = A\B). Users can enter the left-division character form the short cut dialog for matrix operators and functions, (usually, in the shift position of ), or from the software-keyboard of the Android system.

A\B ▶︎ array[3]

The results are stored in an array of which size is three. Then press

button (just next to the button) to start 'Inspector'. You can see the solutions, [1, 2, 3], in a graphical user-interface.Alternatively, the inverse of the matrix, A, can be obtained using the power operator or the #mxInv() function. In the following case, 'Print' command was used to print-out the contents of the returned array[3].

Print A^(-1)*B ▽1.0000 ▽2.0000 ▽3.0000 ▶︎ array[3]

Please read the Matrix Calculation document for more information.

Function #mxEig() takes a square matrix as the argument, and returns eignevectors and eigenvalues. The document for Matrix calculation is available, and FunctionViewer has the document for #mxEig(); FunctionViewer →Matrix and Linear Algebra→Eigenvector and Eigenvalue, #mxEig().

The wiki page for Eigenvalues and eigenvectors (external link) is helpful.

key turns McCal to the 'Shit-ON' state. The shift position (which is printed on the upper side in yellow color) of the subsequent key is selected for the key-input.

key is used with trigonometric function key ( , , and ). and selects the respective hyperbolic functions. For example,a combination of + + gives #asinh(x), hyperbolic arc-sine.

key is perhaps the most important one. Pressing this key starts interpretation of the input text, and calculation of the result.

key fires up 'Inspector'. It displays the result(s) in detail. When the result is an integer, inspector shows decimal, hexadecimal, octal, and binary form. As for floating point number, inspector displays it in all number-formats, such as fixed point, and scientific. Array results are displayed in a spread-sheet like graphical interface. Users can drag and flick the sheet.

key recalls the last script you selected in McCal Viewer. It is a convenient way to perform repetitive tasks.

stands for 'store'. It stores the last result(s) in the designated variable(s).

⇒ a ⇒ [a, b, c]

key is for substitution operator, '=', similar to the one often used in other computer languages. The left side of the operator should be a variable, or a variable list. The calculated result(s) of the right side expression is saved in the variable.

recalls the past inputs. When you press the key repetitively, McCal goes back through the past inputs in the reversed order.

is 'Back-Space' key. It erases the character just before the cursor.

is 'All-Clear' key. It erases the entire text in the calculator window.

key results in searching the next 'input box' (□) in the text.

The icons in the action bar has specific roles listed below.

When the screen of your device is small, some icons may not be displaed. In this case, the corresponding items will appear in the option menu.

Icon | Button | Description |

turns on/off the action bar. | ||

cycles the key pads of McCal. | ||

starts up McCal Viewer. | ||

fires up Function Viewer. | ||

toggles the Android software keyboard. |