Copyright: Copyright(C) Chris Allison 1994
Citation: All Rights Reserved


Help Index
Contents for Handy Calc Help

Introduction

Calculator

Menus

2D Graph Tool

3D Graph Tool

Tips and Tricks

Windows Key Strokes

Registering Handy Calc


Introduction

Welcome To Handy Calc.  Handy Calc is a scientific calculator software package for Windows.  Although calculator software for Windows is nothing new,  Handy Calc is different in some very important ways.   For instance Handy Calc is command line oriented.  Many calculator programs for Windows (such as the one packaged with it). have the look and feel of a pocket calculator.  Each operation is evaluated as you go, displaying one value on the screen at a time.  This approach is error prone and time consuming because mistakes are difficult to correct.   Handy Calc lets you type entire expressions and edit them before evaluating.   If a mistake is made it is easy to correct it.  Handy Calc, also lets you define variables and functions and has 2D graphing and 3D graphing tools to make plotting functions easy.

I wrote Handy Calc with the goal of making it elegantly simple yet very useful.  I hope that I have succeeded and you will consider registering this shareware product.


Shareware

Shareware is software which is distributed without profit to the programmer who wrote it.   The programmer gets paid by requesting that users send in a registration fee.


Menus
Handy Calc Main Menu Commands

File

New

Open

Save

Save As

Exit

Edit

Undo

Cut

Copy

Paste

Delete

Clear

Find

Next

Replace

Options

Functions

Variables

2D Graph

3D Graph

Status Bar

Toolbar


File New Command
File|New Command (Main menu)

The File|New command closes the open calculator file and creates a new untitled one.


File OpenCommand
File|Open Command (Main menu)

The File|Open command displays the Open File dialog box so that you can select a calculator file to load.


File Save Command
File|Save Command (Main menu)

The File|Save command saves the currently open calculator file to a disk.  If the file is untitled, the Save File As dialog box is displayed so that  you can name the file and choose where you would like it  to be saved.


File Save As Command
File|Save As Command (Main menu)

The File|Save As command allows you to save a calculator file under an new name, and/or in a new location on a disk.  The command displays the Save File As dialog box.  Where you can enter the new file name, including the drive and directory.  If you choose an existing file name, you will be asked if you would like to overwrite the existing file.


File Exit
File|Exit Command (Main menu)

The File|Exit command closes the Handy Calc application.  If the currently open calculator file has changed since the last save, Handy Calc will ask if you would like to save the file.


Edit Undo Command
Edit|Undo Command (Main menu)

The Edit|Undo command restores the file in the current window to the way it was before your most recent edit operation.


Clipboard(Windows Tip)

The clipboard is a feature of Windows which allows you to move data such as text and pictures from one application to another.  You use it by selecting text or other data in the source application and copying the data into the clipboard with the  copy or cut command.   You can put copies of the data into the destination application (can be the same as the source) by using the destination application's paste command.

Many applications will accept clipboard data (graphs and expressions) from Handy Calc such as wordprocessors ,  spreadsheets  and image editors.


Selecting Data for the Clipboard(Windows Tip)

There are two ways to select text in the main editor for copying or cutting into the clipboard.    The first way requires you to move the caret  to the begining of the text you wish to copy or cut.  Hold down the shift key and use the arrow keys to move to the end of the text.   The other way is to use the mouse.  You first move the mouse cursor to the beginning of the text to be selected then press the left mouse button down and hold;  now drag the cursor to the end of the text and release the button.

The 2D graph and 3D graph tools don't require you to select the image to be copied into the clipboard.  The entire image is automatically selected.


Edit Cut Command
Edit|Cut Command (Main menu)

The Edit|Cut command removes the selected text from the main editor and places the text in the clipboard. Choose the Edit|Paste command to paste the cut text to a different location.


Edit Copy Command
Edit|Copy Command (Main menu)

The Edit|Copy command leaves the selected in text in the main editor intact and places an exact copy of it in the clipboard.  Choose the Edit|Paste command to paste the copied text to a different location.


Edit Paste Command
Edit|Paste Command (Main menu)

The Edit|Paste command inserts the text in clipboard into main editor at the caret position.  If text is selected it will replaced with the clipboard text.


Edit Delete Command
Edit|Delete Command (Main menu)

The Edit|Delete command deletes the currently selected text in main editor.  The text is NOT placed in the clipboard.


Edit Clear Command
Edit|Clear Command (Main menu)

The Edit|Clear command clears the text in the main editor.  Variable and Function definitions are not cleared.


Edit Find Command
Edit|Find Command (Main menu)

The Edit|Find command searches the main editor for a text pattern.  The command displays the Find dialog box which controls the search process.  The options in the dialog box determine whether whole words are to be matched;  if the case of characters is significant, and if the search should be conducted forwards or backwards through main editor.  As each match is found, it is highlighted in the main editor.


Edit Next Command
Edit|Next Command (Main menu)

The Edit|Next command repeats the last Edit|Find or Edit|Replace operation.


Edit Replace Command
Edit|Replace Command (Main menu)

The Edit|Replace command displays the Replace dialog box which is used to specify a text pattern to be found in the main editor and text which will replace it.  Selecting the replace button in the dialog box will cause the next occurrence of the text pattern after the caret to be replaced with the specified text.


Data Functions Command
Options|Functions Command (Main menu)

Displays the functions dialog box which shows all user defined functions and allows for easy edit of then.


Functions Dialog Box
Functions Dialog Box (Alt O F from main editor)

The Function list box  contains a list of all user defined functions.  If you wish to edit one of the functions, double click on the function or single click on the function and press the Edit Button (Alt E).  This will insert the function in the main editor at the location of the caret so that you may edit the function.   If text is highlighted in the main editor, the text will be replaced with the function.  A function can be deleted from memory by single clicking on the function you wish to delete and pressing the Delete button (Alt D).  The Comment section of the Dialog box is an edit box where you can put an optional comment.  To display a comment for a function select the function by single clicking on it.   You can change the comment by selecting the comment edit box (Alt C)  and changing the text.  Pressing the OK button will accept all changes.  Pressing the Cancel button will ignore all changes.


List Box
List Box (Windows Tip)

List boxes are rectangular areas found in Dialog Boxes which list items such as words or phrases.  The behavior of list boxes vary but some consistent features remain the same.  Often list boxes will allow for items to be selected by single clicking on an item or they will perform some action when an item is double clicked,  They often contain scroll bars which can be used to scroll more items up and down or display wide items by scrolling left and right.


Combo Box
Combo Box (Windows Tip)

A combo box is similar to a list box with the exception that only one item is displayed until the down arrow button is pressed.  A combo box then behaves just like a list box.  Sometimes the single item will be an edit box.


Edit Box
Edit Box (Windows Tip)

Edit boxes are rectangular areas often found in Dialog Boxes which are used to edit text.  Edit boxes may only allow you to type in one line of text or they can have multiple lines.   Multiple line edit boxes will sometimes contain scroll bars which allow for scrolling of the text.  Edit boxes use the standard Window's Keyboard configuration for editing.


Caret
Caret (Windows Tip)

The caret is a small flashing vertical bar which indicates the location where the next typed character will be placed on the screen.  Carets are usually found in edit boxes.

Historically the term "cursor" was used to refer to the caret; however, Microsoft decided to call the arrow you move with the mouse the "cursor".  To avoid confusion,  throughout Handy Calc's help the term "caret" will only by used to refer to the flashing vertical bar.


Cursor
Cursor (Windows Tip)

The cursor is the arrow that you move with the mouse.

Historically the term "cursor" was used to refer to the caret; however, Microsoft decided to call the arrow you move with the mouse the "cursor".  To avoid confusion, throughout Handy Calc's help the term "cursor" will only be used to refer to the mouse's arrow.


Dialog Box
Dialog Box (Windows Tip)

You have most likely already seen many examples of dialog boxes.   Dialog boxes can vary a lot.  They are windows (rectangular region on the screen) which contains input and output controls such as edit boxes, list box , and buttons.

Most applications have a command called About which brings up a simple example of a dialog box.  It usually contains copyright information and an OK button.  To see Handy Calc's About dialog box press the Alt H A keys in the main editor.


Scroll Bar
Scroll Bar (Windows Tip)

