EasyCalc Manual

Overview

EasyCalc is a graphing, scientific calculator for Palms and PalmPilots. Of course it has all the capabilities and ease-of-use of the built-in "4-Banger" that comes with the PalmPilot, but also includes trigonometric functions, financial functions, complex numbers and graphing. In addition, you can define your own functions and variables with names up to 10 characters long and nesting up to ten levels deep. Values may range between 1E-100 and 1E250.

Other features:

Installation

I received many emails from you that you cannot find graphs in EasyCalc. You will now find several programs in the EasyCalc ditribution. These programs are completely interchangable, but with different features or language. The largest ones, calc_en.prc (or calc_de, calc_cs, calc_sp) (over 140K) contain all features (graphs and special functions). The en, de etc. suffixes stand for a particular localization (English, Spanish, German, Czech). File calc_small.prc doesn't contain either special functions or graphs. This way you can save about 40K of space. Install only ONE of these programs. Every new installation of any of these program will rewrite the previously isntalled one.

Basic calculations

Let's start with something very simple. After starting EasyCalc, you should see something like this depending on whether you have color display or not:
enter '3+3' EXE ->
And now let's compute a very simple thing: 3+3=6. Type in '3+3' using either the buttons on the screen or graffiti and press 'EXE' or write the new line graffiti. '6' will appear in the result area. And now to something more complicated - let's compute '3*sin(pi/2)'. First change to the 'Scientific' screen by tapping the 'S' in the top right corner or use menu.
Scientific screen
Now you can easily write in '3*sin(pi/2)' and tap 'Exe'. You can change between the screens, if you don't like graffiti. You can see a somewhat shorter expression on the screenshot - EasyCalc doesn't require closing brackets ('sin(pi+1' is interpreted as 'sin(pi+1)'), and supports shortened writing of multiplication - like '3pi' or '6e'. The priority of the hidden multiplication operator is very high, that's why you can easily write 3^6pi and 3^(6*pi) gets executed. The priority of an explicitly written multiplication operator is as expected. Before proceeding, try tapping the small black arrow on the right of the input field. What you see is the history list, currently holding the last 15 expressions executed. You may wonder, what is the ANS button for? It's for the last computed result. The ans variable is inserted automatically whenever you are at the beginning of the line and press some 'operation' button. Try writing sin(pi) and press Exe. Now tap a button +. On the screen appears ans+. Now if you complete the expression (e.g. with 1) end press Exe, you have effectively computed sin(pi)+1. If you press a function name, the selected text gets inserted into a function and remains selected. Note that this works for opening bracket too, if you forgot to put part of an expression into brackets, simply select it with the pen and tap the '(' button.

Now to some of the things you can see on screen. The 'Rcl' is for fast access to variables, 'F' is for fast access to functions (be sure and create your own - see below) and 'H' stands for history.

There are 2 different layouts of the Basic screen. You can switch it in Preferences. The second form of the Basic layout is more crowded, but some people like it.

Trigonometric calculations

 
There are some comfort functions for working with degrees and radians. They are located in a small menu, that appears when you click the 'M' on the right side of the results field. It features - among other things - the '->Degree' and '->Radian' function, that changes the output to a more readable form. Of course you can try the 'Copy' option and Paste it into the input field - and it works. The degrees are written somewhat easier this way: Degree notation. But only, of course, if you learn how to write the special degree character, or select the Basic=>Scien check box in Preferences to get a Basic screen that has the degree and minute characters (right hand figure above).  The Degree/Radian/Grad can be switched in Preferences or as a convenience you can change the mode by tapping the Deg/Rad/Grd indicator at the top of the display.  Selection of Dec/Hex/Oct/Bin can be made in the same way.  This saves time in that you do not need to go to Preferences Screen to change trig modes or number radix.

NOTE: You must be in Deg mode vs. Rad or Grd to enter numbers in degrees! 

Solver tool

EasyCalc provides a tool that simplifies computation with equations and formulas. Open the Solver and create a new worksheet. Enter equation and press the 'Update' button.

You can see list of variables used in the expression with the corresponding values. If you tap the 'Note' button, you can comment this equation and add short description of every variable. Start new line with variable name followed by colon (:) and a short description. This description is then shown in the main Solver form when you select appropriate variable.
 
Solver uses the fzero() function to find the solution of the equation. If you want to change parameters of this function, tap the 'Options' button.

You can use the solver to store and document your formulas. If there is no '=' found, Solver just computes the result.

