DIV Calculator for Pocket PC

Manual

See also the readme.

Contents

Performing Calculations explains how the calculator works.
Reference Guide gives an exhaustive list of all buttons and all supported functionality.

Performing Calculations

Introduction

DIV Calculator uses the so-called Reverse Polish Notation (RPN): Numbers must first be entered on the stack before a mathematical operation can be performed on them. If you never used this method before you might get a little confused in the beginning. Don't worry, after a while you will see the benefits.

Example: Calculate the sum of 3 and 16:

  1. Tap [3] (3 will be displayed in the edit line)
  2. Tap [Enter] (3 will now be added to the stack, it is displayed on line 1)
  3. Tap [1] and tap [6] (16 will be displayed in the edit line)
  4. Tap [Enter] (3 will move from line 1 to line 2 and 16 will be added on line 1)
  5. Finally tap [+] (the result, 19, will be displayed on line 1, the numbers 3 and 16 are gone)

In the above example, step 4 is optional. When tapping on an operation (+ in the above example), the operation will be performed on the value of line 1 and the value in the edit line. If the edit line is empty, the operation will be performed on the values on lines 2 and 1.

Example: Calculate the difference between 27.4 and 6:

  1. Tap [2][7][.][4]
  2. Tap [Enter]
  3. Tap [6]
  4. Tap [-]

As you can see, when doing subtractions, DIV Calculator calculates [line 2] - [line 1].

Mixing Types

In general, mixing types when doing calculations will result in an error message. For example, when multiplying a currency with a distance, a "Bad Argument Type" error message will be displayed. Also, multiplying a currency by another currency gives an error message!
Common sense has been used to make up these rules.

The following calculations are allowed:

  1. Multiplying a value by a value of type General. Example: 10 * 4.50 EURO gives 45.00 EURO. (This does not apply to values of the Binaries type.)
  2. Dividing a value by a value of type General.
  3. Multiplying a distance by a distance gives an area.
  4. Multiplying a distance by an area gives a volume.
  5. Dividing an area by a distance gives a distance.
  6. Dividing a volume by a distance gives an area.
  7. Dividing a volume by an area gives a distance.
  8. Dividing a distance by a time gives a speed.
  9. Multiplying a speed by a time gives a distance.
  10. Dividing a value of type X by another value of the same type X, gives a value of type General.

Changing Types

It is possible to change the type of any value. This will be explained by using an example.
Say the value on line 1 of the stack is 14.8 inch. To change the type to Volume, proceeds as follows:
  1. Tap [Edit] (the value will now be displayed on the edit line as "d14.8" - d stands for distance)
  2. Select Volumes in the types dropdown combo box
  3. Tap [v] (the edit line will change to "v14.8")

Note that the Type button ([v] in the above example) works as a toggle button. In other words, if you tap [v] again, the edit line will display "14.8" - this is a value of type general).

Reference Guide

Screen Layout

The DIV Calculator screen exists of four areas:

The upper area (1) displays a maximum of four values of the stack (the top four values) and the input line (used for entering or editing values).
The middle area (2) contains the stack manipulation buttons.
The bottom left area (3) is different depending on the selected type. If the selected type is different from General, a second dropdown combo box is displayed which contains sub-types for the selected type.
The bottom right area (4) contains the familiar calculator buttons.

Screen Area 1: The Stack and the Input Line

The stack can contain an unlimited number of values (limited to the memory of your PDA). When the stack contains more than four values, only the top four values are displayed in lines 1 to 4.
The input line (below the stack display) is used for entering and editing values.
The stack sometimes displays two values on one line (ex: "3.77 EURO (152 BEF)"). This means that the original value (152 BEF) is displayed using another sub-type (here EURO). The reason for this is twofold: Conversions between certain sub-types introduce rounding errors and (especially for currencies) it is interesting to see both the original value and the converted value.

Screen Area 2: The Stack Manipulation Buttons

This section describes the following buttons:

Edit

To modify the value on line 1 of the stack, tap [Edit]. This will remove the value from the stack and put it in the edit line.
Remark: If line 1 displays two values (ex: "3.77 EURO (152 BEF)"), the converted value (3.77 EURO) will be edited. See Entering Values for more information.

Swap

Swaps the values on lines 1 and 2: The value from line 1 is moved to line 2 and the value from line 2 is moved to line 1.
Remark: If the edit line contains a value, it is first added to the stack before the Swap command is carried out.