You are probably familiar with the scroll bars even if you don't know them by name.   Scroll bars are the long narrow bars with small arrow buttons at each end which are used to scroll information such as text or images.

By pressing the arrow buttons found on a scroll bar, information can be scrolled up and down (vertical scroll bars) or left and right (horizontal scroll bars)

Scroll bars have a small square on the bar called the 'thumb'.  If you move the mouse cursor on top of the thumb and depress the left mouse button, you can drag it up and down (vertical scroll bars) or left and right (horizontal scroll bars). Simply release the mouse button when you are to your desired location.  This is useful when you what to scroll a large distance.

An example of a horizontal and vertical scroll bar can be seen in the main editor.


Functions
Function

Throughout Handy Calc's help system, the term "function" is used in its mathematical sense.

A function consists of a domain and a rule.   The domain is a set of real numbers.  The rule assigns no more that one number to each number in the domain.

Example:

F[x] = x + 12

F[2] =  2 + 12 » 14

Handy Calc uses square brackets ' [ ] '  for functions to avoid the ambiguity with the more common notation. of parenthesis ' ( )'.

Functions can also have multiple parameters

Example:

P[x, y] = x + y + 6

P[4, 8] = 4 + 8 +6  » 18

Please see an Algebra and/or Calculus text for a more complete discussion of functions.

Handy Calc had two kinds of functions user defined functions and system functions.


Data Variables Command
Options|Variables Command (Main menu)

The Options|Variables command displays the variables dialog box which shows all user defined variables and allows for the editing of them.


Variables Dialog Box
Variables Dialog Box  (Alt O V from main editor)

The Variable list box contains a list of all user defined variables. If you wish to edit one of the variables, double clicking on the variable or single clicking and pressing the Edit button (Alt E) will insert the variable definition in the main editor at the location of the caret so that you may edit the function.   If text is highlighted in the  main editor it will be replaced with the variable definition.  A variable can be deleted from memory by single clicking on the variable you wish to delete and pressing the Delete button (Alt D).  The Comment section of the dialog box is an edit box where you can put an optional comment.  To display a comment for a variable select the variable by single clicking on it.   You can change the comment by selecting (Alt C) the comment and changing the text.  Pressing the OK button will accept all changes.  Pressing the Cancel button (Esc) will ignore all changes.


Variables

Throughout Handy Calc's help system the term "variable" is used in its mathematical sense.

A variable is a letter or string of letters which represents a number value

Example:

r = 2

r + 2  »  4

See defining variables for more information.


Data 2D Graph Command
Options|2D Graph Command (Main menu)

Displays the 2D Graph Tool which graphs one variable functions


Data 3D Graph Command
Options|3D Graph Command (Main menu)

Displays the 3D Graph Tool which graphs two variable functions


Edit Toolbar Command
Options|Toolbar Command (Main menu)

Toggles the Toolbar on and off.


Toolbar

Row of buttons found under the menus which allows for quick access of menu commands.


Edit Status Bar Command
Options|Status Bar Command (Main menu)

Toggles the Status bar on and off..


Edit Status Bar Command
Status Bar

Gray bar found at the button of the application and graph tools which displays help and other information.


Calculator Commands
Calculator

Evaluating Mathematical Expressions

Operator precedence

System functions

Defining variables

Defining functions

Plotting 2D graphs

Plotting 3D graphs


Evaluating Expressions
Evaluating Mathematical Expressions

If you have used a pocket calculator you already know a lot about evaluating expressions with Handy Calc.   Expressions are entered in the main editor and evaluated when the Enter key is pressed. For example, if you type into the main editor:

1 + 1

then press the Enter key,  Handy Calc will evaluate the expression and append the result to the end like:

1 + 1  »  2

The syntax of the expressions Handy Calc can evaluate is similar to that of standard algebra and most computer languages:

-   	subtraction / minus

+  	addition / positive

/   	division

*	multiplication

^	power ( x ^ y = x to y power )

( ) 	change order of precedence

[ ] 	Function parameters

= 	Variable definitions and Functions definitions

Some examples of evaluated expressions:

1 + 2 + 3  »  6

-3 * 3  »  -9

2 ^ 3  »  8

2 ^ (1/2)  »  1.414213562373095

1/2  »  0.5

(1 + 3) / 2  »  2

(1 + 3/7 - 3^8) / (2.322 + 2) + -1/2  »  -1518.216665564884

Large numbers are displayed in a scientific notation, example:

2^54  »  1.801439850948198e+16

Which means:

1.801439850948198  * 10 ^ 16

or

18014398509481980

you can also enter numbers in scientific notation

1.02e5  »  102000

34.2e-4  »  0.00342

312.12e-33  »  3.1212e-31

Handy Calc also understands implied multiplication:

2 (1/2)  »  1

2 cos[0]  »  2

x = (1/2)(1/2)  »  0.25

4 x   »  1

Notice that you can use the caret keys or mouse cursor  to move the caret to previously evaluated lines and make changes using the standard Windows editing keys.  Reevaluate the expression by pressing Enter.


Operation Precidence
Operator Precedence

Operator precedence refers to the order which operations are evaluated

Handy Calc uses the following very common operator precedence:

Highest 	square brackets [] and parenthesis ()

power ^

unary operators plus + and minus -

multiply * and divide /

Lowest	addition + and subtraction -

Expression are evaluated Left to Right.

For instance:

1 + 3 * 5  »  16

Notice that the multiplication was done before the addition. This is because multiplication has a higher precedence.

If you wanted the addition evaluated first you could use the high precedence parenthesis to accomplish this:

(1 + 3) * 5  »  20

As the precedence table indicates  some operators have the same degree of precedence.  The fact that expressions are evaluated left to right is used to determine which operation is evaluated first.  For instances:

2 - 3 + 6  »  5

If you didn't have the left to right rule the expression could have been interpreted as -7 since addition and subtraction have the same precedence.

A common mistake people make is not noticing that the power operator has a higher precedence over the minus operator.  For instances:

-2 ^ 2  »  - 4

That is Handy Calc has interpreted the expression like

- (2 ^ 2) »  - 4

If you want the expression to evaluate minus two squared you would need to enter the following:

(-2) ^ 2  » 4


System Functions

System Functions are pre-defined functions that Handy Calc is able to evaluate.  The follow is a list of all system functions.

abs	acos	asin

atan	ceil	cos

cosh	cot	csc

exp	fact	floor

frac	int	lg

ln	log	neg

pos	sec	sin

sinh	tan	tanh


Absolute Value
Absolute Value, abs

abs[X] is a system function which returns the Euclidean distance from X to the origin.  To simplify, if X is negative abs[x] drops the minus sign.

Example:

abs[-13.3]  »  13.3

abs[1.3]  »  1.3


ArcCosine
ArcCosine, acos

acos[X]  is a system function which is the inverse of cos[x] in the range of -1 [image]  x  [image] 1.

Examples:

acos[cos[2]]  »  2

acos[-0.2]  »  1.772154247585227


ArcSine
ArcSine, asin

asin[X]   is a system function which is the inverse of sin[x]. in the range of -1 [image] x  [image] 1.

Examples:

asin[sin[.5]]  »  0.5

asin[-0.2]  »  -0.2013579207903308


ArcTangent
ArcTangent, atan

atan[X]  is a system function which is the inverse function of tan[x] in the range of -1 [image]  x  [image] 1.

.

Examples:

atan[-2]  »  -1.10714871779409

atan[tan[0.5]]  »  0.5


Ceiling
Ceiling, ceil

ceil[X] is a system function which returns the smallest integer not less than X.

Examples:

ceil[-2.12]  »  -2

ceil[3.3]  »  4


Cosine
Cosine, cos

cos[x] is a pre-defined system function.  If you have a right triangle with an angle X in radians, and sides of length H, A and O such as:

cos[X]  will return the ratio A/H.

A trigonometry text book can give you a more detailed explanation of cos[x] and its uses.


Hyperbolic Cosine
Hyperbolic Cosine, cosh

cosh[x] is a pre-defined system function defined as:

cosh[x] = (exp[x] + exp[-x])/2

cosh[x] has applications in engineering and is similar to cos[x].  Whereas for all values of x the point (cos[x], sin[x]) are found on a unit circle (x^2 + y^2 = 1) the points (cosh[x], sinh[x]) lie on a hyperbola (x^2 - y^2 = 1).


Cotangent
Cotangent, cot