User function calculations

f()="function expression"
EasyCalc offers the ability to define functions so that you can use them later.
Example:
f()="x^2-4"
f(5)
  You get the answer 21.

Finding the zero of a function

fzero(min:max:func[:error[:params]])
This function finds the root of a function using the method 'division of interval'.

Example:

fzero(-1:4:"x^3-x^2-5")

f()="x^2-4"
fzero(-1:4:f())

Try to specify the minimum and maximum values as close as possible. If you want to use an easier interface, you can graph the function and use the 'C' button on the right side of the graph area.
Note: This function can find only 1 root in the specified interval. If the error 'Impossible calculation' appears, try to specify better the interval.
Note2: If the optional error argument is not specified, the default value 1E-10 is used. Note that the smaller error the longer time it takes to compute the result.

It is possible to add additional parameters to the function being solved. All parameters that are passed to fzero() after the error parameter are passed to the inner function.

fzero(-100:100:"x(2)*x^2+x(3)*x+x(4)":1E-8:2:3:-2)
This function would solve a quadratic function a*x^2+b*x+c, where a is 2, b is 3 and c is -2.

Other functions regarding function solving

fvalue(min:max:value:func[:error[:params]])
fintersect(min:max:f1:f2[:error[:params]])
The function fvalue tries to find a point where f(x)=value.

The function fintersect tries to find a point where f1(x)=f2(x).

All restrictions of function fvalue apply to these 2 functions.

Finding the integral of the function

Easycalc can compute the finite integral on a certain interval using either the Simpsons integration formula or the Romberg integration formula. The optional parameter of Simpsons formula is a maximum error of computation that should be achieved. The smaller error, the longer computation. The Romberg algorithm accepts the n parameter that specifies how large polynom should be used for computation. The higher n (integer value) the longer time it takes to compute the result. I do not recommend setting n to values exceeding 15, because the computing time gets really very long.

Example:

fromberg(-1:4:"x^3+x^2-5")


Finding the derivatives of the function

fd_dx(x:func[:error[:params]])
fd2_dx(x:func[:error[:params]])
EasyCalc supports finding the first and second derivatives of a function. The function fd_dx finds the first derivative at the point x and the function fd2_dx finds the second derivative at the point x.

Example: Let's have the function where the derivative is . Let x=2, then .

fd_dx(2:"x^2-4")

Matrices

[[:a11:a12:...]:[a21:a22]:...[...: anm]]
This form creates a user defined matrix.
Example: [[1:2]:[3:4]]

The result of this operation is a 2 by 2 matrix that gets automatically stored in the variable ans. Tapping the result line takes you into matrix editor.

Example: b=[[1.1:1.2]:[1.3:1.4]:[1.5:1.6]]
 

Complex matrices

EasyCalc now allows you to use complex numbers inside matrices. EasyCalc internally uses 2 different structures for normal and complex matrices and converts between them as needed. You can enter complex matrix the same way you enter the normal one:
b=[[1:i]:[i:3]]

Automatic calculations

You can make EasyCalc perform some calculations automatically on every item of the list. This behaviour is forced automatically on most functions, when at most 1 matrix is included in the operation. This way you can easily add numbers to all elemnts of matrices, call function on elements of matrices etc.
 

Matrix calculations

(matrix_a)+(matrix_b)
(matrix_a)-(matrix_b)
(matrix_a)*(matrix_b)
Easycalc supports all standard matrix operations like adding, subtracting and multiplying matrices.
Example:
a=[[1:2]:[3:4]]
b=[[5:6]:[7:8]]
a+b
     

Identity matrix generation

identity(n)
This function generates an identity matix with dimension n.
Example: identity(3)
 
You get the answer matrix(3,3). This means that the matrix is too large to be displayd on the result line. Tap the result to see the matrix in matrix editor, you will find the identity matrix:

Matrix inversion and transposition

(matrix_a)^(-1)
(matrix_a)'
Example:
a=[[1:2]:[3:4]]                                                    a^(-1)
     
You can find the result matrix under the variable ans:

To check the correct answer you can multiply matrix a with matrix ans with the result of [[1:0]:[0:1]] which is a unit matrix.

Example:

a=[[1:2:3]:[4:5:6]]
b=a'
   
The resulting b matrix is:

Matrix reduction operation

rref(a)
This functions reduces dependent rows, it is usually used to find a solution to system of equations.
Example:

1x + 2y = 3
4x + 5y = 6             