Drop

Removes the value from line 1 from the stack.
Remark: If the edit line contains a value, this value will be deleted and not line 1 from the stack.

Clear

Removes all values from the stack.

Dup2

Duplicates the values on lines 1 and 2.
Remark: If the edit line contains a value, it is first added to the stack before the Dup2 command is carried out.

<- (Backspace)

Deletes a character in the edit line (works like the backspace button on any computer).

Last

Recalls the values that participated in the last operation.
Example: When adding 3 (positioned on line 2) to 16 (on line 1), the result 19 is displayed on line 1 while 3 and 16 are removed from the stack. Tapping [Last] puts 3 and 16 back on the stack.

Roll

Rolls an element from the stack to line 1, moving all intermediate values one line up.
Example: If the stack looks like this:

4: 1
3: 2
2: 3
1: 4

If you now tap [3] and then tap [Roll], the stack will look like this:

4: 1
3: 3
2: 4
1: 2

Value 2 moved to line 1 while values 3 and 4 moved one line up.
Remark: If the edit line contains a value, it is first added to the stack before the Roll command is carried out.

Enter

Adds the content of the edit line to the stack.
If the edit line is empty, the value on line 1 is duplicated.

Screen Area 3: Buttons Specific to the Selected Type

The displayed content depends on the selected type.

Available types:

General

This type represents the 'normal' numbers.
When this type is selected, 12 buttons are displayed. These are explained in the next sections.
For most of these buttons, an error message will be displayed when applied to values with a different type than General. For example, when trying to calculate the square root of a currency, an error message will be displayed.
Remark: For all buttons except [Eex], if the edit line contains a value, it is first added to the stack before the command is carried out.

Eex

Use this button to indicate where the exponent of a number starts.
Example: To enter the value 12.4*10^3:
Tap [1][2][.][4][Eex][3] (The edit line will display 12.4e3)

Sqrt

Calculates the square root of the value on line 1.
If the value of line 1 is negative, an error message will be displayed.

x^2

Calculates the square of the value on line 1.

x^y

Calculates [line 2] to the power of [line 1].
Example: To calculate 2^3:
  1. Tap [2]
  2. Tap [Enter]
  3. Tap [3]
  4. Tap [x^y]

%

Calculates [line 2] * [line 1]%.

e^x

Calculates e^[line 1] (with e = 2.71828182845905).

Ln

Calculates the natural logarithm of the value on line 1.

Log

Calculates the logarithm in base 10 of the value on line 1.

%ch

Calculates the difference between line 2 and line 1 expressed in percent.
Example: %ch of 200 (on line 2) and 300 (on line 1) is 50 because 300 is 50 percent more than 200.

Pi

Adds the number Pi (3.14159265358979) to the stack.

1/x

Inverts the number on line 1.

Mod

Calculates the reminder after dividing [line 2] by [line 1].
Example: 12 Mod 5 gives 2.

Binaries

This type is especially useful for developers.
When this type is selected, one extra dropdown combo box and 10 buttons are displayed.
The buttons A to F should only be used for hexadecimal numbers.
The buttons And, Or and Not should only be applied to values of Binary type.
Remark: For And, Or and Not, if the edit line contains a value, it is first added to the stack before the command is carried out.

The Binary Sub-types combo box

This combo box contains all supported sub-types:

Changing the selected sub-type will convert all binary values on the stack to the selected sub-type.

#

Use this button to tell the calculator that the entered value is of type Binary.
The selected sub-type determines how the calculator will interpret the binary value.