cot[x] is a pre-defined system function defined as:

cot[x] = 1/tan[x]

A trigonometry text book can give you a more detailed explanation of cot[x] and its uses.


Cosecant
Cosecant, csc

csc[x] is a pre-defined system function defined as:

csc[x] = 1/cos[x]

A trigonometry text book can give you a more detailed explanation of csc[x] and its uses.


Exponetial
Exponetial, exp

exp[x] is a pre-defined system function which calculates

exp[x] = e ^ x

If you are unfamiliar with the famous mathematical constant 'e' this might seam like a stupid function but it is quite useful.  I recommend reading more about it in a calculus text book.

Although you could define e = 2.7182... and use the power operator (^), exp[x] is more accurate.


Factorial
Factorial, fact

fact[x] is a pre-defined system function which calculates:

fact[x] = x * (x-1)  * (x*-2) * ... * 1

Example:

fact[5]  »  120

or   5 * 4 * 3 * 2 * 1 = 120

fact[x] calculates the floor of x before determining the factorial.


Floor

floor[X] is a system function which returns the largest integer not greater than X.

Examples:

floor[-2.12]  »  -3

floor[4.3]  »  4


Fraction
Fraction, frac

frac[X] is a system function which returns the fractional part of a X.

Examples:

frac[1.21]  »  0.21

frac[-1.28]  »  -0.28


Integer
Integer, int

int[X]  is a system function which returns the integer part of a X.

Examples:

int[1.21]  »  1

int[-12.28]  »  -12


Logarithm base 2
Logarithm base 2, lg

lg[X]  is a system function which returns the value y such that 2^y = x.

example:

lg[2 ^ 12]  »  12

y = lg[1.23]  »  0.2986583155645151

2 ^ y  »  1.23


Natural Logarithm
Natural Logarithm, ln

ln[X]  is a system function which returns the value y such that exp[y] = x.

example:

ln[exp[12]]  »  12

y = ln[1.23]  »  0.2070141693843261

exp[y]  »  1.23


Logarithm base 10
Logarithm base 10, log

log[X]  is a system function which returns the value y such that 10^y = x.

example:

log[10 ^ 12]  »  12

y = log[1.23]  »  0.08990511143939793

10 ^ y  »  1.23


Negitive
Negitive, neg

neg[X]  is a system function which returns 1 if x is negative or 0 if it isn't.

example:

neg[-12]  »  1

neg[5.32]  »  0

neg[0]  »  0


Positive
Positive, pos

pos[X]  is a system function which returns 1 if x is positive or 0 if it isn't.

example:

pos[-12]  »  0

pos[5.32]  »  1

pos[0]  »  0


Secant
Secant, sec

sec[x] is a pre-defined system function defined as:

sec[x] = 1/sin[x]

A trigonometry text book can give you a more detailed explanation of sec[x] and its uses.


Sine
Sine, sin

sin[x] is a pre-defined system function.  If you have a right triangle with an angle X in radians, and sides of length H, A and O such as:

sin[X]  will return the ratio O/H.

A trigonometry text book can give you a more detail explanation of sin[x] and its uses.


Hyperbolic Sine
Hyperbolic Sine, sinh

sinh[x] is a pre-defined system function defined as:

sinh[x] = (exp[x] - exp[-x])/2

sinh[x] has applications in engineering and is similar to sin[x].  Whereas for all values of x the points (cos[x], sin[x]) are found on a unit circle (x^2 + y^2 = 1).  The points (cosh[x], sinh[x]) lie on a hyperbola (x^2 - y^2 = 1).


Tangent
Tangent, tan

tan[x] is a pre-defined system function.  If you have a right triangle with an angle X in radians, and sides of length H, A and O such as:

tan[X]  will return the ratio O/A.

A trigonometry text book can give you a more detailed explanation of tan[x] and its uses.


Hyperbolic Tangent
Hyperbolic Tangent, tanh

tanh[x] is a pre-defined system function defined as:

sinh[x] = sinh[x]/cosh[x]

A calculus/algebra text book can give you a more detailed explanation of tanh[x] and its uses.


Defining Variables

Defining variables is done just like you might think with the equal (=) operator.

Example, if you enter into the main editor:

a = 2  »  2

The variable 'a' is defined and can now be used just like a number.  When you use 'a' in an expression 2 will be substituted.

a  »  2

a + 2  »  4

You can put any valid Handy Calc expression to the right of the equal operator.  The expression is evaluated before it is stored under the variable name.

Example:

a = 1/2 + 1/2  »  1

b = a/2  »  0.5

a = 2  »  2

b  »  0.5

Variable names can consist of any string of upper or lower case letters, under score (_),  or number.  Variable names must be shorter then 64 characters and can't start with a number.

Example of valid variable names:

pi = 3.14159  »  3.14159

Unit_Circle_Area = 3.14159

pi_2 = 4 atan[1]  »  3.141592653589793


Defining Functions

Function defining is done with the equal (=) operator.

Example, if you enter into the main editor:

F[X] = X + 1

F[X] is now defined.  X is called a local variable and  a value must be supplied to Handy Calc each time you evaluate an expression which contains F[X].

Example:

F[2]  »  3

The local variable X is only defined 'inside' F[X].  The value of  X 'outside' of F[X] will not be affected:

X = 1/2  »  0.5

F[X]  =  X  + 2

F[4]  »  6

X  »  0.5

Variables 'outside' of a function definition are called global variables and can be used inside of a function:

pi = 3.131  »  3.131

Circle_Area[radius] = pi * radius ^2

Circle_Area[2]  »  12.524

If you decide that pi is not accurate enough you could do the  following:

pi = 4 atan[1]  »  3.141592653589793

Circle_Area[2]  »  12.56637061435917

Notice that the new version of pi was used even though it was changed after Circle_Area[radius] was defined.

Notice that user functions can be used anywhere in a expression that a number could be used and that the local variables can be assigned any valid expression:

F[X] = 1 + X

10 + F[1 + 2]  »  14

Functions can have multiple parameters (up to ten)

Examples:

basket[apples, oranges] = apples + oranges

basket[5, 6]  »  11

Func[x, y, z] = cos[x] /y + sin[z]

Function names can consist of any string of upper or lower case letters, under score (_)  or number.  Function names must be shorter then 64 characters and can't start with a number.

Examples of valid function names.

_Hello[x] = x/2

Func10[x] = 6 x

long_function_name[local_variable] = local_variable + 1


Main Editor

The Main Editor is the resizable  multi-line edit box  you see when you first open Handy Calc.   If you have Handy Calc in the foreground and start typing, text should appear in the main editor.  If this does not happen try pressing the Alt key or single clicking on the editor with the mouse and try again.


2D Graph
2D Graph (See 2D Graph Menus Also)

The 2D graph tool is used to generate two dimensional Cartesian plots of functions with one variable.

The function name "graph"  has a special use.  When you define a one dimensional function with the name "graph" the 2D graph tool is displayed with a plot of the function you defined.

Example,  if you type into the main editor the following:

graph[x] = cos[x]

The 2D graph tool will be displayed showing a plot of the cosine function.

Use the Zoom out command to see a larger portion of the function and try using the mouse rubber band box to zoom in.

There are three other functions which are plotted in the 2D graph if defined as a one dimensional functions. There are "graph1", "graph2", and "graph3".    Unlike "graph" the tool will not be displayed when they are defined.  When defining multiple functions, to be plotted, it is a good idea to define "graph" last so that the all the functions are displayed.

Example:

graph1[A] = sin[A]

graph[x] = cos[x]

Handy Calc will display a plot with cosine and sine.


Rubber Band Box
2D Zooming with the Mouse (Rubber band Box)

You can use the mouse to zoom in (reduce the range of) a 2D graph by moving the mouse cursor some place on the 2D graph and depressing without releasing the left mouse button.  Dragging the mouse will cause a rectangle to be drawn between the point where you depressed the mouse button and the cursor.  When you release the left mouse button Handy Calc will change the range so that only the region inside the rectangle is displayed.   If you depress the mouse button in the wrong place, drag the cursor off the 2D graph and release.


2D Graph Menu Commands

Graph

New

Colors

Options

Print

Print Setup

Copy

Close

View

Zoom In

Zoom Out

Square

Min/Max

Left

Right

Up

Down

Default

Undo

Status Bar

