1 R P N C a l c RPN Calculator for the Psion Series 3a Version 1.0 Original Program for the Series 3: Copyright (c) 1992 Jaime Pereira Email: jep@world.std.com Compuserve 70441,456 Address: 312 Southwind Dr. #206 North Palm Beach, FL 33408 USA Ported to the Series 3a by: Victor Alvarado vma@mvuts.att.com ================================================================= This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ================================================================= INTRODUCTION ------------ RPN Calc is a Reverse Polish Notation calculator intended as an alternative to the Psion Series 3a calculator application. It is based on the HP-48 style interface. This initial release contains the following features: + RPN interface + Basic stack manipulations (swap, rotate, clear stack) + 20 element stack, of which the top 10 items are visible + 10 memories + Most math and trigonometry functions 2 This document assumes that the reader is already familiar with RPN. DISTRIBUTION ------------ The following files are in the RPN Calc distribution archive: RPNCALC.OPA RPN Calc application program RPNCALC.TXT This document RPNCALC.OPL Source for RPN Calc RPNCALC.PIC RPN Calc icon COPYING GNU General Public License INSTALLATION INSTRUCTIONS ------------------------- Copy the file RPNCALC.OPA to the "\APP" directory. Install the application in the system screen by pressing Psion-I. When the "Install Application" dialog pops up, select the file RPNCALC.OPA and press enter. RPN Calc will now be installed on your system screen like your other applications. In addition, you can assign the "Calc" button to run RPN Calc using the "Assign button" option of the Apps menu in the system screen. UNINSTALLING RPN CALC --------------------- Remove the RPN Calc application from the system screen by pressing Psion-/. When the "Remove application?" dialog box appears, press the 'Y' key. Lastly, delete the file called RPNCALC.OPA in the "\APP" directory. If you reassigned the "Calc" button to run RPN Calc, you can assign the "Calc" button back to the original Psion calculator application using the "Assign button" option of the Apps menu in the system screen. GETTING STARTED --------------- After starting RPN Calc, you will see a window with two sections. The bottom line of the screen with the flashing cursor is the command line, where you enter the numbers. The area in the middle of the screen is where the stack will be displayed. To place a number in the stack, type the number in the command line and press Enter. If the command line is empty, the Enter key will duplicate the value on top of the stack. While typing in a number, you can use the left and right arrow keys and the delete key to edit the number before pressing Enter. 3 If, for example, you type the following (without spaces): 1 0 2 8 5 0 + The result, 1078, will be displayed in the top of the stack: 1: 1078 As with all RPN calculators, results are calculated when you enter one of the math operator keys + - * / or the keystroke for one of the math functions. The math and trigonometric functions have the same keystrokes as in the Psion calculator application. Press the Help key for a complete list of the functions. If there is a number in the edit box, all operations consider it the top of the stack. Otherwise, it is the number in the top level of the stack, identified with a "1:". Notice that the top of the stack is displayed at the bottom of the screen and the stack grows upward. This is similar to the HP-48's display. To begin a new calculation, just start typing the new numbers. Any old results are just pushed up the stack. The Delete key deletes the top item in the stack. Note: The diamond key, Control-Menu, and Psion-Z (zoom) keys are not used in RPN Calc. THE STACK DISPLAY ----------------- Each number you enter, and the results of calculations, are pushed up the stack. Up to 20 lines can be kept in the stack, although the screen only displays the top items in the stack. If the command line is blank, you can scroll through the stack using the up-arrow and down-arrow keys. The up and down arrow keys also allow you to bring any of the values in the stack down to the edit box to be reused in a new calculation. You can clear the stack with the 'New stack' option in the 'Special' menu. TRIGONOMETRIC FUNCTIONS ----------------------- The trigonometric functions can work either with degrees or radians. Initially, they work with degrees. Use the 'Format' option in the 'Options' menu to change to radians. For the value of the constant 'pi', just type the character 'P'. For example: 4 P 2 / Psion-S gives 1 (when using radians). CALCULATOR MEMORIES ------------------- RPN Calc has 10 memories, identified by the numbers 1 to 10. They are used in a similar way as the Sto and Rcl buttons on some HP calculators. For example, to store the top of the stack in memory 4, press 4 followed by the 'I' key. Similarly to recall a value stored in a memory press the memory number followed by the 'O' key. The number will appear in the top of the stack. All memories have an initial value of 0. EXPONENTIAL NUMBER FORMAT ------------------------- To enter a very large or very small number, use the character 'e' (upper or lower case) as the exponent in a number. For example: 3 . 1 4 1 5 9 e 3 displays 3141.59 on the top of the stack. DECIMAL PLACES AND NUMBER FORMATS --------------------------------- Calculations are accurate to at least 12 digits. Results are initially shown in 'General' format, showing as many decimal places as necessary, up to the maximum of 15. For example, 1 3 / gives 1.333333333333333, while 1 4 / gives 0.25. Use the 'Format' option in the 'Options' menu to specify the way you want the results of your calculations to be shown. The options in the Format dialog box are as follows: General - as many decimal places are displayed as were calculated. Large or small numbers are shown as exponential numbers, e.g. 1.1E+30. Fixed - results are shown to the number of decimal places you specify on the 'Decimal places' line. The accuracy is still 12 digits, and the results are rounded, if necessary, to ensure that there are the correct number of decimal places. 5 Scientific - Results are always shown as exponential numbers to the number of significant digits - digits either side of the decimal point - you specify on the 'Decimal places' line. The result may be rounded to ensure that this happens. The minimum number of significant digits is 2. APPENDICES TABLE OF BASIC OPERATIONS ------------------------- operation key before after --------------------------------------------------------- dup Enter n n n drop Delete n swap S n1 n2 n2 n1 rot R n1 n2 n3 n2 n3 n1 mem store I mem n mem recall O mem n addition + n1 n2 n2+n1 subtraction - n1 n2 n2-n1 multiplication * n1 n2 n2*n1 division / n1 n2 n2/n1 power x n1 n2 n2^n1 Pi constant P Pi --------------------------------------------------------- CHANGE LOG ---------- Version 1.0 - Initial release of series 3a version. IDEAS FOR FURTHER IMPROVEMENTS ------------------------------ This is a wish-list of features that would be nice to have in future versions of RPN Calc: + Implement more of the calculator application's features: + Access to OPL functions and your own OPL procedures + Zoom-in and Zoom-out with Psion-Z + Ability to invoke math functions from menus + Implement some of these HP48-like features: + Hex and binary display modes + Engineering display format + Complex numbers + Interactive stack + Named variables + Graphing and plotting + Programming language (RPL, or even HP-41) 6 + Other features: + Implementation of "Bring", in order to paste results into other applications. CONTRIBUTORS ------------ Jaime Pereira - Original version of this document, and the original RPN Calc for the Psion Series 3 Victor Alvarado - Modifications for the 3a and additional changes to this document