
                                ITable v7.0
         Function Table Generator for the HP48 S/SX/G/G+/GX calculator
                         written in 95% SysRPL, 5% ML
                            (c) 1996 by Jack Levy

0.0 INDEX
=========

    1.0 Introduction

    2.0 Disclaimer

    3.0 Email-ware

    4.0 Installing the Library
    4.1 Library Information

    5.0 Overview of Program
    5.1 Program Information in Detail

    6.0 Removing the Library
    6.1 Credits


1.0 INTRODUCTION
================

There have been many requests to comp.sys.hp48 as well as personal emailed
requests to me, Eric Rechlin, for a function table generator. None of the 
available programs out there are very good, with the exception of Jack Levy's 
ITABLE command in MathTools. But since MathTools is 7K, and many people
(especially those with basic G's) don't want to spend that much memory on
it, they have to settle for the inferior table generators.

I decided to solve this program by extracting the function table generator 
from MathTools to make into a stand-alone library.  This library is 2.3K and 
is the same library ID as MathTools (1091).


2.0 DISCLAIMER
==============

ITable and its attached documentation are provided "as is", and are 
subject to change without prior notice. The author gives no warranty of any 
kind with regard to the software or documentation, either expressed or 
implied, including, but not limited to, the implied warranties of 
merchantability and fitness for a particular purpose. The author shall not be 
held liable for any damages, including any general, special, incidental, or 
consequential damages arising out of the use or inability to use any or all 
of the included programs.

Use of any part of the ITable library code is not allowed for any purpose, 
except, of course, when used directly from the ITable library. You may not 
reproduce or modify any part of the ITable library code without prior 
written permission from the author.  ITable was extracted from MathTools by 
Eric Rechlin with the permission of Jack Levy.

Permission to copy the ITable library as a whole, unmodified package is 
granted provided that the copies are not made or distributed for resale 
(excepting nominal copying fees).


3.0 EMAIL-WARE
==============

The ITable library is "Email-ware". What does this mean? If you like this 
program and use it regularly, you must send me an email message. (Not too 
steep, huh?) The idea is simple: If I know people are using this library, I 
will be more inclined to update it and write new programs. My internet 
address is levyj@engin.umich.edu.


4.0 INSTALLING THE LIBRARY
==========================

To install ITable in your HP48, follow these steps:

1. Transfer the library to your HP48 using Kermit/Xmodem/etc.
2. Press the soft-key associated with the library file (ITABLE.LIB).
   "Library 1091:  IT..." should now be displayed on level1 of the stack.
3. Purge the ITABLE.LIB variable, leaving the library on the stack.
4. Enter the port number you want to store the library into.
   Note: For S/G users, this number must be 0. For SX/GX users, the library
   can safely be stored in any port. However, for GX users, it is
   recommended that you store it in either port 0 or 1, as execution from
   a covered port is slower.
5. Press STO.
6. Turn the calculator off and then on again.

To access the library, press right-shift-library (2), and then NXT until you 
see "ITABL". Press the corresponding soft-key to access the MT menu.


4.1 LIBRARY INFORMATION
=======================

Size           : 2373 bytes
Checksum       : #793Ah [#31034d]
Version        : 7.0
Library Number : 1091

You can check these numbers by putting the library on the stack and pressing 
LS-[VAR] [BYTES]. The above statistics correspond to the distributed version, 
and if they do not match your results, your copy of the library may have been 
modified.

ITable has been tested on a SX Revisions D/J, G Revision R, and GX 
Revisions P/R. However, as always, you should BACKUP YOUR MEMORY before 
running this application.


5.0 OVERVIEW OF THE PROGRAM
===========================

In general, pressing [ON] at a prompt will abort an entire process. Traps 
have been made for these circumstances, so there should be no problems.

Throughout the MT library, you will be prompted for equations. Here is where 
a very useful feature comes in; All utilities in MT will recognize implied 
multiplication! 
Finally, remember that all the programs in this library are built around 
speed. They are all designed to either expand on the functionality of, or 
greatly speed up and ease, certain functions. For this reason, I will 
generally not use full screen graphical menus or choose boxes.


5.1 PROGRAM INFORMATION IN DETAIL 
=================================

ITable is a useful function I noticed is missing in HP calculators: A simple 
table of values. This list can enable you to quickly assess any pattern in 
the numeric values of a function. When the program is run, the first prompt 
is for the equation to examine in a 'Y=' form. You can either enter one 
(using the menu if you wish) or press [ENTER] which will tell the calculator 
to use the equation currently in your EQ variable. It will then prompt you 
for the initial value of X (default 0) and a rate of increment (default 1). 
The increment rate is the amount between each entry of X on the table. After 
answering these three prompts, a table is quickly generated. Any illegal 
values which cause an error in calculations are marked as "Undefined" (an 
example of this would be analyzing 'Y=1/X' from -2 with a step of 1). After 
calculations are complete, the table is displayed in ABUFF using fast ML 
display routines.

 The following menuline allows movement in the ITable viewing screen:
[PAGv]      Generate next six values using given increment rate.
[PAG^]      Generate previous six values using given increment rate.
[ONEv]      Generate next value using given increment rate.
[ONE^]      Generate previous value using given increment rate.
[STEP]      Prompts for a new increment rate (default 1).
            Redisplays table from top Xvalue with new increment.
[GOTO]      Jump to any X value (default 0).
            Redisplays table from defined Xvalue.
 Pressing [ENTER] or [ON] will exit the table.
 [NOTE: Internal calculations of the table are done to 12 digit precision, as 
are all working values stored. However, displayed values are rounded to four 
decimal places. This makes reading the table much easier, and keeps results 
like 7.6*10^-9 from causing misconceptions.]

You can enter the equation in ITable as a function of any variable. ITable 
will automatically detect the independent variable and make the proper 
adjustments. However, if there is more than one variable used in the 
equation, ITable will exit with an error. (Example: 'G=14*U' will work 
correctly)

In creating the table, the right side of an equation is used, and the left 
side is ignored. Therefore, 'X+3' would be treated as 'Y=0' because there is 
no right side; 18*Q+4W=4' is treated as 'Y=4'.

If you opt to use the current equation and EQ contains a list, ITable will 
use the first equation.

ITable supports "implied multiplication" idenFor example, if you enter the 
equation 'Y=4X^2-8X+2 SIN(4)' exactly as shown (the space before SIN is 
automatically entered; it is actually optional), programs will convert it to 
'Y=4*X^2-8*X+2*SIN(4)' and work properly. If there is an error in the 
equation you enter, these programs will beep and return the equation to you 
for re-editing at the location of the error.

There are a few known limitations to the identification I have created. If 
you are multiplying a variable by something enclosed in ()'s, you must put 
the variable AFTER the ()'s and not before. For example, if you enter the 
equation 'Y=5+X(18+X)', it will not insert the proper multiplication. This 
is because the expression 'X(18+X)' is accepted internally as (18+X) being 
a function of X. In order to enter this equation, you would have to enter it 
as 'Y=5+(18+X)X' instead. The other limitation to this is that something 
such as 'XY' is recognized as ONE variable, not two multiplied together. If 
you are multiplying two variables, you must insert the '*' yourself. (For 
example, 5X*Y will work)

In addition, right-shift-NXT will recall the X's menu if you enter a 
different one.

You can enter symbolic numbers or expressions as long as they are contained 
in the '' delimiters. Here is an easy example (in RAD mode):
 Equation:  'Y=SIN(X)'
 Initial Value:  0
 Increment rate: '/2'
If you enter the above values (with proper delimiters), you should see a
table with corresponding numeric values of [0, 0] [/2, 1] etc.

I assign this program to the left-shift-STAT button.  To do so, change to
user mode if you aren't already in it (left-shift-alpha) and enter:
{ ITABLE } HEAD 73.2 ASN

6.0 REMOVING THE LIBRARY
========================

To remove the library from your HP48, do the following:

1. Enter the port ID in the form :PORT:1091 and press ENTER *TWICE*.
   Example:  If ITable is stored in port 0,  enter :0:1091 DUP
   The port ID should now be on levels 1 and 2 of your stack.
2. Press the DETACH button (either by typing in by hand, or pressing
   left-shift-library, DETACH).
3. Press the PURGE key.

ITable should now be removed from your calculator. If you still get an 
"Object in use error", try turning off USER mode and switching to the HOME 
directory. Occasionally, if you have used ITable extensively, you may have 
to do a warmboot (ON-C) before it will allow you to PURGE the library.


6.1 CREDITS
===========

While all of the code was written by myself, there is much credit due to 
others.  Thanks go out to:
 Lee Buck           : Many SysRPL routines and questions answered
 Mika Heiskanen     : Inverse label menubuilders, questions answered
 Animesh Sabnis     : Beta testing of pre-releases
 Richard Steventon  : Beta testing of pre-releases
 Alfred Arduengo    : Mathlib source, ITABLE ideas, evaluation

If you use this program and have comments and/or suggestions, you can contact 
me at levyj@engin.umich.edu. I can also be found on IRC (#HP48) occasionally 
as "jacklevy". This library is actively supported and any reported bugs will 
be fixed immediately. Any suggestions will be considered!



mt70.lib [1091] code by jack levy [levyj@engin.umich.edu] dated 05/26/96, 7:44pm
itable.lib code extracted from mt70.lib by eric rechlin [eric@hpcalc.org] 09/03/98