Toolbar


Graph New Command
2D Graph Graph|New Command (2D graph menu)

The Graph|New command clears the 2D graph tool of all functions which are currently being displayed.


Graph Color Command
2D Graph Graph|Colors Command (2D graph menu)

The Graph|Colors command displays the 2D graph colors dialog box which allows you to change  line color, background color, grid color, etc.


2D Graph Color Dialog Box
2D Graph Colors Dialog Box (Alt G L from 2D Graph)

The 2D graph Colors Dialog Box is used to change the color of the various items found in a 2D graph.   Visible or white light is made up of different amounts of red, green, and blue light.   Every color in the rainbows is a combination of these three colors.  To change the color of the a given item, select the item whose color you wish to change in the combo box at the top of dialog box.  Then enter the amount of red, green, and blue you would like that color to have by either entering the a value between 0 - 255 in each edit box or by using the scroll bars to vary the amounts.  Have fun experimenting with different colors, if you mess up the colors the Default button  will reset the color values to something reasonable.  Pressing the OK button will accept all changes.  Pressing the Cancel button will ignore all changes.

Different computer setups will have different capacities to display color.  In simpler systems which don't have all the shades of color supported by Windows, the closest color is chosen.


Graph OptionsCommand
2D Graph Graph|Options Command (2D graph menu)

The Graph|Options command displays the 2D graph options dialog box which allows  you to change the range, scale size, etc...


2D Graph Color Dialog Box
2D Graph Options Dialog Box (Alt G O from 2D Graph)

Options

Axis

Grid

Scale marks

Numbers

Range

Asymptote

Font

The Default button  will reset the options to reasonable settings which allow you to experiment with out worrying about messing up the 2D graph.  Pressing the OK button will accept all changes.  Pressing the Cancel button will ignore all changes.


2D Graph Axis
Axis (2D Graph Options Dialog box)

The axis is the horizontal and vertical lines which represent x = 0 and y = 0 respectful.

If you check  X Axis (Alt A toggles) and/or Y Axis (Alt I toggles), you will see axis lines shown in the color specified in the 2D Color Dialog Box


2D Graph Grid
Grid (2D Graph Options Dialog box)

If Grid is checked (Alt G toggles) a dashed grid will be displayed on the 2D graph.  There are two ways for grid lines to be drawn Dynamic (Alt D) and Static (Alt S).  The Color of the grid lines is  specified in the 2D Color Dialog Box

In the Dynamic mode the X scale (Alt L) and Y scale (Alt L Tab) values are used to determine how many grid lines are drawn on the graph.  Grid lines are drawn at multiples of the X scale and Y scale values.  The number of grid lines will vary.   This mode is useful if you would like grid lines to always cross the same point regardless of the range

In the Static mode the Cols(X) (Alt C) and Rows(Y) (Alt C Tab) values are used to determine where to put the grid lines.   The number of grid lines in X will always equal Cols, and the number of lines in Y will always equal Rows.  This mode is useful when you are changing the range often.

If the space between grid lines is less than 3 pixels, the grid lines will not be displayed.  This is to prevent the computer from wasting time by drawing a ton of useless  grid lines.


2D Scale Marks
Scale Marks (2D Graph Options Dialog box)

If Scale marks (Alt K toggles) is checked scale marks will be placed on the axis at regular intervals.  The scales marks are placed at the point where grid lines will cross the X or Y axis even if the grid is turned off.

The size of the scale marks is normally determined by a percent (Alt M Tab Tab) of the grid unit.  However if the percent means the scale mark would be smaller than Min (Alt M), than the size of the scale marks will set to be min.  Likewise the scale mark size won't be larger than Max (Alt M Tab).


2D Graph Numbers
Numbers (2D Graph Options Dialog box)

You can chose to not display numbers by selecting numbers None (Alt O).  You can display numbers next to each scale mark by selecting On Axis (Alt N), or you can have them placed on the edge of the graph by selecting On Edge (Alt E).  If the numbers start to overlap, they are not displayed.  This is to prevent the computer from wasting your time by drawing a ton of useless numbers.  Pressing the Font Button (Alt F) will display the 2D Graph Font Dialog box which allows you to change the font and size of the numbers.


2D Range
2D Graph Range (2D Graph Options Dialog box)

The X Min (Alt X) and X Max (Alt X Tab)  edit boxes  set the minimum and maximum X values for the 2D Graph range.  Likewise, Y Min (Alt Y) and Y Max (Alt Y Tab) set the minimum and maximum Y values.

The 2D range can also be altered with the Rubber Band Box


2D Graph Asymptote
Asymptote (2D Graph Options Dialog box)

Asymptotes are a points in a function  where the values approach some value without reaching it.   Functions with horizontal asymptotes can be a problem when plotted by causing stray lines to be drawn.  To help with this problem, the asymptote detect option was included.

If Asymptote (Alt T Toggles) is turned on, Handy Calc will attempt to detect horizontal asymptotes by looking for quickly rising parts of  the function and place a dashed line instead of the stray one.  The cutoff value determines the percent of the graph height the line must rise before the 2D graph will assume there is an asymptote.  If asymptotes are not placed where you think there should be one decrease the cutoff value and if dashed lines are placed where you think there should not be an asymptote increase the cutoff value, or shut the option off.  The color of the asymptote lines is specified in the 2D Color Dialog Box.

Remember just because the program detects an asymptote does not necessarily mean one exists, or if one isn't detected, that one doesn't exists.   This feature is only meant to make the graph look better if an asymptote is known to exists not for proof of the existence of an asymptote..

To see an example of the asymptote feature, turn the asymptote feature on and set the cutoff value to 30 then evaluate the following:

graph[t] = sin[t] * tan[t]

By turning Asymptote off you can see the problem caused by not using the asymptote detection.


2D Graph Number Font
Font Button (2D Graph Options Dialog box)

The 2D Graph Option Dialog box's Font button (Alt F) displays a Font Dialog Box which allows you to change the size and font style for the 2D graph numbers


2D Graph Font Dialog Box
2D Graph Font Dialog Box (2D Graph Options Dialog box)

2D Graph Font dialog box allows you to change the size and style of the font used with 2D graph numbers.  Use the Face Name List box  to change the font type used.  The size of the numbers is normally determined by a percent (Alt P) of the grid unit.  However if the percent means the numbers would be smaller than Min (Alt M), the size of the numbers will be set to be min.  Likewise the number size won't be larger than the Max (Alt A).


2D Graph Print Command
2D Graph Graph|Print Command (2D graph menu)

The Graph|Print command prints the 2D graph on the currently selected printer.

See Ideas for Printing Graphs Also


Graph Print Setup Command
2D Graph Graph|Print Setup Command (2D graph menu)

The Graph|Print Setup command selects and sets up the printer.


Graph Copy Command
2D Graph Graph|Copy Command (2D graph menu)

The Graph|Copy command places a copy of the 2D graph into the Windows clipboard.

This feature is useful if you wish to put a graph into a word processor file or spreadsheet.


Graph Close Command
2D Graph Graph|Close Command (2D graph menu)

The Graph|Close command removes the 2D graph tool from view.  The range, functions, and other settings will remain intact.


View ZoomIn Command
2D Graph View|Zoom In Command (2D graph menu)

The View|Zoom In command decreases the range of the 2D graph  by 50%

For example, if your range is:

x min = -2	x max = 2

y min =  -2	y max = 2

The zoom in command would change it to

x min = -1	x max = 1

y min = -1	y max = 1

The 2D range can also be zoomed in with the Rubber Band Box


View ZoomOut Command
2D Graph View|Zoom Out Command (2D graph menu)

The View|Zoom Out command doubles the range of the 2D graph.

For example, if your range is:

x min = -2	x max = 2

y min = -2	y max = 2

The zoom out command would change it to

x min = -4  	x max = 4

y min = -4	y max = 4

The 2D range can zoomed in with the Rubber Band Box


Range

The range is the minimum and maximum values that specifies the region of a function you wish to view in a graph.

For example, if you wished to see one wave of the cosine function the range for the 2D graph would be:

x min = -3.1415926	x max = 3.1415926

y min = -1	y max = 1

Since the 3D graph has an additional variable it also has z min and z max values.


View SquareCommand
2D Graph View|Square Command (2D graph menu)

The View|Square command makes the width and height of the range the same size (the largest of the two).