Example: To enter an hexadecimal value of 12B5:

  1. Tap [#][1][2][B][5]
  2. Make sure the selected sub-type is Hexadecimal
  3. Tap [Enter]

A - F

Use these buttons to enter hexadecimal values.

And

This performs a bitwise And-operation on [line 2] and [line 1].
Remark: If the edit line contains a value, it is first added to the stack before the And command is carried out.

Or

This performs a bitwise Or-operation on [line 2] and [line 1].
Remark: If the edit line contains a value, it is first added to the stack before the Or command is carried out.

Not

This performs a bitwise Not-operation on [line 1].
Remark: If the edit line contains a value, it is first added to the stack before the Not command is carried out.

Currencies

This type allows us to convert currencies.
It contains all currencies participating in the EURO and one extra user-defined currency. The installation program sets the user-defined currency to US Dollar with a conversion rate of 0.9 (1 EURO = 0.9 USD).
When this type is selected, one extra dropdown combo box and 3 buttons are displayed.

The Currency Sub-types combo box

This combo box contains the following currencies:

Changing the selected sub-type will display all currency values on the stack in the selected sub-type.
For example: If the stack contains the value 12.50 EURO and you select BEF, the stack will display "504 BEF (12.50 EURO)".

$

Use this button to tell the calculator that the entered value is of type Currency.
The selected sub-type determines how the calculator will interpret the currency.

Example: To enter a EURO value of 12.5:

  1. Tap [$][1][2][.][5]
  2. Make sure the selected sub-type is EURO
  3. Tap [Enter]

%ch

See above.

...

This allows the user to modify the user-defined currency.
Selecting Options from the Tools menu is another way to do this.

Temperatures

This type allows us to convert temperatures.
When this type is selected, one extra dropdown combo box and 2 buttons are displayed.

The Temperature Sub-types combo box

This combo box contains: Changing the selected sub-type will display all temperatures on the stack in the selected sub-type.

°

Use this button to tell the calculator that the entered value is of type Temperature.

Weights

This type allows us to convert weights.
When this type is selected, one extra dropdown combo box and 2 buttons are displayed.

The Weight Sub-types combo box

This combo box contains:

Changing the selected sub-type will display all weights on the stack in the selected sub-type.

w

Use this button to tell the calculator that the entered value is of type Weight.

Distances

This type allows us to convert distances.
When this type is selected, one extra dropdown combo box and 2 buttons are displayed.

The Distance Sub-types combo box

This combo box contains:

Changing the selected sub-type will display all distances on the stack in the selected sub-type.

d

Use this button to tell the calculator that the entered value is of type Distance.

Areas

This type allows us to convert areas.
When this type is selected, one extra dropdown combo box and 2 buttons are displayed.

The Area Sub-types combo box

This combo box contains:

Changing the selected sub-type will display all areas on the stack in the selected sub-type.

Entry 4 deserves some more explanation. When selecting [d]^2 the areas will be displayed as the square of the selected distance. Example: If the selected distance is foot, the areas displayed on the stack will be displayed in foot^2 (or square foot).

a

Use this button to tell the calculator that the entered value is of type Area.

Volumes

This type allows us to convert volumes.
When this type is selected, one extra dropdown combo box and 2 buttons are displayed.

The Volume Sub-types combo box

This combo box contains:

Changing the selected sub-type will display all volumes on the stack in the selected sub-type.

Entry 11 deserves some more explanation. When selecting [d]^3 the volumes will be displayed as the cube of the selected distance. Example: If the selected distance is foot, the volumes displayed on the stack will be displayed in foot^3 (or cubic foot).

v

Use this button to tell the calculator that the entered value is of type Volume.

Times

This type allows us to convert times.
When this type is selected, one extra dropdown combo box and 3 buttons are displayed.

The Time Sub-types combo box

This combo box contains:

Changing the selected sub-type will display all times on the stack in the selected sub-type.

t

Use this button to tell the calculator that the entered value is of type Time.
There are two ways to enter times. The first one is to just enter something like t24, which will then be interpreted according to the selected sub-type (for example 24 minutes). The second way is to use the [:] button.
Examples: t1:45 equals 1 minute and 45 seconds (independent of the selected sub-type); t45:5:18 equals 45 hours, 5 minutes and 18 seconds.

Speeds

This type allows us to convert speeds.
When this type is selected, one extra dropdown combo box and 3 buttons are displayed.

The Speed Sub-types combo box

This combo box contains:

Changing the selected sub-type will display all speeds on the stack in the selected sub-type.

Entry 5 deserves some more explanation. When selecting [d]/[t] the speeds will be displayed as the division of the selected distance by the selected time. Example: If the selected distance is foot and the selected time is minutes, the speeds displayed on the stack will be displayed in foot/minute.

s

Use this button to tell the calculator that the entered value is of type Speed.

c

This buttons adds the speed of light (in the selected units) to the stack.

Screen Area 4: The Common Calculator Buttons

These buttons work as you would expect them to work.
The [+/-] button changes the sign of the value on the edit line. If there is no value, it will change the sign of the value on line 1 of the stack. Note: Changing the sign is not supported for the Binaries type.