Put these two linear equations in matrix form with right hand side appended as right column. 

a=[[1:2:3]:[4:5:6]]
rref(a)

A row echelon form is returned as evidenced by the leading 1's propagating downward and to the right.
The results for x and y are returned as the right column of rref(a).  And the solution can be
verified, see below.

1*(-1) + 2*(2) = 3
4*(-1) + 5*(2) = 6
 

   

Matrix QR Factorization

qrq(a)  and  qrr(a)  return Q and R respectively as Factorization of matrix a

qrs(Ab) solves linear equation Ax = b like rref only using QR decomposition and backsubstitution.  This approach may
solve matrix that are not solvable with rref.

The qrq and qrs functions combined will compute the orthogonal Q, and upper triangular R matrix, respectively, of an m x n matrix using Householder method.   For m = n, Q and R are the same size as the original matrix.  For m(rows) x n(cols) the Q matrix is size m x m and R is size m x n.  The result of qrq(a) * qrr(a) should return the original matrix ' a '.  QR generally decomposes a full rank matrix to a simpler form.
Another interesting property is that Q*Q' = Q'*Q = I  the identity matrix.  

 

Examples:

First enter a matrix ---  ' mat3_4=[[1:2:3:4]:[2:3:4:5]:[3:4:5:6]] '
then try --- ' qrq(mat3_4) '

Q

and ' qrr(mat3_4) '

 R - upper triangular - but zero is near 1e-16.

finally try ' qrq(mat3_4) * qrr(mat3_4) '

  The original matrix - use => to see remaining columns.

Given Q and R, problems such as Ax = b can readily be solved by replacing A with QR.  This is readily accomplished with function qrs.
In this example the same matrix a appended with b as used above for rref was entered into mat2_2e.  The original a is returned along with
the solution x which is -1, 2.  Note: The Matrix can be complex but also note that for qrs the matrix must currently be square.

Other matrix functions

Integer functions

Preferences

Preferences menu

Integer calculations

Tap the ' I ' on the top and change to the 'Integer' screen:
  In this example enter 'ABCDEF' with HEX selected then select BIN.
EasyCalc works with 32-bit unsigned integers and supports simple binary operations - AND(&), OR(|), ShiftLeft(<), ShiftRitght(>) and XOR(the 'yen'). It also supports base conversions. If you do not check the Integer input in preferences, all numbers will be treated as 'float' and for float numbers are not defined the and,or,shl and shr operations. Write in some number and press the 'Exe' key and the number will appear in the Result area. Now tap on the base you want to convert to and the number will be converted. DO NOT FORGET TO CHECK THE MODE BACK TO DECIMAL AND UNCHECK THE INTEGER INPUT, you can be surprised to see BAD results if you do not (3/2 in integer is not the same as 3/2 in floating point). BTW: If the result is longer than the result field, a small arrow appears on the right and you can scroll the field by touching the field and moving with the pen left/right.