For example, if your range is:

x min = -2.12	x max = 2.12

y min =  0	y max = 2

The width of the range is 4.24  and the height is 2.  Since the width is larger, the height of the range would be changed to equal 4.24 by setting the range to:

x min = -2.12	x max = 2.12

y min = -1.12	y max = 3.12

This feature is useful when you would like to see a function without distortion from a non-square range.  To do this, first make the 2D graph Window look square on your monitor by resizing it, then use the View|Square command.


View Min/Max Command
2D Graph View|Min/Max Command (2D graph menu)

The View|Min/Max command changes the Y minimum and Y maximum to reflect the lowest and highest points of the function in the range.

Example:

If you type in the main editor:

graph[x] = cos[x]

The 2D graph tool. will be displayed with a cosine function drawn.

Using the Default Command will set the range to:

min X = -2	max X = 2

min Y = -2	max Y =  2

Now using the Min /Max command the range is set to:

min X = -2	max X = 2

min Y =  -0.41614684	max Y = 0.99999157

The min Y and max Y values where changed since the maximum and minimum values for the cosine function in the range  -4 > x  < 4 are approximately  min y =   -.416 and max y = 1.

The min and max values are determined with an 'approximate' technique and will not necessary find the true min and max values for a function.   The manual technique, from calculus, of finding the points in the range where the first derivative is equal to zero is better if accuracy is require.

Zooming into critical points can improve the accuracy of the min/max feature.


Resize

There are two way to resize an application window.

Before you resize an application you must have the application in the 'restored' state.  If the application is maximized (takes up the full screen) press the double headed arrow button in the upper right corner of the screen with the mouse or type Alt space R.

The first and quickest way is to move the mouse cursor to the edge or corner of the application.  When the cursor is above the edge it will change its shape from a single sided arrow to a double sided arrow.  Press down on the left mouse button and drag the mouse.  Release the left mouse button when you have found the desired size.

The second way is to use the keyboard.  Type Alt.space S a four sided arrow will appear. Use the up, down, left, right, arrow keys to size the application's window and press enter when you are done.


View Left Command
2D Graph View|Left Command (2D graph menu)

The View|Left command moves the range 10% to the left:

For example, if your range is:

x min = -5	x max = 5

y min = -5	y max = 5

it becomes:

x min  = -6	x max = 4

y min  = -5	y max = 5


Graph Right Command
2D Graph View|Right Command (2D graph menu)

The View|Right command moves the range 10% to the right:

For example, if your range is:

x min = -5	x max = 5

y min = -5	y max = 5

it becomes:

x min = 4	x max = 5

y min =  -5	y max = 5


View Up Command
2D Graph View|Up Command (2D graph menu)

The View|Up command moves the range 10% up:

For example, if your range is:

x min = -5	x max = 5

y min = -5	y max = 5

it becomes:

x min = -5	x max = 5

y min =  -4	y max = 6


View Down Command
2D Graph View|Down Command (2D graph menu)

The View|Down command moves the range 10% down:

For example, if your range is:

x min = -5	x max = 5

y min = -5	y max = 5

it becomes:

x min = -5	x max = 5

y min =  -6	y max = 4


View Default Command
2D Graph View|Default Command (2D graph menu)

The View|Default command sets the range to:

x min = -2	x max = 2

y min = -2	y max = 2


View Undo Command
2D Graph View|Undo Command (2D graph menu)

The View|Undo command un-does the last range change.  This feature is useful when you accidentally change the range values to something which you didn't intend, and you would like the values to be as they were before you made the mistake.


View Toolbar Command
2D Graph View|Toolbar Command (2D graph menu)

The View|Toolbar command toggles the Toolbar on and off..


3D Graph
3D Graph  (See 3D Graph Menus Also)

The 3D graph tool is used to generate three dimensional Cartesian plots of functions with two variable.

When you define a two dimensional function with the name "graph3d" the 3D graph tool is displayed with a plot of the function you defined.

Example,  if you type in main editor the following:

graph3d[x, y] = cos[x] sin[y]

The 3D graph tool will displayed a plot of the cosine function multiplied by the sine function.


3D Graph Menu Commands

Graph

View Point

Colors

Options

Print

Print Setup

Stop

Repaint

Copy

Close

View

Zoom In

Zoom Out

Square

Min/Max

Move

Resize

Default

Undo

Status Bar

Toolbar


Graph View Point Command
3D Graph Graph|View Point Command (3D graph menu)

The Graph|View command displays the 3D graph View Point dialog box which allows you to change, the rotation of the 3D graph.


3D View Point Dialog Box
3D View Point Dialog Box (3D graph menu)

The View Point Dialog box is used to set the point of view of  the 3D Graph.  Pressing the <<, <, >, >> buttons will cause the cube (and position of the graph) to be rotated about the axis of the button you pressed.   The << and >> buttons do larger rotations than the < and > buttons.  Notice that the X, Y and Z axises are color coded Red, Green and Blue respectfully.  The Cancel button will ignore all changes and the OK button  will accept them.  The Default button will set the view point to a reasonable position.

You can use the keyboard to press the buttons by selecting the key you wish to select by pressing the Tab or Shift Tab keys to select which button you wish to have pressed (selected button will be black).  Pressing the space bar will press the selected button.   Pressing the X, Y, or Z, key, on the keyboard, will cause the button with that letter on it be selected and pressed once.


Graph Colors Command
3D Graph Graph|Colors Command (3D graph menu)

The Graph|Colors command displays the 3D graph's color dialog box which allows you to change the line color, background color, grid color, etc...


3D View Point Dialog Box
3D Color Dialog Box (Alt O L from 3D graph)

The 3D graph Colors Dialog Box is used to change the color of the various items found in a 3D graph.   Visible or white light is made up of different amounts of red, green, and blue light.   Every color in the rainbows is a combination of these three colors.  To change the color of the a given item, select the item whose color you wish to change in the combo box at the top of dialog box.  Then enter the amount of red, green, and blue you would like that color to have by either entering the a value between 0 - 255 in each edit box or by using the scroll bars to vary the amounts.  Have fun experimenting with different colors, if you mess up the colors the Default button  will reset the color values to something reasonable.  Pressing the OK button will accept all changes.  Pressing the Cancel button will ignore all changes.

Different computer setups will have different capacities to display color.  In simpler systems which don't have all the shades of color supported by Windows, the closest color is chosen.


Graph Options Command
3D Graph Graph|Options Point Command (3D graph menu)

The Graph|Options command displays the 3D graph Options dialog box which allows you to change, the range, scale size, drawing options, etc.


3D Graph Color Dialog Box
3D Graph Options Dialog Box (Alt G O from 3D Graph)

Options

Range

Grid

Draw settings

Tessellations

Font

The Default button  will reset the options to reasonable settings to allow you to experiment without worrying about messing up the 3D graph.  Pressing the OK button will accept all changes made in the dialog box.  Pressing the Cancel button will ignore all changes.


Range (3D Graph Options Dialog box)

The X Min (Alt X) and X Max (Alt X Tab)  edit boxes  set the minimum and maximum X values for the 3D Graph range.  Likewise, Y Min (Alt Y),  Y Max (Alt Y Tab) ,  Z Min (Alt Z) and Z Max (Alt Z Tab).set the minimum and maximum values  for Y and Z.


Grid (3D Graph Options Dialog box)

If Grid is checked (Alt G toggles) a dashed grid will be displayed on the 3D graph.  There are two ways for grid lines to be drawn Dynamic (Alt D) and Static (Alt S).  The color of the grid lines is specified in the 3D Color dialog box.

In the Dynamic mode the X scale (Alt C), Y scale (Alt L) and Z scale (Alt E) values are used to determine how many grid lines are drawn on the graph.  Grid lines are drawn at multiples of the X scale, Y scale, and Z scale values.  The number of grid lines will vary.   This mode is useful if you would like grid lines to always cross the same points regardless of the range.

In the Static mode, the X Unit (Alt U)  Y Unit (Alt N) and Z Unit (Alt T) values are used to determine where to put the grid lines.   The X Unit, Y Unit and Z Unit represent the number of grid lines in X, Y and Z respectfully.  This mode is useful when you are changing the range a lot.

If the space between grid lines is less than 3 pixels, the grid lines will not be displayed.  This is to prevent the computer from wasting time by drawing a ton of useless grid lines.


