What is the syntax of a formula?

A formula consists of one or more components, each consisting of either a mathematical expression, an assignment, an input request or a comment.

Mathematical expressions are in the standard syntax. The following are examples;

2

2+2

100 - 56 + 34 * 23 - 12 / 45 mod 6

2.01 + 6E5 / (-45 /3) + 1

sin 12A - 5 arcsin B + cosec C

25^2 - x^3 + ln |x^3|

cosh y / log x + x^/3

x^2 + y^2 - (x + y)^2

log (10^@ - 1)

Notable here is the use of modulus brackets ('|'), the power operator ('^'), the n-root operator ('^/') and the last answer variable ('@') - this latter variable is convenient both in saving typing and preserving accuracy between calculations, and for iteration purposes.Note that here I have written the formulas in pure ASCII - there are also square and square-root OEM symbols which are copied to the input window upon selecting the appropriate button - these may be entered manually using the ALT-0178 key combination and the hook key respectively. In either  event, the display in the display window is identical.

Assignments consist of a mathematical expression, an assignment operator ('=' or '>>') and a variable name - see 'How do I use variables?'.

Input requests are of the following form;

"Enter a" >> a

Whilst comments are of the following form;

"The answer is..."

An input request will display the given string in the output window and request a value for the given variable, whereas a comment just replaces the contents of the output window with the given string. This comment functionality enables the users of formulas to be completely insulated from the mathematics involved. The following is an example of a formula to  solve quadratic equations;

"Quadratic equation solver : Ax^2 + Bx + C = 0" ; A ; (B^2 - 4AC)^/2 >> D ; "First solution :" ; x1 = -B + D / 2A : "Second solution :";  x2 = -B - D / 2A

Note that although this is perfectly valid, in practice we would use the square and square root symbols for improved presentation - these characters are unavailable within help files!

Finally a word on component separators. There are three types of component separator - ':', ';' and ','. The comma and semicolon are functionally identical, and indicate that we are not explicitly interested in the result of that component such that the result will not be displayed. The colon indicates that the result should be displayed. In any event the result of the final component is always displayed. Formula execution is strictly left to right.

How do I re-use formulas?

Formulas may be explicitly saved using the 'Save' menu option, and correspondingly restored using the 'Open' option. The formula in memory will be saved, or if there is none the contents of the edit window are saved. Upon opening a formula it is automatically executed.

Alternatively the 'Predefined formulas' menu option allows formula details to be stored in a table with long descriptions sorted alphabetically. The 'Add current', 'Execute' and 'Erase entry' options should be self-explanatory - Note that this is only a mapping table - the formulas in the table are also saved individually as files (upon selecting 'Add current', a description and a filename to which the current formula should be saved are prompted before the table is updated with the description and pathname mapping).

On a shorter-term scale, a formula entered may be re-executed or re-edited by using the appropriate menu options or accelerators, or alternatively by clicking the left or right button respectively on the display window.

Also the last 20 formulas and results are all stored in the history (prior to deletion). Previous contents may be restored by using the 'Previous formula' menu option or associated accelerator, whereupon the previous formulas and results may be paged through in order (the 'Next formula' option moves forward through the history in case the desired formula is missed). The PageUp and PageDown keys also act as accelerators for these functions, and in particular the right mouse button on the input window has the same effect as the 'Previous formula' menu option.  The contents of the history are preserved between sessions.

How do I use memories?

You don't! - use variables instead. The '>>' operator is particularly useful for this purpose, mapping an expression to a variable, together with the key variables 'A', 'B' and 'C'. The values of all variables are preserved between sessions.In fact this calculator has been designed to minimise the necessity for memories - in particular with respect to re-usability of formulas and results.In particular the history enables the last 20 formulas and results to be restored (again this is preserved between sessions - see 'How do I reuse formulas?') and the '@' variable always contains the value of the last answer.

How do I use variables?

Variables may be assigned in one of two ways - using either the '=' or the '>>' operator. The following are examples of variable assignments

y = 100

3.14 >> A

[fred] = 100+3*4

