/
footnotes.tex
489 lines (244 loc) · 37.2 KB
/
footnotes.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
% All footnotes are here.
% **** Preface footnotes ****
\sepfootnotecontent{Pre_01}{Havard Softworks, P.O. Box 69, Springbro, OH45066}
\sepfootnotecontent{Pre_02}{Ecclesiastes, 9.11. M. Kelly and N. Spies, \textit{FORTH, a Text and Reference} (Prentice-Hall, Englewood Cliffs, N.J., 1986). L. Brodie, \textit{Starting FORTH} (Prentice-Hall, Englewood Cliffs, N.J., 1981).}
% **** Chapter 1 footnotes ****
\sepfootnotecontent{01_01}{This description refers to FORTH's compilation scheme. See, \eg R.G. Loeliger, \textit{Threaded Interpretive Languages} (Byte Publications, Inc., Peterborough, NH, 1981). We shall have more to say about it in Chapter 2.}
\sepfootnotecontent{01_02}{Although some interpreted FORTRANs such as WATFOR have been developed.}
\sepfootnotecontent{01_03}{The original version of FORTRAN included naming conventions such that names beginning with letters I, J, K, L, M, and N are assumed to be integers, while those beginning with other letters are assumed to be single-precision floating point numbers. Subsequent versions have maintained this convention for backward compatibility.}
\sepfootnotecontent{01_04}{The items between parentheses, (\dots), and following a backslash, "\textbackslash", are comments.}
\sepfootnotecontent{01_05}{A \textbf{stack} is a data structure like a pile of cards, each containing a number. New numbers are added by placing them atop the pile, numbers are also deleted from the top. In essence, a stack is a "last-in, first-out" buffer.}
\sepfootnotecontent{01_06}{L. Brodie, \textit{Thinking Forth} (Prentice-Hall, Inc., Englewood Cliffs, New Jersey, 1984). M. Ham, "Structured Programming", \textit{Dr. Dobb's Journal}, July 1986.}
% **** Chapter 2 footnotes ****
\sepfootnotecontent{02_01}{L. Brodie, \textit{Starting FORTH}, 2nd ed. (Prentice-Hall, NJ, 1986), referred to hereafter as \SF.}
\sepfootnotecontent{02_02}{L. Brodie, \textit{Thinking FORTH} (Prentice-Hall, NJ 1984), referred to hereafter as \TF.}
\sepfootnotecontent{02_03}{M. Kelly and N. Spies, FORTH: a Tea and Reference (Prentice-Hall, NJ , 1986), referred to hereafter as \FTR.}
\sepfootnotecontent{02_04}{Successive words in the input stream are separated from each other by blank spaces, ASCII 20hex, the standard FORTH delimiter.}
\sepfootnotecontent{02_05}{We will explain about the stack in \S2.3.}
\sepfootnotecontent{02_06}{Since FORTH uses words, when we enter an input line we say the corresponding phrase.}
\sepfootnotecontent{02_07}{This level could be either the outer interpreter or a word that invokes \bc{NEW-WORD}.}
\sepfootnotecontent{02_08}{defined as \bc{: -ROT ROT ROT ;}}
\sepfootnotecontent{02_09}{We discuss looping in \S2.7 below.}
\sepfootnotecontent{02_10}{See \FTR, p. 325ff for a description of beheading - a process to make variables local to a small set of subroutines. Another technique is to embed variables within a data structure so they cannot be referenccd inadvertently. Chapters 2\S8\S\S3-2, 3\S5\S\S2, 5\S1\S\S2 and 11\S2 offer examples.}
% This is inline because footnote is in a frame.
%\sepfootnotecontent{02_11}{\textbf{RDROP} is a handy way to exit from a word before reaching the final ";". See \TF.}
\sepfootnotecontent{02_12}{The original FORTH-79 used +1 for "true", 0 for "false"; many newer system that mostly follow FORTH-79 use -1 for "true". HS/FORTH is one such. Both FORTH-83 and ANSII FORTH require -1 for "true", 0 for "false".}
\sepfootnotecontent{02_13}{This has led some FORTH gurus to prefer the synonymous word \bc{ENDIF} as clearer than \bc{THEN}.}
\sepfootnotecontent{02_14}{Signed 16-bit integers run from -32768 to +32767, unsigned from 0 to 65535. See \FTR.}
\sepfootnotecontent{02_15}{Michael Ham, "Structured Programming", \textit{Dr. Dobb's Journal of Software Tools}, October, 1986.}
\sepfootnotecontent{02_16}{This usage is a non-standard construct of HS/FORTH.}
\sepfootnotecontent{02_17}{Self-modifying machine code is considered a serious "no-no" by modern structured programming standards. Although it is sometimes valuable, few modern cpu's are capable of handling it safely. More often, because cpu's tend to use pipelining and parallelism to achieve speed, a piece of code might be modified in memory, but --having been pre-fetched before modification-- actually execute in unmodified form.}
\sepfootnotecontent{02_18}{Of course \bc{CONSTANT} is usually a machine-code primitive, for speed.}
\sepfootnotecontent{02_19}{An example (and its justification) of dimensioned data types in Ada is given by Do-While Jones, \textit{Dr. Dobb's Journal}, March 1987. The FORTH solution below is much simpler than the Ada version.}
\sepfootnotecontent{02_20}{This example is based on 16-bit integer arithmetic. The word \regc{*/} means "multiply the third number on the stack by NOS, keeping 32 bits of precision, and divide by "TOS". That is, the stack comment for \regc{*/} is \regc{(a b c --a*b/c)}.}
\sepfootnotecontent{02_21}{Headerless words are described in \FTR, p. 325ff. The word \textbf{BEHEAD'} is HS/FORTH's method for making a normal word into a headerless one. See Ch. 5\S1\S\S3 for further details.}
\sepfootnotecontent{02_22}{Better methods will be described in Chapter 5.}
\sepfootnotecontent{02_23}{The safety of an execution table can be increased by making the first (that is, the zero’th) action \textbf{WARNING}, and making the first step of \bc{BUTTON} a word \bc{CHECK-DATA} that maps any number not in the range 1-6 into 0. Then a wrong button number causes a \textbf{WARNING} to be issued and the system resets.}
\sepfootnotecontent{02_24}{A single byte can represent positive numbers 0-255.}
\sepfootnotecontent{02_25}{A system variable that returns the current starting address of the "scratchpad".}
% This is inline because of frame
\sepfootnotecontent{02_26}{\FTR, Ch. 3.}
\sepfootnotecontent{02_27}{Ironially, most programmers refuse to get along without spaghetti code, so commercial Pascal's now include GOTO. Only FORTH among major languages completely eschews both line labels and GOTOs, making it the most structured language available.}
\sepfootnotecontent{02_28}{The FORmula TRANsIator in Ch. 11\S4 uses this method to implement its recursive structure.}
\sepfootnotecontent{02_29}{Rather like the "cell" system in revolutionary conspiracies, where members of a cell know only each other but not the members of other cells. Mechanisms for receiving and transmitting messages between cells are double-blind. Hence, if an individual is captured or is a spy, he can betray at most his own cell and the damage is limited.}
\sepfootnotecontent{02_30}{The right parenthesis, ) , is not a word but a \textbf{delimiter}.}
\sepfootnotecontent{02_31}{See, \textit{e.g.}, L. Brodie, \TF, Ch. 5, Appendix E.}
\sepfootnotecontent{02_32}{For those familiar with assembly language, \textbackslash is exactly analogous to ; in assembler. But since ; is already used to close colon definitions in FORTH, the symbol \textbackslash has been used in its place.}
\sepfootnotecontent{02_33}{The matter of naming brings to mind Mark Twain's remark that the difference between the \textit{almost}-right word and the right one is the difference between the lightning-bug and the lightning.}
% Inline because footnote is in frame
% \sepfootnotecontent{02_34}{See \FTR for a more thorough discussion of vectoring. Brodie, \TF, sugests a nice construct called \bc{DOER...MAKE} that can be used for graceful vectoring.}
% **** Chapter 3 footnotes ****
\sepfootnotecontent{03_01}{That is, the names in WS FORTH, PIS/FORTH, UniFORTH and PCFORTH are nearly the same and close to the proposed FORTH Vendors' Group (\textbf{FVG}) standard - see, \eg, Ray Duncan's and Martin Tracy's article in Dr. Dobb's Journal, September 1984, p. 110. The new ANSII standard does not address floating point, hence it is likely the \textbf{FVG} standard will become pre-eminent by default.}
\sepfootnotecontent{03_02}{\bc{F@} and \bc{F!} stand for a suite of words for fetching and storing 16-, 32-, 64-, and 80-bit numbers from/to the fstack. In HS/FORTH they have names like \bc{I16@ I16! I32@ I32! R32@ R32! R64@ R64! R80@ R80!} and equivalents with suffices E or L, that transfer data from segments other than the data segment.}
\sepfootnotecontent{03_03}{FnX (exchange ST(n) and ST(0) on fstack) and FnR (roll ST(n) to ST(0) on fstack) are part of HS/FORTH's floating point lexicon.}
\sepfootnotecontent{03_04}{J.F. Palmer and S.P. Morse, The 8087 Primer (John Wiley and Sons, Inc., New York. 1984). Hereinafter called 8087P. Basically the same principle holds for other coprocessors such as the Weitek 1167 or Transputer 800 that incorporate intrinsic fstacks. The Motorola 68881/2 have registers, hence we must synthesize an fstack in software for these chips.}
\sepfootnotecontent{03_05}{See, e.g., \SF. Lines trace program flow; a branch indicates a decision; at a loop $\otimes$ marks the beginning and $\bullet$ the branch back to the beginning, as in BEGIN...REPEAT or DO...LOOP.}
\sepfootnotecontent{03_06}{We assume arrays have been defied using the intrinsically typed data structures and generic operators of Ch. 5.}
\sepfootnotecontent{03_07}{The notation [x] means "the address of x".}
\sepfootnotecontent{03_08}{ An example is discussed in Chapter 9, where the innermost loop of 3 nested loops is optimized (even hand-coded), and it is seen from the timings that little is to be gained by optimizing the next outer loop.}
\sepfootnotecontent{03_09}{\bc{XDUP} is called \bc{CPDUP} in HS/FORTH's complex arithmetic lexicon.}
\sepfootnotecontent{03_10}{Note the test for $x^{2} \geq 1$ in \bc{ARCCOSH}, to prevent an error in \bc{FSQRT}.}
\sepfootnotecontent{03_11}{D.E. Knuth, \textit{The Art of Computer Programming v.2: Seminumerical Algorithms}, 2nd ed. (Addison-Wesley Publishing Company, Reading, MA, 1981), Ch. 3.}
\sepfootnotecontent{03_12}{R. Sedgewick, \textit{Algorithms} (Addison-Wesley Publishing Company, Reading, MA, 1983).}
\sepfootnotecontent{03_13}{P. Bratley, B.L. Fox and LE. Schrage, \textit{A Guide to Simulation} (Springer-Verbg, Berlin, 1983).}
\sepfootnotecontent{03_14}{We anticipate using the FORTH assembler - see Ch. 4 \S1\S\S11 }
\sepfootnotecontent{03_15}{Of course, it would have been feasible to define, \textit{via} \bc{CREATE ... DOES>} , data types that place the data on the 87stack, \eg \bc{: FICONSTANT CREATE , DOES> I16@ ;} But such words can't be optimized; to optimize time-critical word(s) in assembler requires \bc{VARIABLE}s.}
\sepfootnotecontent{03_16}{The new words are \bc{FINIT} (initialize 80x87 chip). \bc{FTRUNC} (set roundoff mode to truncate floating point numbers toward zero); and \bc{FRNDINT} (round flotaing point number to integer). The 80x87 idiosyncratically possesses several roundoff policies: A policy is selectd by setting bits 10 and 11 (numbering from 0) of the 16-bit control word using \bc{HEX 0C00 OR}. See \bc{8087P} for details.}
\sepfootnotecontent{03_17}{\bc{BEHEAD"} is one of several HS/FORTH words thet remove dictionary entries and reclaim lost space. \bc{BEHEAD'} beheads one word, \bc{BEHEAD"} behads all words, inclusive, in a range: in this case, \bc{BIGDIV, DIVIS, SEED, M1, M2} and \bc{RAND}.}
\sepfootnotecontent{03_18}{ $N$ is assumed $\gg n$ }
\sepfootnotecontent{03_19}{For those interested in details, the probability a PRNG will produce the integer "s" $f$ times is $p_f=\lambda_fe^{-\lambda}/(f!)$. Thus the expected value of $(f-\lambda)^2/\lambda$ is 1, and therefore the expected value of $\chi^2$ is $n$. The variance in the $\chi^2$ statistic should then be $n(2 +\lambda^{-1} )$.}
\sepfootnotecontent{03_20}{Strongly recommended, given the fragility of PRNGs.}
\sepfootnotecontent{03_21}{Using, \eg, the Fast Fourier Transform program from Chapter 8\S2.}
\sepfootnotecontent{03_22}{That is, random numbers uniformty distributes from 0 to 1.}
\sepfootnotecontent{03_23}{Except in ease of compularion, of course.}
\sepfootnotecontent{03_24}{Here $\delta(x)$ is the so called Dirac $\delta$-function. See any standard text on distributon.}
% **** Chapter 4 footnotes ****
\sepfootnotecontent{04_01}{Although we confine ourselves to the 80x87 chip, the Motorola 68881/2 coprocessors can be programmed in the same general manner to achieve floating point capabilities rivialling $\text{VAX}^{\textregistered}$ minicomputers.}
\sepfootnotecontent{04_02}{J. Palmer and S. Morse, \textit{The 8087 Primer} (John Wiley \& Sons, NY (1984), hereafter referred to as \textbf{8087P}).}
\sepfootnotecontent{04_03}{A treasure included with MS-DOS}
\sepfootnotecontent{04_04}{see \textbf{8087P}, p. 93ff.}
\sepfootnotecontent{04_05}{see \textbf{8087P}, p. 87ff.}
\sepfootnotecontent{04_06}{Vocabularies are a method for subdividing the dictionary.}
\sepfootnotecontent{04_07}{BX is a CPU register, and [BX] means "the memory location wose address is in BX". HS/FORTH uses a naming convention in which assembler mnemonics end with a period, \eg\space\bc{MOV.} . Also, HS/FORTH makes the TOS the BX register, to reduce the number of pushes and pops needed to execute simple words.}
% Inlined because in frame
%\sepfootnotecontent{04_08}{The design of the 80286, 80386, and 80486 eliminates this problem. consequently \regc{FWAIT} is not required when assembling 80287/80387/80487 machine code. See, \textit{e.g.}, John H. Crawford and Patrick P. Gelsinger, \textit{Programming the 80386} (Sybex. San Francisco, 1987). HS/FORTH allows the user to choose which class of machine to assemble for, when loading the 80x87 assembler extension. The 80287+ option simply defines \regc{FWAIT.} as a null word.}
\sepfootnotecontent{04_09}{see, \eg, R. Lafitte, \textit{Assembly Language: Primer for the IBM PC \& XT} (Plume/Waite-New American Library, New York, 1984). Complete operating systems often include a code debugger that permits assembly; disassembly; modifying the contents of selected memory locations; setting breakpoints; and running proyams under debuger control.}
\sepfootnotecontent{04_10}{"Ten-byte pointer". Note HS/FORTH appends a period "." to most Intel mnemonics.}
\sepfootnotecontent{04_11}{\bc{TEMP + []} is HS/FORTH's phrase to assemble a named memory address.}
% Inline because of frame
% \sepfootnotecontent{04_12}{See, \eg, John H. Crawford and Patrick P. Gelsinger, \textit{Progumming the 80386} (Sybex, San Francisco, 1987).}
\sepfootnotecontent{04_13}{Although it \textit{is} possible to force artificially 80x87 precision to 24 mantissa bits to simulate arithmetic performed on other machines (that is, to compare results while debugging), I see no virture in a mode that shows up calculations while \textit{diminishing} precision and refer the reader to refs. 2 or 8.}
\sepfootnotecontent{04_14}{\Note: the 80387 includes a new instruction whereby the status control word can be moved \textit{directly} into the AX register of the 80386 CPU. The hex codes for FSTSW AX are DF E0.}
\sepfootnotecontent{04_15}{see, \eg, Table 4.1}
\sepfootnotecontent{04_16}{\Note: the test worrds \bc{F<} and \bc{F>} are defined opposite to \bc{F0>} and \bc{F0<}. This reversal of directions is \textit{not} a typographical error: it is \textit{demanded} by the operation of \bc{FCONPP} -see \textbf{8087P}.}
% Inline because frame
% \sepfootnotecontent{04_17}{See below for a discussion of \bc{FSCALE}.}
\sepfootnotecontent{04_18}{see \textbf{8087P}, p. 100ff}
\sepfootnotecontent{04_19}{Somewhat less, $\approx$ 100 clocks, if a 32-bit bus is utilized with the '386/'387 pair. See, \eg, John H. Crawford and Patrick F. Gelsinger, \textit{Programming the 80386} (Sybex, San Francisco, 1987).}
\sepfootnotecontent{04_20}{Note: FINIT operates difierently on IIT's coprocessors than on Intel's. It does not place NAN's in all 8 87stack cells.}
\sepfootnotecontent{04_21}{See Ch. 9 of this book for a fuller discussion of standard matrix algorithms.}
\sepfootnotecontent{04_22}{V. Strassen, \textit{Numer. Math.} \textbf{13} (1969) 184. See also V. Pan, \textit{SIAM Review} \textbf{26} (1984) 393.}
% **** Chapter 5 footnotes ****
\sepfootnotecontent{05_01}{Much of the material in this chapter has appeared previously in J.V.Noble, \textit{J.FORTH Ap. and Res.} 6 (1990) 47.}
\sepfootnotecontent{05_02}{Most languages classify data by type: in FORTRAN, \eg, we have INTEGER, INTEGER*4, REAL, REAL*8, COMPLEX, and COMPLEX*16, requiring 2, 4, 4, 8, 8, and 16 bytes of memory, respectively.}
\sepfootnotecontent{05_03}{See J.V. Noble, \textit{J. FORTH Ap. and Res.} 6 (1990) 131. See also Chapter 11, where we describe a FORmula TRANslator.}
\sepfootnotecontent{05_04}{M.G. Kelly and N. Spies, \textit{Forth, a Text and Reference} (Prentice-Hall, New Jersey, 1986), p. 324 ff.}
\sepfootnotecontent{05_05}{Harvard Softworkts, PO. Box 69, Springboro, Ohio 45066 Tel: (513) 748-0390.}
\sepfootnotecontent{05_06}{Dick Fountain, "Object-oriented FORTH", Byte Magazine, 8/86; \textit{Object-oriented FORTH} (Academic Press, Inc., Orlando, 1987).}
\sepfootnotecontent{05_07}{Leo Brodie, \textit{Thinkning FORTH} (Prentice-Hall, Inc., Englewood Cliff, NJ, 1984), p. 118ff. See also J.V. Noble, "Avoid Decisions", \textit{Computers in Physics} 5,4 (1991) 386.}
\sepfootnotecontent{05_08}{HS/PORTH uses a word pair \bc{CASE: ... ;CASE} that performs the same task as \bc{G: .. ;} below. \bc{G:} was inspired by Michael Ham (\textit{Dr. Dobb's Journal}, October 1986).}
\sepfootnotecontent{05_09}{Consult, \eg, LJ. Scanlon, \textit{op. cit.}; or R. Lafore, \textit{op. cit.} HS/FORTH defines "far" access operators, \bc{@L} and \bc{IL} of all types, that expect a "long" address on the stack. For example, \bc{CODE R32@L DS POP. FWAIT. DS:[BX] DWORD-PTR. FLD. END-CODE}}
\sepfootnotecontent{05_10}{J.V. Noble, "Scientific Computation in FORTH". \textit{Computers in Physics} 3 (1989) 31; and Ch 8.1.5 of this book.}
\sepfootnotecontent{05_11}{Other authors have noted this and proposed more readable matrix notations. See, \eg, Joe Bentham, "FORTH and the Fast Fourier Transform" \textit{Dr. Dobb‘s Journal}, September, 1984, p. 34. Also Dick Pountains's book \textit{Object-oriented FORTH (op cit.)} uses an array naming convention with brackets.}
\sepfootnotecontent{05_12}{Recall that the standard FORTH delimiter is the ASCII blank (20h = 32d).}
\sepfootnotecontent{05_13}{See, \eg,L. Brodie, \textit{Thinking FORTH (op. cit.)} p. 113ff.}
\sepfootnotecontent{05_14}{See, \eg, Ray Duncan, "FORTH support for Intel/Lotus expanded memory", \textit{Dr. Dobb's Journal}, August 1986; also, John A. Lefor and Karen Lund, "Reaching into expanded memory", \textit{PC Tech Journal}, May 1987.}
\sepfootnotecontent{05_15}{See, \eg, D.N. Jump, \textit{Programmer's guide to MS-DOS}, rev. ed. (Brady Books, New York, 1987).}
\sepfootnotecontent{05_16}{See, \eg, Al Williams, "DOS + 386 = 4 Gigabytes", Dr. Dobb's Journal, July 1990, p. 62.}
\sepfootnotecontent{05_17}{C. Morph and M. Waite, \textit{8086/8088 16-bit microprocessor primer} (Byte/McGraw-Hill, Peterborough, 1982); L. Scanlon, \textit{IBM PC \& XT assembly language: a guide for programmers} (Brady/Prentice-Hall, Bowie, Md., 1983); R. Lafore, \textit{Assembly language primer for the IBM PC \& XT} (Plume/Waite, New York, 1984).}
\sepfootnotecontent{05_18}{J.S. Callahan, \textit{Proc. 1988 Rochester FORTH Conference} (Inst. for Applied FORTH Research, Inc., 1988), p. 39.}
\sepfootnotecontent{05_19}{G. Shaw, "Forth Shifts Gears, I", \textit{Computer Langmge} (May 1988) p. 67; "Forth Shifts Gears, II", \textit{Computer Language} (June 1988) p. 61; \textit{Proc. 9th Asilomar FORML Conference} (JFAR 5 (1988) 347.)}
% **** Chapter 6 footnotes ****
\sepfootnotecontent{06_01}{\textit{The Handbook of Mathematical Functions} ed. Milton Abramowitz and Irene Stegun (Dover Hlications, Inc, New York, 1965) --henceforth abbreviated \textbf{HMF}-- is a mine of useful information and references, on this as well as many other aspects of numerical analysis.}
\sepfootnotecontent{06_02}{This is the examle of \textbf{Zeno's paradox} where you are at one end of a sofa and an attractive person of the opposite gender is at the other end. You move half the distance, then half the remainder. Clearly an an infinite number of moves is necessary to achieve the desired proximity. Thus, according to Zeno, you never get there. According to Eq. 6, however, you \textit{do} get there and in a \textbf{finite} time, to boot!}
\sepfootnotecontent{06_03}{\textbf{HMF}, Ch. 3 \S6 ff.}
\sepfootnotecontent{06_04}{\textbf{HMF}, Ch. 4 \S4.42}
\sepfootnotecontent{06_05}{Since $\pi/4$ radians is $45^{\circ}$.}
\sepfootnotecontent{06_06}{A better method would be to evaluate the series for $x = 1\/\sqrt{3}$ which is the tangent of $\pi/6$, or $x = \sqrt{2}-1$, the tangent of $\pi/8$}
\sepfootnotecontent{06_07}{Note we have set up to display $\pi$ rather than $\pi/4$.}
\sepfootnotecontent{06_08}{This theorem, due to Weierstrass, is found in all standard intermediate-level calculus texts.}
\sepfootnotecontent{06_09}{See, \eg, J, Mathews and R.L. Walker, \textit{Mathematical Methods of Physics}, 2nd ed. (WA. Benjamin, Inc, New Jersey, 1970).}
\sepfootnotecontent{06_10}{We specialize to transcendental equations because our root-finding methods will work also for polynomials, whereas the methods developed for polynomials will not work in the more general case.}
\sepfootnotecontent{06_11}{See, e.g., \textbf{HMF} \S3.6.1.}
\sepfootnotecontent{06_12}{\textbf{HMF}, \S25.5.6.}
\sepfootnotecontent{06_13}{See, e.g., A. Ralston, \textit{A First Course in Numerical Analysis} (McGraw-Hill Book Company, New York, 1965) Ch. 5. Implicit methods increase the stability of numerical solution, compared with explicit methods. The formula below is exact for second-order polynomials. The error is of the same order as the explicit formula, but the coeffiient may be smaller.}
\sepfootnotecontent{06_14}{\Note: "\bc{?(}" means "conditionally execute to next right parenthesis".}
% **** Chapter 7 footnotes ****
\sepfootnotecontent{07_01}{APL gracefully admits complex numbers and functions, but is an \textit{interpreted} language.}
\sepfootnotecontent{07_02}{D.D. Clark, "Simple Calculations with Complex Numbers, \textit{Dr. Dobb's Journal}, October 1984. p. 30.}
\sepfootnotecontent{07_03}{D. Gedeon, "Complex Math in Pascal", \textit{Byte Magazine}, July 1987, p.121.}
\sepfootnotecontent{07_04}{The 2-dimensional graphical representation of complex numbers makes complex arithmetic attractive for computer graphics.}
\sepfootnotecontent{07_05}{See Ch. 3.4.1 for definitions of the inverse trigonometric functions.}
\sepfootnotecontent{07_06}{The letter C is more mnemonic, but FORTH conventionally reserves \bc{C} for prefixing byte (``character'') operations -- as in \bc{C@}, \bc{C!}, etc. The complex extension supplied with HS/FORTH uses the prefix \bc{C} when it is unambiguous (as in \bc{C+}, \bc{C-}, \bc{C*}, \bc{C/}, \etc), and \bc{CP} when \bc{C} alone won't do, as in \bc{CP@}, \etc}
\sepfootnotecontent{07_07}{\bc{SYNONYM} is an HS/FORTH innovation to save some code by avoiding \bc{: FATAN2 ARG ;}}
\sepfootnotecontent{07_08}{Recall $e^0 \equiv e^{2\pi ni} = 1$.}
% **** Chapter 8 footnotes ****
\sepfootnotecontent{08_01}{If a rectangle lies \textbf{below} the horizontal axis, its area is considered to be \textbf{negative}.}
\sepfootnotecontent{08_02}{$f'(x)$ is the slope of the line tangent to the curve at the point $x$. It is called the \textbf{first derivative} of $f(x)$.}
\sepfootnotecontent{08_03}{This is not strictly correct: one could use a differential equation solver of the "predictor/corrector" variety, with variable step-size, to integrate Eq. 4. See, \textit{e.g.}, Press, \textit{et al.}, \textit{Numerical Recipes} (Cambridge University Press, Cambridge, 1986), pp. 102 ff.}
\sepfootnotecontent{08_04}{That is, this statement \textbf{defines $\bar{f}$}.}
\sepfootnotecontent{08_05}{The word \bc{\%} pushes what follows in the unput stream onto the 87stack, assuming it can be interpreted as a floating point number.}
\sepfootnotecontent{08_06}{J.M. Hammersley and D.C. Hanscomb, \textit{Monte Carlo Methods} (Methuen, London, 1964).}
\sepfootnotecontent{08_07}{See, \eg, R. Sedgewick, \textit{Algorithms} (Addison-Wesley Publishing Company, Reading, MA, 1983), p. 85.}
\sepfootnotecontent{08_08}{An ancient Greek mathematician known for one or two other things!}
\sepfootnotecontent{08_09}{See, \eg Sedgewick, \textit{op. cit.}, p. 11.}
\sepfootnotecontent{08_10}{Most FORTHs do not permit a word to call itself by name; the reason is that when the compiler tries to compile the self-reference, the definition has not yet been completed and so cannot be looked up in the dictionary. Instead, we use \textbf{RECURSE} to stand for the name of the self-calling word. See Note 14 below.}
\sepfootnotecontent{08_11}{\textbf{TRACE} is specific to HS/FORTH, but most dialects will support a similar operation. \textbf{SSTRACE} is a modification that sinde-steps through a program.}
\sepfootnotecontent{08_12}{For examlpe, it is often claimed that removing recursion almost always produces a faster algorithm. See, \eg Sedgewick, \textit{op. cit.}, p. 12.}
\sepfootnotecontent{08_13}{For generality we do not specify the integration rule for sub-intervals, but factor it into its own word. If we want to change the rule, we then need redefine but one component (actually two, since the Richardson extrapolation --see Appendix 8.C-- needs to be changed also).}
% 08_14 footnote code box
\begin{lrbox}{\LstBox}
\begin{lstlisting}[basicstyle=\footnotesize,]
: RECURSE ?COMP LAST-CFA , ;
: ?COMP STATE 0= ABORT" Compile only!" ;
: LAST-CFA LATEST PFA CFA ; IMMEDIATE
\ These defintions are appropriate for HS/FORTH
\end{lstlisting}
\end{lrbox}
\sepfootnotecontent{08_14}{We may define \bc{RECURSE} (in reverse order) as
\usebox{\LstBox} \\
Note that \bc{RECURSE} is called \bc{MYSELF} in some dialects.}
\sepfootnotecontent{08_15}{We use the generalized arrays of Ch. 5 \S3.4; A, B, and E are fp \#'s on the fstack, TYPE is the data-type of f(x) and INTEGRAL.}
\sepfootnotecontent{08_16}{The memory usage is shout the same: the recursive method pushes limits, \etc onto the fstack.}
\sepfootnotecontent{08_17}{"Analytic" meants the ordinary derivatiove $df(z/dz$ exist. Coonsult any good text on the theory of functions of a complex variable.}
\sepfootnotecontent{08_18}{This comes from the Chebyshev polynomial representation for sin(x). See, \eg, Abramowitz and Stegun, \textit{HMF}, \S4.3.104.}
\sepfootnotecontent{08_19}{Although the 80x87 already uses a compact represtation of the trigonometric functions and is thus fairly hard to beat, especially if high accuracy is demanded.}
\sepfootnotecontent{08_20}{to prevent \textbf{aliasing}.}
\sepfootnotecontent{08_21}{See, \eg, DE. Knuth, \textit{The Art of Computer Programming}, v.2 (Addison-Wesley Publishing Co., Reading, MA, 1981) p. 642.}
\sepfootnotecontent{08_22}{This example is taken from the article “FORTH and the Fast Fourier Transform" by Joe Barnhart, \textit{Dr. Dabb's Journal}, September 1984, p. 34.}
\sepfootnotecontent{08_23}{Polynomials can be thought of as vectors in a space of infinitely many dimensions ("Hilbert" space). Certain polynomials are like the vectors that point in the (mutually orthogonal) directions in ordinary 3-dlmensional space, and so are called \textbf{orthogonal} by analog.}
\sepfootnotecontent{08_24}{That is, "chi-squared per degree of freedom".}
\sepfootnotecontent{08_25}{That is not by itself very useful. Useful modicfications can be found in Press, \textit{et al.}, \textit{Numerical Recipies}, \textit{ibid.}, p. 301ff.}
\sepfootnotecontent{08_26}{Press, \textit{et al.}, \textit{Numerical Recipies}, \textit{\underline{ibid.}}, p. 289ff.}
\sepfootnotecontent{08_27}{See, \eg, Abramowitz and Steegun, \textit{HMF}, p. 885.}
\sepfootnotecontent{08_28}{$f''(x)$ is the second derivative of $f(x)$, \ie the first derivative of $f'(x)$}
\sepfootnotecontent{08_29}{Called so because the curve $f(x) is approximated by straight line segments between successive points $x$, $x + w$. This we evaluate the areas of trapezoinds rather than rectangles.}
% **** Chapter 9 footnotes ****
\sepfootnotecontent{09_01}{ The determinant of an N'th-order square matix $A$ -- denoted by $\det(A)$ or $||A||$ -- is a number computed from the elements $A_{mn}$ by apptying rules famitiar from linear algebra. These rules define $||A||$ recursively in terms of determinants of matrices of square submatrices of $A$. See \S9\S\S2.1.}
\sepfootnotecontent{09_02}{buildings, cars, airplanes, bridges ...}
\sepfootnotecontent{09_03}{This follows from the fundamental theorem of algebra: a polynomial equation, $p(z) = a_0 + a_1z + a_2z^2 + \dotsc + a_nz^n = 0$, of degree n (in a complex variable z) has exactly n solutions.}
\sepfootnotecontent{09_04}{For clarity we now omit the vector "$\rightarrow$" and dyad "$\leftrightarrow$" symbol from vectors and matrices.}
\sepfootnotecontent{09_05}{The only number equal to its negative is 0.}
\sepfootnotecontent{09_06}{Professors always say this, hee, hee! See R. Sedgewick, Algorithms. (Addison-Wesley Publishing Company, Reading, MA 1983).}
\sepfootnotecontent{09_07}{$N!$ means $N \times (N-1) \times (N-2) \times \dotsc \times 2 \times 1$. The base of the "natural" fogarithms is \, $e = 2.7182818\dots$}
\sepfootnotecontent{09_08}{A Computer stores a number with finite precision -- say 6-7 decimal places with 32-bit floating-point numbers. This is enough for many purposes, especially in science and engineering, where the data are rarely measured to better than 1\% relative precision. Suppose, however, that two numbers, about $10^{-2}$ in magnitude, are multiplied. Their product is of order $10^{-4}$ and is known to six significant figures. Now add it to a third number of order unity. The result will be that third number $\pm10^{-4}$. Later, a fourth number -- also of order unity -- is subtracted from this sum. The result will be a number of order $10^{-4}$, but now known only to two significant figures. Matrix arithmetic is full of multiplications and additions. The lesson is clear -- to minimize the (inevitable) loss of precision associated with round-off, we must try to keep the magnitudes of products and sums as dose as possible.}
\sepfootnotecontent{09_09}{The exception to this general rule, where more complete optimization would pay, would be an application that requires solving many sets of equations of relatively small order.}
\sepfootnotecontent{09_10}{The word \textbf{TEXT} inputs a counted string, using the FORTH-79 standard word \textbf{WORD} and places it at \textbf{PAD}. This is why PAD appears in the definition of \textbf{GET-F\#}. A definition of \textbf{TEXT} might be \bc{: TEXT ( delimiter --) WORD DUP C@ 1 + PAD SWAP CMOVE ;} Note that all words prefaced with C are byte operations by FORTH convention.}
\sepfootnotecontent{09_11}{The HS/FORTH words \textbf{VAR} and \textbf{IS} define a data structure that can be changed, like a FORTH \textbf{VARIABLE: 0 VAR X 3 IS X} but has the run-time behavior of a \textbf{CONSTANT: X . 3 ok}.}
\sepfootnotecontent{09_12}{While Brodie (\textit{TF}, p.180) quotes Charles Moore. FORTH's inventor, as offering 1-line definitions as the goal in FORTH programming, sometimes this is just not possible.}
\sepfootnotecontent{09_13}{The \textbf{condition} of a system of linear equations refers to how accurately they can be solved. Equations can be hard to solve precisely if the inverse matrix $A^{-1}$ has some large elements. Thus, the error vector for a calculated solution, $\delta=b-A \cdot X_{Calc}$ can be small, but the difference between the exact solution and the calculated solution can be large, since (see \S9\S3 below)
\begin{equation*}
X_{Exact}-X_{Calc}=A^{-1}\cdot\delta\,.
\end{equation*}
A test for ill-condition is whether the determinant gets small compared with the precision of the arithmetic. See, \textit{e.g.}, A. Ralston,\textit{A First Course in Numerical Analysis} (McGraw-Hill Book Co., New York, 1965).}
\sepfootnotecontent{09_14}{We employ the standard notation that a vector u is a column and an adjoint vector $v^\dagger$ a row. Their outer product, $uv^\dagger$, is a matrix. Given a column $v$, we construct its adjoint (row) $v^\dagger$ by taking the complex conjugate of each element and placing it in the corresponding position in a row-vector.}
\sepfootnotecontent{09_15}{When I think that solving $100\times 100$ systems --key to my Ph.D. research in 1966-- took the better path of an hour on an IBM 7094, these results seem incredible.}
\sepfootnotecontent{09_16}{See 8087P.}
\sepfootnotecontent{09_17}{It is possible to find \textit{special} matrices whose multiplication commutes --it just is not true for \textit{general} square matrices.}
\sepfootnotecontent{09_18}{Note: if C is a right-inverse, AC = I, it is also a left-inverse, CA= I.}
\sepfootnotecontent{09_19}{See, \textit{e.g.},William H. Press, Saul A. Teukolsky, William T. Vetterling and Brian P. Flannery. Numerical Recipes (Cambridge University Press, Cambridge, 1986), p. 31ff.}
% **** Chapter 10 footnotes ****
\sepfootnotecontent{10_01}{Such as MS-DOS, OS/2, Pick, Unix, \etc}
\sepfootnotecontent{10_02}{Voltaire once remarked that if Satan did not exist it would be necessary for God to create him. If your FORTH system lacks words with these functions, by all means, invent them. A MS-DOS programmer's manual (see below) is vital for this task.}
\sepfootnotecontent{10_03}{Note that we only need to read in the type and order once, since the array descriptor (Ch. 5\S4\S\S2.5) contains the same information.}
\sepfootnotecontent{10_04}{We use \bc{.M} and \bc{.V} from Chapter 9. The words \bc{>FILE}, \bc{MAKE-OUTPUT} and \bc{CLOSE-OUTPUT} are the output analogues of the input words \bc{<FILE}, \etc}
\sepfootnotecontent{10_05}{\copyright Microsoft Corporation, 1983-.}
\sepfootnotecontent{10_06}{Radio Shack Cat. No. 26-5403.}
\sepfootnotecontent{10_07}{\bc{DOS"} must be defined in machine language to invoke the appropriate DOS function through another INT 21H call}
\sepfootnotecontent{10_08}{PRN2FILE 1.0 \copyright 1987 Ziff Communications Co. Written by Tom Kihlken.}
% **** Chapter 11 footnotes ****
\sepfootnotecontent{11_01}{See A.V. Aho, R. Sethi and J.D. Ullman, \textit{Compilers:...} (Addison-Wesley, Reading. 1988).}
\sepfootnotecontent{11_02}{These defects of nested conditionals are generally recognized. Commercially available CASE tools such as Stirling Castle’s \textit{Logic Gem} (that translates logical rules to conditionals); and Matrix Software's \textit{Matrix Layout} and AYECO, Inc.'s \textit{COMPEDITOR} (that translate tabular representations of FSMs to conditionals in any of several languages) were originally developed as in house aids.}
\sepfootnotecontent{11_03}{R. Sedgewick, Algorithms (Addison-Wesley Publishing Co., Reading MA 1983) p.257ff.}
\sepfootnotecontent{11_04}{A.V. Aho, R. Sethi and JD. Ullman, \textit{Compilers: Principles, TooLr and Techniques} (Addison Wesley Publishing Company, Reading, MA, 1988).}
\sepfootnotecontent{11_05}{Zvi Kohavi, \textit{Switching and Finite Automata Theory}, 2nd ed. (McGraw-Hill Publishing Co., New York, 1978).}
\sepfootnotecontent{11_06}{"Mutually exclusive" means only one input at a time can be true.}
\sepfootnotecontent{11_07}{"Exhaustive" means every possible input must be represented.}
\sepfootnotecontent{11_08}{J. Basile, \textit{J. FORTH Appl. and Res.} 1,2 (1982) 76-78.}
\sepfootnotecontent{11_09}{E. Rawson, \textit{J. FORTH Appl. and Res.} 3,4 (1986) 45-64.}
\sepfootnotecontent{11_10}{D.W. Berrian, \textit{Proc. 1989 Rochester FORTH Conf.} (Inst. for Applied FORTH Res., Inc., Rochester, NY 1989) p. 1-5.}
\sepfootnotecontent{11_11}{The developmental process is described in detail in my article "Avoid Decisions", \textit{Computers in Physics 5},\# 4 (1991) 386.}
\sepfootnotecontent{11_12}{The FORTH word \bc{NEXT} is the equivalent of NOP in assembler.}
\sepfootnotecontent{11_13}{That is, we should not continually reinvent interpreters equivalent to the FORTH interpreter.}
\sepfootnotecontent{11_14}{R. Pavelle, M. Rothstein and J. Fitch. "Computer Algebra", \textit{Scientific-American} \textbf{245}, \#6 (Dec. 1981) 136.}
\sepfootnotecontent{11_15}{See \eg M. Mignotte, \textit{Mathematics for Computer Algebra} (Springer-Verlag, Berlin, 1992).}
\sepfootnotecontent{11_16}{They are said to satisfy a \textbf{Clifford algebra}. See \, \eg, J.D. Bjorken and S.D. Drell, \textit{Relativistic Quantum Mechanics} (McGraw-Hill, Inc., New York, 1964); also V.B. Berestetskii, E.M. Lifshitz and L.P. Pitaevskii, \textit{Relativistic Quantum Theory, Part 1} (Pergaman Press, Oxford, 1971) p. 68ff.}
\sepfootnotecontent{11_17}{It is not difficult to introduce one further level of indirection and produce Forth code for generating a "compiler". See T.A. Ivanco and G. Hunter, \textit{J. Forth Appl. and Res. \textbf{6}(1990) 15.}}
\sepfootnotecontent{11_18}{Note: Berestetskii, \textit{et al.} (\textit{op. cit.}) define $\gamma^{5}$ with an overall "-" sign relative to Eq. 9.}
\sepfootnotecontent{11_19}{The word \bc{TEXT} can be defined as \bc{: TEXT WORD HERE PAD $! ;}}
\sepfootnotecontent{11_20}{Actually, 19 factors, since we want to \bc{ALLOT} space in multiples of 4 to maintain even paragraph boundaries. That is, the strings will use 20 bytes including the count.}
\sepfootnotecontent{11_21}{That is, code for an artificial, generic machine whose code can be mapped easily onto the instruction set of a real computer}
\sepfootnotecontent{11_22}{See, \eg, R.L. Kruse, \textit{Data Structure: and Program Design}, 2nd Ed. (Prentice-Hall. Inc.,
Englcwood Cliffs, NJ, 1987).}
\sepfootnotecontent{11_23}{Leo Brodie, \textit{Thinking FORTH} (Prentice-Hall, Inc, NJ, 1984).}
\sepfootnotecontent{11_24}{File FTRAN.FTH on the program diskette.}