Draw Settings (3D Graph Options Dialog box)

Painted

Numbers

Axis

Show Cube

Tabula

Font


Painted (3D Graph Options Dialog box)

When the Painted (Alt P toggles) option is turned on, Handy Calc will paint the 3D surface with the colors specified in the 3D Graph Color dialog box.  Three colors are used top color, bottom color and mesh color to draw the surface.  If this option is turned off, the surface will be drawn as a wire frame with hidden lines showing.


Numbers (3D Graph Options Dialog box)

When the Numbers (Alt M toggles) option is turned on, numbers will be placed on the side of the 3D surface plot.  The numbers are placed at the location where the Grid meets the edge of the cube.  Numbers that overlap are not drawn.  You can change the style and size of the font used by pressing the Font button.


Axis (3D Graph Options Dialog box)

If the Axis (Alt A toggles) is turned on, the grid lines which represents X, Y and Z equaling zero, are drawn in the color specified in the 3D Graph Color dialog box.


Show Cube (3D Graph Options Dialog box)

When the Show Cube (Alt S toggles) option is turned on, the 3D surface plot will be displayed inside of a 3D cube.  The 3D cube helps with the 3D illusion and can make the plot easier to visualize.  The color of the cube is specified in the 3D Graph Color dialog box.


Tabula (3D Graph Options Dialog box)

If you have never heard of the word "tabula"  you are not alone.  Its a Latin word which means table or drawing surface.   I am using the word "tabula" to refer to the background portion of the 3D cube.  With the Tabula option turned on, the background portion of the cube is drawn in the color specified in the 3D Graph Color dialog box.


Tesselations (3D Graph Options Dialog box)

The word "tessellate" is how math and computer people say tile.  The 3D surface plot is tessellated with squares (and sometimes triangles when a tessellation is 'twisted').  The X res. (Alt period '.') and Y res. values (Alt R) represent the number of squares in X and Y that there will be on the surface plot.    Small X res. and Y res. values mean quicker plot times; however, since the resolution of the plot is lower, features of the surface could be missed.


Font (3D Graph Options Dialog box)

The 3D Graph Option dialog box's Font button (Alt F) displays a Font Dialog Box which allows you to change the size and font style for the 3D graph numbers.


Font Dialog Box (3D Graph Options Dialog Box)
Font 3D Dialog Box (3D Graph Options Dialog box)

The Font 3D dialog box allows you to change the size and style of the font used with 3D graph numbers.  Use the Face Name List box  to change the font typed used.  The size of the numbers is normally determined by a percent (Alt P) of the grid unit.  However, if the percent means the numbers would be smaller than Min (Alt M) then the size of the numbers will be set to be min;  likewise the number size won't be larger than the Max (Alt A).


Graph Print Command
3D Graph Graph|Print Point Command (3D graph menu)

The Graph|Print command prints the 3D graph on the currently selected printer.


Graph Print Setup Command
3D Graph Graph|Print Setup Point Command (3D graph menu)

The Graph|Print command selects and sets up the printer.

See Ideas for Printing Graphs Also


Graph Stop Command
3D Graph Graph|Stop Point Command (3D graph menu)

The Graph|Stop command stops 3D graph painting.  This feature is meaningless when the 3D graph is finished.

At this time there is no way to continue painting after it has stopped.  You can, however, repaint the graph using the Graph|Repaint command.


Graph Repaint Command
3D Graph Graph|Repaint Command (3D graph menu)

The Graph|Repaint command repaints the 3D graph.  This feature is useful when you had to stop painting the graph and would now like to repaint the graph.


Graph Copy Command
3D Graph Graph|Copy Point Command (3D graph menu)

The Graph|Copy command places a copy of the 3D graph in Windows clipboard.

This command is useful if you wish to put a 3D graph into a word processor file or spreadsheet.


Graph Close Command
3D Graph Graph|Close Point Command (3D graph menu)

The Graph|Close command removes the 3D graph tool from view.  The range and other settings will remain intact.


View Zoom In
3D Graph View|Zoom In Point Command (3D graph menu)

The View|Zoom In command increase, the 3D range by 10%


View Zoom Out Command
3D Graph View|Zoom Out Point Command (3D graph menu)

The View|Zoom Out command decrease, the 3D range by 10%


View Square Command
3D Graph View|Square Command (3D graph menu)

The View|Square command makes the width, height, and depth of the range the same size (the largest of the three).

For example, if your range is:

x min = -2	x max = 2

y min = 0	y max = 2

z:min = -3	z max = 3

The width of the range is 4, the depth is 2, and the height is 6.  Since the height is the largest, the width and depth of the range would be changed to equal 6 by setting the range to:

x min = -2	x max = 3

y min = -2	y max = 4

z:min = -3	z max = 3

This feature is useful when you would like to see a function without distortion from a non-square range.  To do this first make the 3D graph Window look square on your monitor by resizing it, then use the View|Square command.


View Min/Max Command
3D Graph View|Min/Max Command (3D graph menu)

The Graph|View command changes the Z min and Z max values in the range to reflect the lowest and highest points of the function.

Example:

If you type in the main editor

graph3d[x, y] = cos[x]

The 3D graph tool. will be displayed with a surface that is the cosine function in x and constant in y.  Using the Default Command will set the range to:

x min  = -4	x max  = 4

y min = -4	y max  =  4

z min  = -4	z max  = 4

Now using the Min/Max command the range is set to

x min  = -4	x max  = 4

y min = -4	y max  =  4

z min  = -0.99829478	z max  = 1

The z min and z max values are changed since the maximum and minimum values for the cosine function in the range of -4 > x < 4 are  z min  = -1 and z max = 1.

The min and max values are determined with an 'approximate' technique and will not necessarily find the true min and max values for a function.   The manual technique, from calculus, of finding the points in the range where the first derivative (with respect to x and y) is equal to zero, is better if accuracy is required.

Zooming into the critical points can improve the accuracy of the min/max feature.


View Move Command
3D Graph View|Move Command (3D graph menu)

The View|Move command displays the 3D graph move dialog box which allows you to move the 3D range in the x, y and z direction.


3D Move Dialog Box
3D Graph Move Dialog Box (Alt V V from 3D Graph)

The  Move dialog box is an attempt to make moving the 3D graph range easier.   It is not necessary, so if you can't figure it out don't worry about it.   The idea is that the range is moved by a factor you specify:

If the X (Alt X) move factor is 0.2, and the Y (Alt Y), Z (Alt Z) move factors are 0 and the range is:

x min  = -4	x max  = 4

y min = -4	y max  = 4

z min  = -4	z max  = 4

Pressing the OK button will move the X part of the range by 0.2 like:

x min  = -2.6	x max  = 5.6

y min = -4	y max  = 4

z min  = -4	z max  = 4

That is if the graph length in X was 4 - (-4) = 8 and 8 * 0.2 = 1.6.  x min = -4 + 1.6 = -2.6 and x max = 4 + 1.6 = 5.6.   The range was shifted 20 percent in the positive X direction.  If the move factor is negative the shift will be in the negative direction.


View Resize Command
3D Graph View|Resize Point Command (3D graph menu)

The View|Resize command displays the 3D graph resize dialog box which allows you to resize the 3D range in the x, y and z direction


3D Resize Dialog Box
3D Graph Resize Dialog Box (Alt V R from 3D Graph)

The Resize dialog box is an attempt to make resizing the 3D graph range easier.   It is not necessary, so if you can't figure it out don't worry about it.   The idea is that the range is resized by a factor you specify:

If the Z (Alt X) resize factor is 2, and the X (Alt X), Y (Alt Y) resize factors are 1 and the range is:

x min  = -4	x max  = 4

y min = -4	y max  = 4

z min  = -4	z max  = 4

Pressing the OK button will resize the Z part of the range by 2 like:

x min  = -8	x max  = 8

y min = -4	y max  = 4

z min  = -4	z max  = 4

That is the graph length in Z , 4 - (-4) = 8,  was doubled 8 * 2 = 16, new range length = 8 - (--8) = 16.    If the move factor was 0.5, the range length in the Z direction would have been cut in half.   The minimum and maximum values of the range will always be changed by the same amount, so the range will remain centered about the same point after resizing.   Notice that setting a resize factor to 1 will leave its dimension unchanged.