Variable names may either be single alphabetical characters (lowercase letters are distinct from uppercase ones), a string of alphanumeric characters (starting with a letter, and possibly including underscores) or a letter followed by a number (when displayed, the number is a subscript of the letter). Variables are all persistent (preserved between sessions), and the current variables may be viewed using the 'View Variables' menu option. Additionally under this option variables may be flagged as constant such that their value may not be modified - this allows user defined constants.

Single character variable names may be obtained from under the 'Variables' menu instead of being typed, where the last four variables referenced are also listed for easy selection.

There are also system defined constants - these are obtained under the 'Constants' menu option where upon selection the text associated with the particular constant is copied to the input window - this may be manually typed if desired instead. Note that certain variable names are reserved for constants, e being the main example.

Variables are referenced just by name within formula text, for example;

x + 20

y = 5 sin x - 50

12x >> a; b = 12a

During formula execution, the value of any variable referenced but not previously assigned within the formula is requested - the default value being the previous value. The default value of a previously non-existing variable is zero.

Formulas may be entered as the values for these variable requests - in this instance the formula is evaluated immediately after entry using the values of any referenced variables as they are - i.e. without follow-on variable requests. If a multi-component formula is entered the the value of the last component is taken.

How do I graph an equation?

Enter a formula containing at least one assignment and containing at least one free variable. Then select the 'Graph equation' menu option. Select the variables to be graphed (1 to 4) and the free (x-axis) variable, and set the scales appropriately. The graph will then be displayed. If the scale is unsuitable, select the 'Auto-Scale' option.

How do I solve an equation?

Enter a formula containing at least one assignment and containing at least one free variable. Then select the 'Solve equation' menu option. Select the variable to be solved for (output variable) and the free (input) variable, and set the search range of the input variable.The target value for the output variable will then be requested in the main calculator window - a formula may be entered for this value if desired, which will be evaluated to obtain a value.The solve procedure will then commence, based upon a binary chop algorithm. There are three possible outcomes

- The function is discontinuous over the specified region, or goes outside the range +/-10E300. In this instance the search procedure is inoperative. Change the search range and retry.

- No solution is found. This does not imply that there is no solution within the search range, although it is unlikely. Change the search range and retry.

- A solution is found. This will not necessarily be the first solution within the search range.

How do I integrate an equation?

Enter a formula containing at least one free and one assigned variable. Then select the 'Integrate equation' menu option. From here it should be self-explanatory.

How do I process statistics?

Statistical sets are entered within curly brackets and with the elements separated by commas or semi-colons.For example;

100, 120, 140, 150, 160, 170, 130, 120.5, 10E5, 123

Note that only numerical values are valid here. Upon entering a statistical set, select the 'Process statistics' menu option to obtain the statistical information.

What happens in the event of error?

A specific error message is displayed, and the exact position of the cause of the error is highlighted in the edit window. Upon correction, execution will continue exactly as before.

Are there any hidden functions that I am not likely to find without guidance?

Yes, a few shortcuts will not be immediately apparent, specifically the following;

- the '|' character is obtained by clicking the right button on the '(' button

- a reciprocal operation occurs upon double clicking or right-button clicking on the '/' button

- sec, cosec and cot are obtained respectively by clicking the right button on the 'sin', 'cos' and 'tan' buttons

- the '>>' operator is obtained by doube-clicking or right-button clicking on '='

- clicking the right button on 'DEL' deletes more characters

- Clicking the right-button on the input window pulls back the previous contents

- Clicking the left-button on the display window re-executes the current formula

- Clicking the right-button on the display window transfers it to the edit window

- Unary minus may be obtained by double-clicking or right-button clicking on '-'. Only the spacing differs.

- PageUp and PageDown may be used to page through the history of previosu formulas and answers

- The hook key may be used for the square root symbol

 How do I optimise the appearance of the calculator?

All such options are found under the 'Preferences' menu. Choose colours carefully and take particular care with respect to font choice - good fonts that scale well are required. "GillSans" is always a good choice, "Arial" is okay, and "System" can look good in the output window.

It's worth taking the time to optimise the display - especially at lower resolutions. If you notice that at certain sizes the display looks strange, try changing the font. In particular at small point sizes "Arial" can be problematic and lead to inconsistencies in boldness.