ADDED mttroot/mtt/bin/trans/p/README Index: mttroot/mtt/bin/trans/p/README ================================================================== --- /dev/null +++ mttroot/mtt/bin/trans/p/README @@ -0,0 +1,113 @@ +Some of the files in this directory are derived from the NUMERICAL +RECIPES PASCAL SHAREWARE DISKETTE. Please note that any use of these +filse may be subject to the following notice: + + + NUMERICAL RECIPES PASCAL SHAREWARE DISKETTE + +The entire contents of this diskette are +Copyright (C) 1986 by Numerical Recipes Software. + +HERE ARE ANSWERS TO YOUR IMMEDIATE QUESTIONS: + +** What is this diskette? ** This NUMERICAL RECIPES PASCAL SHAREWARE +DISKETTE contains Pascal procedures originally published as the Pascal +Appendix to the FORTRAN book NUMERICAL RECIPES: THE ART OF SCIENTIFIC +COMPUTING (Cambridge University Press, 1986), and test driver programs +originally published as the NUMERICAL RECIPES EXAMPLE BOOK (PASCAL) +(Cambridge University Press, 1986). + +** What kinds of procedures are these Numerical Recipes? ** They are +practically a complete library for scientific computation. Numbering +more than 200, their scope includes integration, linear algebra, +differential equations, Fourier methods, data analysis, statistics, +lots of special functions, random numbers, sorting, root finding, +optimization, and much more. + +** Do I really get this whole library for FREE? ** Yes, providing that +you follow these simple rules: (1) You must read and accept the +disclaimer of warranty at the end of this document. (2) You must not +expect any user support from Numerical Recipes Software, Cambridge +University Press, or the authors of the Numerical Recipes books. (3) +You must not copy or redistribute any of the programs or procedures +for commercial purposes. You CAN make copies of the programs for your +friends and colleagues, providing that you include this file +(especially its copyright notice and disclaimer of warranty) with any +copy that you make. + +** What's the catch, then? ** None at all. Many thousands of +satisfied users paid more than $20 to purchase exactly the programs on +this disk, which were sold by Cambridge University Press (C.U.P.) +between 1986 and 1989. C.U.P. now sells a revised version of the +Numerical Recipes program library, whose Pascal style is much +improved, but whose basic algorithmic workings are identical to this +disk. Rather than let the older version go to waste, its authors +decided to make it available to the shareware community of users. + +** How can I figure out what the procedures do? ** One way is to read +the brief descriptions of all the programs in the file NRINFO.DOC. A +better way is to look at the book Numerical Recipes: The Art of +Scientific Computing in any one of its three editions (FORTRAN, +Pascal, or C). If you don't want to buy this book from Cambridge +University Press (see the file NRINFO.DOC), you can find it in +libraries. Or, take a pencil and a small piece of paper into a +bookstore that carries the book and take notes on which programs you +might find interesting. + +** How do I figure out how to use the procedures? ** Again, you have +several options. All the procedures (named *.PAS) come with +demonstration programs (named *.DEM). These demonstration programs +are included on this shareware diskette. (When sold, they are sold as +a separate diskette.) Usually you can figure out how to use a +procedure by figuring out its .DEM program. Another way is to look at +the Numerical Recipes book in a library or bookstore. + +** Aren't you just trying to get me to buy the book? ** Think of it +this way: Most shareware comes with the requirement that if you use it +more than casually, you are required to become a registered user and +pay a fee. We are not requiring any fee at all. We think that you +will be able to use MOST of the procedures on this diskette without +the Numerical Recipes book. If you become a more-than-casual user, or +if you look at the book in a bookstore, we are betting that you will +WANT to buy it, and perhaps then want to purchase the revised and +improved versions of the programs, also. But it is completely up to +you. + +** OK, what if I do want to get the book? ** Call Cambridge University +Press at their toll-free number, 800-872-7423. (In New York call +800-227-0247 or 914-937-9600.) Ask for "Numerical Recipes in Pascal", +ISBN number 0-521-37516-9. We think you'll like it. (Over 100,000 +copies of the book are in print, in FORTRAN, Pascal, and C.) + +** What are the files on this diskette? ** All the procedures, in +Pascal source code, are in the ZIP file NRPAS13.ZIP. You use +PKUNZIP.EXE to decompress them. (For info just execute PKUNZIP with +no command line arguments.) All the demonstration programs are +similarly in NRPEX10.ZIP (PEX means Pascal EXamples). Some data files +used by the procedures and demonstrations programs are in NRPDATA.ZIP. +The files NRPAS13.LST and NRPEX10.LST each list the names of the files +in their corresponding ZIP file. The short file MODFILE.PAS is used +by many of the procedures to customize to your particular variety of +Pascal compiler; feel free to modify it, if you need to. The file +NRINFO.DOC tells about the book Numerical Recipes in Pascal and gives +a brief description of all the procedures. The file you are now +reading is NRREADME.DOC. + +Good luck, and happy number-crunching! + + DISCLAIMER OF WARRANTY + ---------- -- -------- +THE PROGRAMS AND PROCEDURES ON THIS DISKETTE ARE PROVIDED "AS IS" +WITHOUT WARRANTY OF ANY KIND. WE MAKE NO WARRANTIES, EXPRESS OR +IMPLIED, THAT THE PROGRAMS AND PROCEDURES ARE FREE OF ERROR, OR ARE +CONSISTENT WITH ANY PARTICULAR STANDARD OF MERCHANTABILITY, OR THAT +THEY WILL MEET YOUR REQUIREMENTS FOR ANY PARTICULAR APPLICATION. THEY +SHOULD NOT BE RELIED ON FOR SOLVING A PROBLEM WHOSE INCORRECT SOLUTION +COULD RESULT IN INJURY TO A PERSON OR LOSS OF PROPERTY. IF YOU DO USE +THE PROGRAMS OR PROCEDURES IN SUCH A MANNER, IT IS AT YOUR OWN RISK. +THE AUTHORS AND PUBLISHER DISCLAIM ALL LIABILITY FOR DIRECT, +INCIDENTAL, OR CONSEQUENTIAL DAMAGES RESULTING FROM YOUR USE OF THE +PROGRAMS OR PROCEDURES ON THIS DISKETTE. ANY LIABILITY OF THE PERSON +OR PERSONS FROM WHOM YOU DIRECTLY OR INDIRECTLY OBTAINED THIS DISKETTE +WILL BE LIMITED EXCLUSIVELY TO PRODUCT REPLACEMENT OF DISKETTES WITH +MANUFACTURING DEFECTS. ADDED mttroot/mtt/bin/trans/p/sign.p Index: mttroot/mtt/bin/trans/p/sign.p ================================================================== --- /dev/null +++ mttroot/mtt/bin/trans/p/sign.p @@ -0,0 +1,10 @@ +FUNCTION sign(x : REAL) : REAL; +{ This useful function is missing from Pascal } + +BEGIN + IF X>=0 THEN + sign := 1 + ELSE + sign := -1; +END; { sign } + ADDED mttroot/mtt/bin/trans/p/zero_input.p Index: mttroot/mtt/bin/trans/p/zero_input.p ================================================================== --- /dev/null +++ mttroot/mtt/bin/trans/p/zero_input.p @@ -0,0 +1,10 @@ +PROCEDURE zero_input(VAR x : InputVector; + N : INTEGER); +VAR i : INTEGER; + +BEGIN + FOR i:=1 TO N DO + x[i] := 0.0; +END; + +