View Default Command
3D Graph View|Defaults Point Command (3D graph menu)

The View|Defaults command sets the 3D range to:

x min = -2	x max = 2

y min = -2	y max = 2

z min = -2	z max = 2

This feature is intended to help you when you are first learning Handy Calc.  If you mess up the range pressing the default feature will reset the range to something normal.


View Undo Command
3D Graph View|Undo Point Command (3D graph menu)

The View|Undo command un-does the last 3D range change.  This feature is useful when you accidentally change the range values to something which you didn't intend and you would like the values to be as they were before you made the mistake.


View Dead
3D Graph Graph|Toolbar Point Command (3D graph menu)

The Graph|Toolbar command toggles the Toolbar on and off..


Tips and Tricks

Using the Mouse to do 2D Graph Zooms

Problems with Floating Point Number

Changing the Name of DEFAULT.CLC

Quickly returning to Main Editor from Graph Tools

Ideas for Printing Graphs

Dumping Function or Variable Definitions to the Main Editor


Dumping Funciton or Variable Definitions to the Main Editor
Dumping Function or Variable Definitions to the Main Editor

Sometimes it is nice to dump all variable and/or function definitions into the main editor.  Typing 'funcs' or 'vars' into the main editor and pressing return will do just that.

example:

a = 1/2  »  0.5

b = 2  »  2

vars

b = 2

ans = 2

a = 0.5


Ideas for Printing Graphs

Handy Calc supports full color printing of  2D graphs and 3D graphs.   If you only have a mono printer (Black and White) graphs will be printed in a different shade of gray for each color.    When printing 2D graphs on a mono printer I recommend that you use the default color settings.   For mono 3D printing I recommend that you use the default color settings with the exception of the top and background colors set to white (Red = 255, Green = 255, Blue = 255) and the bottom color to set to a light gray (128, 128, 128).  Light colors are often approximated with white (no color on printers).  This is often the case with the default setting of light gray for the grid lines.  If you wish to see the grid lines in a mono printout you will need to darken the grid line color.

On slower computers systems it can take several minutes for the graphs to be sent to the printer, please be patient.


Quickly returning to Main Editor from graph tools

If you have either the 2D graph or 3D graph tool in the foreground you can return to the main editor by holding down the Alt key and tapping the Tab key.   This will cause a small dialog box. to be displayed with the name and icon of one of the currently opened programs.  Without releasing the Alt key continue tapping the Tab key until the icon for Handy Calc is displayed, then release the Alt key.   Shift Tab can be used to move through the list of the opened program in reverse order.

This trick is a feature of Windows and not specific to Handy Calc.  It can be used to quickly get from one program to another anywhere in Windows.


Changing the Name of DEFAULT.CLC

Handy Calc will automatically load the calculator file called DEFAULT.CLC when it is executed.   If DEFAULT.CLC does not exist, it will be created.   If you put a name of a calculator file as a command line option for HANDY.EXE that file will be used instead.

If you are using the Windows 3.1 Program Manager, you can change the name of the default calculator file to SAMPLE.CLC by:

1) Select the Program Manager icon for Handy Calc by single clicking

2) Display the Properties Dialog Box by Typing Alt F P.

3) Type Alt C to Select the Command Line edit box

4) At the end of that line append SAMPLE.CLC

If you are using a different program to launch program's for Windows (like Desktop or Dash Board) you will have to look at their documentation for instructions on command line options.

This feature is nice because it allows you to have different icons for each Calculator file.


Problens with floating point number
Problem With Floating Point Numbers

Handy Calc uses double precision floating point numbers (64 bits) which can cause problems.

Floating point numbers are simulations of the numbers mathematicians call "real" numbers.  The problem is that real numbers often require an infinite amount of space to represent them perfectly. If you wish to represent 1/3 as a decimal number you would get:

1/3 = 0.333333333333...

The computer calculates 1/3 as precise as it can and still be able to store it in 8 bytes of RAM.  Normally this small amount of error is not a problem; however, it can be in very unusual cases.   If this small error becomes multiplied by a large number it can become significant and unexpected results could occur, example:

(1-1/3) a  -  2/3 a

Basic algebra tells you that  1 - 1/3 = 2/3 and 2/3a - 2/3a is zero regardless of the value of 'a'.  However, this is not the case with floating point numbers notice:

func[a] = (1 - 1/3) a  - 2/3 a

func[1]  »  1.110223024625157e-16

func[100]  »  1.4210854715202e-14

func[1e11]  »  7.62939453125e-06

func[1e20]  »  8192

For small values of 'a' the error is not bad.   Only when the value of 'a' becomes large does the problem with floating point numbers become significant.

For most calculations floating point numbers are not going to be a problem since the results are far more accurate than you will require.  Do, however,  watch out for very small numbers being multiplied by very large numbers or calculations which use a calculated value many times (like recursive functions or numerically solving differential equations).


Register Handy Calc Shareware
Registering Handy Calc Shareware

Yes, this is shareware.  I wish I didn't have to ask for money but writing Handy Calc was a lot of work.   I had to design, write, test, and document over 20,000 lines of C++ Windows Code.  More importantly, I want to buy a computer.   OK, this might not seem like a big deal to you, but borrowing a 25mhz 386 for 6 months to write Handy Calc has the owner (thanks mom) questioning her altruism and me tired of slow compiles.  This isn't a totally selfish request.  A new computer would mean I could continue to make Handy Calc even better!   Then you could do more stuff with it like OLE, matrix operations, programming, and whatever else I (or you) can think of!   I am  not asking you to flip the bill for the entire computer just a reasonable contribution.   If you like Handy Calc and find it a useful tool I would be grateful if you could send $24 USA to:

Christopher Allison

 2414 S. Fruitland

 Kennewick WA 99337

I will send you a registration password which will be valid for Handy Calc v1.0 and any bug fix releases (v1.x) of the product.   I will also give you my Internet e-mail address so you can ask me questions if you have a problem.

For an additional $5 (subject to change) I will send you a disk (3 1/2 or 5 1/4 DOS)  with the latest version of Handy Calc on it.

Ordering registration password constitutes the acceptance of the terms and conditions of the contract included with Handy Calc v1.0.  A copy of the contract can can be seen in the CONTRACT.TXT file distributed with Handy Calc v1.0 or by selecting the contract hypertext link above.

If you have a printer, Handy Calc can print-out an order form (not required).  To use this feature use the Help|Registration command (Alt H R, from the main editor) which brings up the Register dialog box and select the Order button.

Thank you,

Chris Allison,

Computer Programmer


Windows C++ Code

"C++" is the name of the computer language that I used to write Handy Calc.  After I decided what I wanted Handy Calc to do,  I  'explained' it to the computer using C++.  Computer languages are  very  unforgiving  languages.  Little mistakes like a misplaced comma can cause the computer to behave very differently than expected.  This means computer programs need to be tested many different ways to make sure they work well.

The fact that Handy Calc was written for Window's complicated things.  This is because it is not always clear how to make Windows do what you want it to.  This can mean hour of experimenting and/or looking through reference manuals to do very 'simple' things.

The following is an example of what C++ looks like.  It is a simplified  version of part of Handy Calc's code called a tokenizer.  It is the first step in the long 'digestion' process Handy Calc uses to evaluate expressions.

toks.Clear();

// Push all the tokens onto the token queue.

while(cmdstr[pos] != '\0')