Complex calculations

 
EasyCalc supports all ordinary computations with complex numbers (please, write me if you find some operation EasyCalc doesn't support, it is possible I forgot some of them). The 'i' works exactly as expected. On the second figure you see the result of number conversion in the 'M' menu  ' ->e^(ix) ' . The functions specific to complex numbers are:

Variables and functions

EasyCalc supports an unlimited number of variables and functions. Variable (or function) names consist of lower-case letters and can be up to 10 characters long. Variables and functions share the same address space, so if you define a variable with the same name as a function, the function will be overwritten. Variable is defined simply by executing 'name=value', a function is defined by executing 'name()="code"'. The 'name' cannot be 'pi', 'e' and 'x' as these are reserved identifiers. And now some examples: writing a=31 and tapping the Exe key will assign a number 31 into variable a. From now you can treat the variable a like other constants. If you now write a=3*a, variable a will contain the number 93.
Let's try to define a simple function now: write f()="x^2" and press Exe. From now you can use this a function - f(3) will return a result of 9. You can easily delete/modify all defined functions and variables by tapping the 'DataMgr' in the 'M'-menu on the right of the result field.

You can define your own functions that accept more then 1 parameter. You have to call the second parameter as x(2) third as x(3) etc. E.g. f()="x(1)+x(2)".

Financial calculator

Introduction to financial calculations

Basic financial calculation can be characterized this way: You have some money in the bank (PV, present value). X-times a year(P/YR, payments per year) you deposit some money (PMT, payment) into your bank account. Every year the Bank adds some amount of money, a percentage of the amount that is currently on your account. The percentage is called interest (IT). After a given number of years (NP, Number of deposits) you decide to withdraw your money from the bank. What you will get from bank is a future value(FV). End of introduction


This is a basic implementation of financial calculator. You work with 6 different variables:
IT - interest pr. year. Note: from the 1.01 version this should be a per-cent number, e.g. 12% interest should be written as i=12 and not as i=0.12, like in earlier versions.
NP - number of payment-periods
PV - present value
PMT - payment (annuity) every period
FV - future value
P/YR - payments per year
and the Begin/End buttons, that affect when is the payment done - in the beginning of the year or at the end (usually at the end).
Now you can try defining 5 variables and by tapping on the name of the 6th it gets computed. Let's try an example:
By tapping on the buttons 'Undefined' near names of corresponding variables you can enter values for every variable. Now most of those 'Undefined' messages should have disappeared. If you tap on the name of the variable you wanted to compute, a notice 'Please wait' will appear in the middle of the screen indicating, that the calculator is computing, and you'll be able to read the result as soon as the sign disappears.

Graphs

EasyCalc can display functions as a graph.It currently supports normal function graphs, polar and parametric graphs.

Let's begin with drawing a simple graph. Go to graph preferences (tap 'G' and then the letter 'P' or 'menu->Graph->preferences') and set it exactly as you can see it on the screen-shot.
Graph preferences  Graph function
Now exit the preferences and go to setup (tap 'S' or 'menu->Graph->Setup funcs'). Tap the blank space on the right of 'Y1' and enter "x^2-4". Exit setup and look at the graph. If you see the graph to be drawing too fast, you can make it faster by tapping the 'Sp' button and choosing the speed. For the higher speed you get lower quality though.
If you want to delete a function or graph an already existing one, tap on the function identifier (Y1,r1...) and a popup menu appears. Select 'None' to hide a function, 'User' to create a special function for this graph (the same one, as when you tap to the right of the identifier) or choose an already existing function.
Graph: x^2-4
What can you do with the graph screen? If you tap on the graph and move the pen, the graph moves too. After you lift the pen, the graph is redrawn. The '-' button is for 'zoom out' and the '+' button is for 'zoom in' (press the '+' button and draw a rectangle, where do you want the new screen to be).

If you want to read the graph values, go to Menu->graph->table mode, and what you read are values of the parameter (x) and values of f(x).

Graph Table mode
You may want to trace a function like in the older version of EasyCalc. Tap the 'T' on the right, select a function and tap on the screen. This works perfectly for normal functions, but works somewhat worse for Polar and doesn't work at all for Parametric functions. That's why you can use up/down arrows and/or the 'Go' button to draw a cross directly on some value. You may also start typing the value directly by graffiti and the 'GoTo' window appears automatically. 
  Parametric 'Art' ?

EasyCalc can do some numerical mathematics, it can compute root, minimum and maximum of a function, first and second derivation and integral. Tap the 'C' button on on the right side of screen and follow instructions. Result of the computation will be stored in a variable called 'graphres'.


    Selected 'C' and minimum then set left and right boundaries ...

Lists

EasyCalc can do some operations with lists of numbers. Lists with complex numbers are allowed although some operation do not work with them. You can define lists either with the List Editor or on command line. I belive the List Editor is easy to use, only if you want to append an item to the list, select some item in the list and start writing numbers, input window appears and the number will be added to the list.

Lists can be thought as an extension of computation engine of EasyCalc. Most normal operation accept lists and produce a list as a result. E.g. sin(list(0:pi/2:pi)) = list(0:1:0). Of course you can freely add, subtract, multiply lists. The variation of a list can be easily defined as: sum(x-sum(x)/ldim(x))/ldim(x) (and it will work with complex numbers).

Lists work with these functions:

Digital Signal Processing

(CAUTION: dft and idft are very slow procedures, they can hold your device for a long time with large values of N. Use fft and ifft instead)

Hints

Function Reference

Contact, Newest information etc.

It might be useful to read documents you get with EasyCalc, especially 'INSTALL'.

EasyCalc was written by Ondrej Palkovsky, ondrap@penguin.cz. Latest information is available on http://easycalc.sourceforge.net. I send many thanks to people who reported bugs and sent me language corrections to this tutorial. This product is still changing and if you feel that you encountered a bug (including an error in this tutorial, english is not my first tongue) feel free to contact me.