********************************** * DIV Calculator for Pocket PC * ********************************** (This readme file is best viewed with a fixed font like Courier New) THIS PROGRAM IS LICENSED FREE OF CHARGE. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. THE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. Version 1.2 (Build 1.2.0.12) Supported OS: Windows CE 3.0 (Pocket PC) Supported Platforms: MIPS, ARM License: Freeware Developed by Dirk Verheyden (den.dirk.verheyden@belgacom.net) Contents ======== 1. Short Description 2. Installation 3. Known Issues 4. Troubleshooting 5. Version History 6. Future Releases 7. Manual 1. Short Description ==================== DIV Calculator is a EURO Converter and an easy to use scientific calculator. It 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 (see section 7 for more information and examples). 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. The EURO Converter allows the user to convert values between all currencies involved in the EURO and one extra user-defined currency. The scientific calculator supports most common operations: Square root (Sqrt), Square (x^2), Power (x^y), Exponentiation (e^x), Logarithms (ln, log), Percent (%) and Percent Change (%ch), Pi, Inversion (1/x) and Modulo (Mod). Binary calculus is also included (conversion between decimal, hexadecimal, octal and binary) (especially useful for developers). Other conversions: Temperatures (°C, °F), Weights (kg, ounce, pound), Distances (m, inch, foot, mile) and many more. See section 7 for an exhaustive list. Mathematical operations can be performed on these values. For example, when multiplying a distance with an area, the result is a volume. 2. Installation =============== The setup program (DIVCalculatorSetupMips.exe or DIVCalculatorSetupArm.exe) can be run from any Windows platform (9x, Me, NT, 2000). The setup program will first install the Pocket PC CAB files onto the desktop computer. It then launches Microsoft ActiveSync to install DIV Calculator on the Pocket PC. The setup program sets the custom currency to US Dollar with an exchange rate of 0.9 (1 EURO = 0.9 USD). 3. Known Issues =============== 1. When multiplying high numbers, the result may be wrong (currently there is no overflow check). 2. The value added to the stack when tapping the [c] button (= speed of light) is wrong if for the Speeds type the selected sub-type is [d]/[t] (see 7.3.4.10). 4. Troubleshooting ================== - Only the MIPS and ARM CPUs are supported (like the Casio Cassiopeia and the Compaq iPaq). - The setup program does not include the mfcce300.dll file. Most Pocket PC manufacturers deliver this file in the ROM of the PDA. If after installation you are not able to start DIV Calculator, verify that mfcce300.dll is located in the \Windows directory of your Pocket PC. If not, please download this file from http://www.appstudio.com/mfc.htm. 5. Version History ================== 5.1 Changes to Version 1.1 -------------------------- Added a menu and an About dialog. Added the functionality to perform operations on different types of values. For example, when multiplying a distance with an area, the result is a volume. 5.2 Changes to Version 1.0 -------------------------- Added a user-defined custom currency. Save settings (stack content, selected type and sub-type) when exiting the program. Added volumes, times and speeds. 5.3 Version 1.0 --------------- DIV Calculator is developed using eMbedded Visual C++ 3.0. Implemented the scientific calculator and the binary calculus. Implemented the EURO Converter. And implemented the conversions for temperatures, weights, distances and areas. 6. Future Releases ================== Extra functionality planned for future releases: - The user can define any number of custom currencies, temperatures, weights, distances, areas, volumes, times and speeds - Check for overflow and underflow when doing calculations - Help (not just this readme) - Fancy GUI - Ability to scroll the stack - ... 7. Manual ========= 7.1 Contents ------------ Section 7.2 (Performing Calculations) explains how the calculator works. Section 7.3 (Reference Guide) gives an exhaustive list of all buttons and all supported functionality. 7.2 Performing Calculations --------------------------- 7.2.1 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]. 7.2.2 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. 7.2.3 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). 7.3 Reference Guide ------------------- 7.3.1 Screen Layout ------------------- The DIV Calculator screen exists of four areas: +-----------------------+ | | | 1 | | | | | +-----------------------+ | | +-----------+ 2 | | | | | +-----------+ | | | | | | | 3 | 4 | | | | | | | | | | +-----------+-----------+ 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) (see 7.3.2). The middle area (2) contains stack manipulation buttons (like Edit, Swap and Enter) (see 7.3.3). 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 (see 7.3.4). The bottom right area (4) contains the familiar calculator buttons (see 7.3.5). 7.3.2 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. 7.3.3 Screen Area 2: The Stack Manipulation Buttons --------------------------------------------------- This section describes the following buttons: 1. Edit 2. Swap 3. Drop 4. Clear 5. Dup2 6. <- (Backspace) 7. Last 8. Roll 9. Enter 7.3.3.1 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. 7.3.3.2 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. 7.3.3.3 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. 7.3.3.4 Clear ------------- Removes all values from the stack. 7.3.3.5 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. 7.3.3.6 <- (Backspace) ---------------------- Deletes a character in the edit line (works like the backspace button on any computer). 7.3.3.7 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. 7.3.3.8 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. 7.3.3.9 Enter ------------- Adds the content of the edit line to the stack. If the edit line is empty, the value on line 1 is duplicated. 7.3.4 Screen Area 3: Buttons Specific to the Selected Type ---------------------------------------------------------- The displayed content depends on the selected type. Available types: 1. General 2. Binaries 3. Currencies 4. Temperatures 5. Weights 6. Distances 7. Areas 8. Volumes 9. Times 10. Speeds 7.3.4.1 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. 7.3.4.1.1 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) 7.3.4.1.2 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. 7.3.4.1.3 x^2 ------------- Calculates the square of the value on line 1. 7.3.4.1.4 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] 7.3.4.1.5 % ----------- Calculates [line 2] * [line 1]%. 7.3.4.1.6 e^x ------------- Calculates e^[line 1] (with e = 2.71828182845905). 7.3.4.1.7 Ln ------------ Calculates the natural logarithm of the value on line 1. 7.3.4.1.8 Log ------------- Calculates the logarithm in base 10 of the value on line 1. 7.3.4.1.9 %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. 7.3.4.1.10 Pi ------------- Adds the number Pi (3.14159265358979) to the stack. 7.3.4.1.11 1/x -------------- Inverts the number on line 1. 7.3.4.1.12 Mod -------------- Calculates the reminder after dividing [line 2] by [line 1]. Example: 12 Mod 5 gives 2. 7.3.4.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. 7.3.4.2.1 The Binary Sub-types combo box ---------------------------------------- This combo box contains all supported sub-types: 1. Decimal (Dec) (0-9) 2. Hexadecimal (Hex) (0-9, A-F) 3. Octal (Oct) (0-7) 4. Binary (Bin) (0-1) Changing the selected sub-type will convert all binary values on the stack to the selected sub-type. 7.3.4.2.2 # ----------- 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] 7.3.4.2.3 A - F --------------- Use these buttons to enter hexadecimal values. 7.3.4.2.4 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. 7.3.4.2.4 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. 7.3.4.2.4 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. 7.3.4.3 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. 7.3.4.3.1 The Currency Sub-types combo box ------------------------------------------ This combo box contains the following currencies: 1. EURO (the base currency) 2. USD (or another user-defined currency) 3. BEF (Belgian Franc) (same as LUF - Luxembourg Franc) 4. ATS (Austrian Schilling) 5. DEM (German Mark) 6. ESP (Spanish Peseta) 7. FIM (Finnish Mark) 8. FRF (French Franc) 9. GRD (Greek Drachma) 10. IEP (Irish Pound) 11. ITL (Italian Lira) 12. NLG (Dutch Guilder) 13. PTE (Portuguese Escudo) 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)". 7.3.4.3.2 $ ----------- 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] 7.3.4.3.3 %ch ------------- See 7.3.4.1.9. 7.3.4.3.2 ... ------------- This allows the user to modify the user-defined currency. Selecting Options from the Tools menu is another way to do this. 7.3.4.4 Temperatures -------------------- This type allows us to convert temperatures. When this type is selected, one extra dropdown combo box and 2 buttons are displayed. 7.3.4.4.1 The Temperature Sub-types combo box --------------------------------------------- This combo box contains: 1. Celsius (°C) 2. Fahrenheit (°F) 3. Kelvin (°K) Changing the selected sub-type will display all temperatures on the stack in the selected sub-type. 7.3.4.4.2 ° ----------- Use this button to tell the calculator that the entered value is of type Temperature. 7.3.4.5 Weights --------------- This type allows us to convert weights. When this type is selected, one extra dropdown combo box and 2 buttons are displayed. 7.3.4.5.1 The Weight Sub-types combo box ---------------------------------------- This combo box contains: 1. Kilogram (kg) 2. Gram (g) 3. Ounce (oz) 4. Pound (lb) 5. Ton (t) 6. Short Ton (ton) 7. Long Ton (tonUK) Changing the selected sub-type will display all weights on the stack in the selected sub-type. 7.3.4.5.2 w ----------- Use this button to tell the calculator that the entered value is of type Weight. 7.3.4.6 Distances ----------------- This type allows us to convert distances. When this type is selected, one extra dropdown combo box and 2 buttons are displayed. 7.3.4.6.1 The Distance Sub-types combo box ------------------------------------------ This combo box contains: 1. Meter (m) 2. Centimeter (cm) 3. Kilometer (km) 4. Inch (in) 5. Foot (ft) 6. US Foot (ftUS) 7. Yard (yd) 8. Mile (mi) 9. US Mile (miUS) 10. Nautical Mile (nmi) Changing the selected sub-type will display all distances on the stack in the selected sub-type. 7.3.4.6.2 d ----------- Use this button to tell the calculator that the entered value is of type Distance. 7.3.4.7 Areas ------------- This type allows us to convert areas. When this type is selected, one extra dropdown combo box and 2 buttons are displayed. 7.3.4.7.1 The Area Sub-types combo box -------------------------------------- This combo box contains: 1. Square Meter (m^2) 2. Are (are) 3. Acre (acre) 4. [d]^2 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). 7.3.4.7.2 a ----------- Use this button to tell the calculator that the entered value is of type Area. 7.3.4.8 Volumes --------------- This type allows us to convert volumes. When this type is selected, one extra dropdown combo box and 2 buttons are displayed. 7.3.4.8.1 The Volume Sub-types combo box ---------------------------------------- This combo box contains: 1. Cubic Meter (m^3) 2. Liter (l) 3. US fluid oz (ozUS) 4. UK fluid oz (ozUK) 5. Pint (pt) 6. Quart (qt) 7. US Gallon (gal) 8. Can Gallon (galC) 9. UK Gallon (galUK) 10. Barrel (bbl) 11. [d]^3 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). 7.3.4.8.2 v ----------- Use this button to tell the calculator that the entered value is of type Volume. 7.3.4.9 Times ------------- This type allows us to convert times. When this type is selected, one extra dropdown combo box and 3 buttons are displayed. 7.3.4.9.1 The Time Sub-types combo box -------------------------------------- This combo box contains: 1. Second (s) 2. Minute (mm:ss) 3. Hour (hh:mm:ss) 3. Day (d hh:mm:ss) Changing the selected sub-type will display all times on the stack in the selected sub-type. 7.3.4.9.2 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. 7.3.4.10 Speeds --------------- This type allows us to convert speeds. When this type is selected, one extra dropdown combo box and 3 buttons are displayed. 7.3.4.10.1 The Speed Sub-types combo box ---------------------------------------- This combo box contains: 1. m/s 2. km/h 3. Knot (knot) 4. Mile/h (mi/h) 5. [d]/[t] 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. 7.3.4.10.2 s ------------ Use this button to tell the calculator that the entered value is of type Speed. 7.3.4.10.3 c ------------ This buttons adds the speed of light (in the selected units) to the stack. 7.3.5 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.