{

char ch = cmdstr[pos];

if( (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z') || ch == '_' )

{

int ndx = 0;

while((ch >= 'A' &&  ch <= 'Z') || (ch >= 'a' && ch <= 'z')	|| ch == '_'  || (ch >= '0' &&  ch <= '9') )

{

if(ndx > MAXLABELSIZE)

throw(Error(LONGLABEL, pos));

label[ndx++] = ch;

ch = cmdstr[++pos];

}

label[ndx] = 0;

token.label = label;

token.type = LABEL;

}

else

{

switch (ch)

{

case '(':

token.type = LPARAN;

break;

case ')':

token.type = RPARAN;

case '+':

token.type = ADD;

break;

case '-':

token.type = SUB;

break;

default:

throw(Error(BADSYM, pos, &ch));

}

pos++;

}

toks.Add(token);

} // end of tokenizing


Compile
Slow Compiles

I wrote Handy Calc using C++ .  This approach to software development requires that I  convert the C++ instructions into a more primitive language called machine language.   This conversion is called compiling.  I did not have access to a fast computer so compiling could sometimes take over an hour.  Faster computers are able to compile Handy Calc in a few minutes.  Slow compiles wouldn't be bad if I only had to compile once, but writing computer programs requires many compiles every day.


Programming
Handy Calc Programming

Currently Handy Calc is able to do simple function assignments like

Function[a, b] = 1/a + cos[b] + c

but I would like to add the capability to do more complicated functions maybe something like:

Average[n] =

{

Average = 0;

k = 0;

top:

"Number "  <k>  " = " num = ?;

Average = Average + num;

k = k + 1;

if(k < n) goto top;

Average = Average / n;

}

When Average[] is evaluated by Handy Calc, you would be prompted to enter a list of numbers and then Handy Calc would return the average like:

f[3]

Number 0 = 3

Number 1 = 2

Number 2 = 4

3

I am still tinkering with the idea.  Of course, I will only be able to do this fairly complicated improvement if there is good support for Handy Calc.


Matrix
Matrix Operations

In future releases, I would like to add matrix support to Handy Calc.  I am not sure on the syntax yet but it might look something like this.

m = {{1, 2, 3}, {1,2, 3}}

m + 1 » {{2, 3, 4}, {2,3, 4}}

I would like to have a spreadsheet like matrix editor as well.


Ray-Traced surface plots

Ray-tracing is a technique for making "photo realistic" 3D images.   You have probably seen tons of ray-traced images on TV and the movies already.   The technique works by determining how the light would "bounce" off an image if it were real.   It can create images which have shadows, glossy surfaces, and dramatic lighting.


OLE

OLE is a Microsoft's acronym which stands for Object Linking and Embedding (yes, people pronounce it like the bull fighter call) .   It is a slightly overrated feature but it is nice.   It's basically an extension of the clipboard.   The main differences is that when you paste something from one application to another clicking on the pasted object will return you to the application that created it with the object loaded.

I  wanted to release Handy Calc v1.0 with OLE but I decided it would be better to wait until a future release.    The plan would be if you paste a 2D or 3D graph into another application like a word processor (which you can do now) you could quickly get back to Handy Calc with that graph loaded by double clicking on the graph (that's the OLE part).


You Can Help
You can Help!!

I am sure that there are many things I could do to improve Handy Calc which I haven't thought of.   If you have any ideas which you think could improve Handy Calc, I would love to hear them.    The ideas can be as complicated as a request for animated ray-traced surface plots with fuzzy bump mapping or as simple as a spelling correction.  I won't be able to do everything but, each idea you send in is a vote for how you think future versions of Handy Calc should work.


Order
Order (Register Dialog Box)

The Order Dialog box.  Is intended to make ordering a registration password easier.   Type your name and address into the appropriate spaces and press the OK button to print.  Mail the printout with $24 USA to:

Christopher Allison

2414 S. Fruitland

Kennewick WA 99337

If you don't have a printer you can just mail your name, address, and a request for Handy Calc v1.0 registration password, with the money.


Contract
Contract (Register Dialog Box)

Christopher Allison ("Licensor") is willing to license Handy Calc v1.0 to you on a non-exclusive basis for your own use, subject to the terms and conditions of this agreement.

You may use Handy Calc v1.0 for a limited period of no more than 30 days from the date of first use.  To continue use beyond 30 days  requires a registration fee of 24 US dollars.  Upon registration the licensor will issue a registration password which shall not be used by any person or entity other than you, the customer.  Your registration password shall only be used on one computer at any give time.

You may only distribute copies of Handy Calc v1.0 and its documentation in its original unaltered form.   You may not charge a fee for Handy Calc v1.0 without the consent of the licensor (please, inquire with licensor if would like to charge a distribution fee).

Licensor disclaims all other warranties either express or implied including but not limited to implied warranties of merchantability, fitness for a particular purpose and any warranty of non-infringement with respect to the software and the accompanying documentation.

In no event will licensor be liable to you for damages, including any loss of profits , lost savings, or other incidental or consequential damages arising out of your use or inability to use Handy Calc.


Windows Keys

Cursor Movement Keys

Dialog Box Keys

Editing Keys

Menu Keys

System Keys

Text Selection Keys

Window Keys


Cursor Movement Keys

Key(s)	Function

Arrow key	Moves the cursor left, right, up, or down in a field.

End or Ctrl+Right Arrow	Moves to the end of a field.

Home or Ctrl+Left Arrow	Moves to the beginning of a field.

Pape Up or Page Down	Moves up or down in a field, one screen at a time.


Dialog Box Keys

Key(s)	Function

Tab	Moves from field to field (left to right and top to bottom).

Shift+Tab	Moves from field to field in reverse order.

Alt+letter	Moves to the option or group whose underlined letter matches the one you type.

Arrow key	Moves from option to option within a group of options.

Enter	Executes a command button.

Or, chooses the selected item in a list box and executes the command.

Esc	Closes a dialog box without completing the command. (Same as Cancel)

Alt+Down Arrow	Opens a drop-down list box.

Alt+Up or Down Arrow	Selects item in a drop-down list box.

Spacebar	Cancels a selection in a list box.

Selects or clears a check box.

Ctrl+Slash	Selects all the items in a list box.

Ctrl+Backslash	Cancels all selections except the current selection.

Shift+ Arrow key	Extends selection in a text box.

Shift+ Home	Extends selection to first character in a text box.

Shift+ End	Extends selection to last character in a text box


Editing Keys

Key(s)	Function

Backspace	Deletes the character to the left of the cursor.

Or, deletes selected text.

Delete	Deletes the character to the right of the cursor.

Or, deletes selected text.


Help Keys

Key(s)	Function

F1	Gets Help and displays the Help Index for the application. If the Help window is already open, pressing F1 displays the "Using Windows Help" topics.

In some Windows applications, pressing F1 displays a Help topic on the selected command, dialog box option, or system message.

Shift+F1	Changes the pointer to [image] so you can get Help on a specific command, screen region, or key. You can then choose a command, click the screen region, or press a key or key combination you want to know more about.

(This feature is not available in all Windows applications.)


Menu Keys

Key(s)	Function

Alt	Selects the first menu on the menu bar.

Letter key	Chooses the menu, or menu item, whose underlined letter matches the one you type, when a menu has focus.

Alt+Letter key	Pulls down the menu whose underlined letter matches the one you type.

Left or Right Arrow	Moves among menus of the main menu bar.

Up or Down Arrow	Moves among menu items within a drop-down menu.

Enter	Chooses the selected menu item.


System Keys

The following keys can be used from any window, regardless of the application you are using.

Key(s)	Function

Ctrl+Esc	Switches to the Task List.

Alt+Esc	Switches to the next application window or minimized icon, including full-screen programs.

Alt+Tab	Switches to the next application window, restoring applications that are running as icons.

Alt+PrtSc	Copies the entire screen to Clipboard.

Ctrl+F4	Closes the active window.


Text Selection Keys

Key(s)	Function

Shift+Left or Right Arrow	Selects text one character at a time to the left or right.

Shift+Down or Up	Selects one line of text up or down.

Shift+End	Selects text to the end of the line.

Shift+Home	Selects text to the beginning of the line.

Shift+Page Down	Selects text down one window.

Or, cancels the selection if the next window is already selected.

Shift+Page Up	Selects text up one window.

Or, cancels the selection if the previous window is already selected.

Ctrl+Shift+Left or Right Arrow	Selects text to the next or previous word.

Ctrl+Shift+Up or Down Arrow	Selects text to the beginning (Up Arrow) or end (Down Arrow) of the paragraph.

Ctrl+Shift+End	Selects text to the end of the document.

Ctrl+Shift+Home	Selects text to the beginning of the document.


Window Keys

Key(s)	Function

Alt+Spacebar	Opens the Control menu for an application window.

Alt+Hyphen	Opens the Control menu for a document window.

Alt+F4	Closes a window.

Alt+Esc	Switches to the next application window or minimized icon, including full-screen programs.

Alt+Tab	Switches to the next application window, restoring applications that are running as icons.

Alt+Enter	Switches a non-Windows application between running in a window and running full screen.

Arrow key	Moves a window when you have chosen Move from the Control menu.

Or, changes the size of a window when you have chosen Size from the Control menu.