home *** CD-ROM | disk | FTP | other *** search
- CURVEFIT 2.11-B 9/05/88 Thomas S. Cox 102 Evergreen St. Easley, SC 29640
- ===============================================================================
- This disk contains the program CURVEFIT compiled using the following Basic
- Compilers: Quick Basic 3.0 by Microsoft, Quick Basic 4.0 by Microsoft, and
- Turbo Basic 1.1 by Borland. The source code is the same for all versions
- except for Title changes in the main screen area to identify which compiler
- was used.
-
- This version of CURVEFIT is 2.11-B, created on 7/29/88.
-
- This version of CURVEFIT is essentially the same as the last released version
- except that there are three compiled versions. A bug related to improper
- initialization of variables has been corrected since version 2.11-A
- The respective versions are:
-
- CURVEFIT.EXE compiled with Microsoft's Quick Basic 3.0
- CURVEQB4.EXE compiled with Microsoft's Quick Basic 4.0
- CURVETB1.EXE compiled with Borland's Turbo Basic 1.1
-
- CURVEFIT compiled with Quick Basic 3.0 will, on some linear data sets,
- arbitrarily and mysteriously set the A and B coefficients of Equation #1
- (LINEAR) to zero. Neither of the other compiled versions do that. Neither
- does CURVEFIT when run as an Interpreted Basic program. See example data
- file EXLINEAR.DAT for an example of this behavior.
-
- Late note 9/3/88: CURVEFIT and CURVEQB4 do not crash for the following
- data set but give erroneous answers for Equation 19 (Hoerl). Also, the
- Interpreter version of Basic gives erroneous answers for Hoerl. The
- above mentioned programs will also hang-up when trying to show predicted
- values for any of the equations.
-
- 23400,25; 23525,37.5; 23650,41.25; 23775,42.813; 23900,40
-
- CURVETB1 will calculate the Sum of Squares but totally lock-up
- computer when calculating the coefficients. I don't know exactly why, but
- think it has something to with numeric overflow.
-
- CURVEQB4 compiled with Quick Basic 4.0b will totally lock up computer should
- there be a divide by zero error while a math co-processor is present on
- SOME, but not all machines. This can be avoided by setting the environment
- to not recognize that a co-processor is available. At DOS prompt type
- SET NO87=NO Math Coprocessor.
-
- The divide by zero bug is known to be present in early Wells-American
- machines that operate at 6 and 8 MHZ. Does not seem to be present in
- later versions of the Wells American Computers.
-
- CURVETB1 compiled with Turbo Basic 1.1 seems to work under all conditions that
- I have tried (except for the example cited under CURVEFIT listed above).
- This program is significantly faster than the Quick Basic
- 3.0 version (at least it is on my Wells-American AT Clone with 80287)
- and at least as fast at the Quick Basic 4.0b version. Note that it was
- necessary to change a TAB(5) statement to TAB(6) when displaying the Sums
- and Sums of Squares on Screen with this compiler (8/1/88).
-
- COMMENT:
- It sure would be nice if these different compilers worked the same. The lack
- of consistancy is a constant source of irritation and frustration!
-
- CURVEFIT.BAS as used with Interpreter Basic does not properly recognize the
- use of Function Keys for selection of Main Menu items. Please use arrow
- keys to select Menu options. Please note that the Interpreter version of
- Basic does not crash when there is numeric overflow, it just substitutes the
- largest number that it knows of and keeps on trucking.
-
- The source code for an additional version of CURVEFIT has been included. It
- is CURVE_AV which prints the sum of Absolute Values of the Residuals for the
- various equations. It is yet another way to determine the goodness of fit of
- a curve. The program functions generally the same as the other versions of
- CURVEFIT except that when the BEST FIT routine is called, the Absolute Value
- of Residuals (titled Mean Absolute Difference in Program) replaces the
- equation identification column. Because the coding for this program is
- significantly longer than for the other versions it is necessary to restrict
- this version to 100 data points for it to work with Interpreter Basic. This
- version is labeled as version 2.20-A.
-
- File List:
- ----------
- Included in CURVEFIT.ARC CURVEFIT.BAS Source Code
- CURVE_AV.BAS Source Code
- CURVEFIT.DOC Documentation for CURVEFIT
- CURVEFIT.EXE Quick Basic 3.0 Compiled
- CURVEQB4.EXE Quick Basic 4.0b Compiled
- CURVETB1.EXE Turbo Basic 1.1 Compiled
- *.DAT Example Data Files
-
- Other Files README.DOC This File (Brief Descriptions)
- ARCE.COM File to extract files in
- CURVEFIT.ARC
- ARCE.DOC Documentation for ARCE.COM
-
- Unarchiving Files
- -----------------
- Use the file ARCE on this disk for unarchiving programs in CURVEFIT.ARC
-
- For brief instructions just type ARCE when logged to this disk. For more
- extensive instructions please see the ARCE.DOC file.
-
-
- Error in Version 2.11-A of CURVEFIT
- -----------------------------------
- A bug that caused the same data set to produce different answers if not
- run as the first data set after loading CURVEFIT has been corrected. This
- bug was due to improper initialization of the Equation Coefficient Arrays.
-
- For persons having version 2.11-A, the initialization bug can be ignored if
- CURVEFIT is reloaded for each data set.
-
-
- Work-Around for Bug in CURVEFIT 2.11B (Quick-Basic 3.0 Version Only)
- --------------------------------------------------------------------
- Unfortunately I know of no way to predict when version 2.11-B will give
- erroneous information on a Linear Equation but the error will be obvious as
- both the A and B coefficients will be set to zero. In such an instance
- changing one data point just slightly, say from 2 to 2.0000001, will normally
- alleviate this problem. Strangely, a completely linear data set such as
- {1,1; 2,2; 3,3; 4,4; and 5,5} does not induce this error. A data set that
- does induce this error is: {20,1.2; 40,2; 60,2.8; 70,3.2; and 80,3.6}.
-
-
- SHAREWARE:
- ----------
- This program is SHAREWARE. A donation of $10 to the author at the following
- address would be most appreciated.
-
- Thomas S. Cox
- 102 Evergreen Street
- Easley, SC 29640
- ==============================================================================
- Later Notes: 9/6/88
-
- Further investigation of operation of CURVEFIT has shown that the program will
- calculate the sums of squares correctly. However, when calculating the
- equation coefficients, there may be a numeric overflow condition. When this
- occurs, strange things happen. In some cases the computer locks up. In other
- cases the coefficients are viewable, but some are wrong. In other cases the
- coefficients are viewable, but any attempt to view PREDICTED results hangs
- up and throws computer back to view coefficients screen. When this happens,
- it is NEVER possible to see PREDICTED results on screen for any equation.
-
- All of this mysterious operation seems to be related to how the program
- treats a numeric overflow error condition.
-
- Equations that use EXP to calculate the equation coefficients are the ones
- most likely to give erroneous results.
-
- Equations using EXP to calculate one or more coefficients are:
-
- Hoerl, Modified Hoerl, Root, Super Geometric, Modified Geometric,
- Exponential, Modified Exponential, Normal, Log-Normal, Beta,
-
- Please keep these quirks in mind when using CURVEFIT.
- ===============================================================================
-
- Brief note about BASLISTI.BAS.
-
- This is the source code of a BASIC program, stored as a straight ASCII file,
- for making a 'PRETTY' listing of a BASIC program that is stored as an ASCII
- file. It has options for controlling:
-
- 1. Number of characters per line
- 2. One Statement per line
- 3. Control of Epson type printer for Compressed, Elite, or Pica
- 4. Indention for left margin
- 5. Ability to strip high bit from files created with Wordstar
- (Document Mode)
-
- To use this program, one needs to either have Interpreter Basic or one of
- the Compiler Basics.
-
- This program is Public Domain. No registration fee. Duplicate freely.
-
- I have found that this program is very useful for keeping hard
- copies of BASIC source code in a notebook.
-
- 9-09-88 2:24:23 pm
- ===============================================================================