Home » Archimedes archive » Acorn User » AU 1997-10 A.adf » Extras » Apple][e/PD/BOB/ARMBOB/doc/arrayDoc
Apple][e/PD/BOB/ARMBOB/doc/arrayDoc
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Archimedes archive » Acorn User » AU 1997-10 A.adf » Extras |
Filename: | Apple][e/PD/BOB/ARMBOB/doc/arrayDoc |
Read OK: | ✔ |
File size: | 11AE bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
\#��75 �BThe functions in the Array Library extend ArmBob to allow some vector �Band matrix operations to be performed. It is supposed that the elements of numerical input arrays are either all of type �AINTEGER�7 or all of type �AREAL�7. If the input arrays are both of type �AINTEGER�7, the output will be of type �AINTEGER�7, except for �8inverse()�7; otherwise the output will be of type �AREAL�7. A few of the functions can deal with arrays of mixed types, but this should not be relied on as it can lead to errors that are not detected. Arrays of mixed types can always be converted to �AREAL�7 arrays by using the function �8multiple()�7 with the �AREAL�7 factor 1.0. Variables of type �AVECTOR�7 are treated as row vectors, but it may be expedient to treat row vectors as 1�x�n matrices and column vectors as n�x�1 matrices for consistency, so functions �8form_row()�7 and �8form_column()�7 are provided for conversions: both are special cases of �8form_matrix()�7. Arrays with elements of type �ASTRING�7 can be formed with �8form_matrix()�7 or �8form_column()�7 or �8form_row()�7, concatenated with �8concat()�7 and printed with �8printarray()�7. No other array functions can be used with string arrays. Nearly all the array functions use the auxiliary function �8newmatrix()�7, and �8printarray()�7 uses the function �8format()�7, so these functions are provided with the Array Library. �BInput�7 �8form_matrix(m,n,v) Returns an m x n matrix from a �AVECTOR�7 v of size m*n, whose rows are successive sets of n elements of the vector. The elements of v should be all �AINTEGER�7, all �AREAL�7 or all �ASTRING�7. An error is given if the vector v is not of size m*n. �8form_column(v) Returns a column vector from a �AVECTOR�7 v. The elements of v should be all �AINTEGER�7 or all �AREAL�7. It is a special case of �8form_matrix()�7. �8form_row(v) Returns a row vector from a �AVECTOR�7 v. The elements of v should be all �AINTEGER�7 or all �AREAL�7. It is a special case of �8form_matrix()�7; also a �AVECTOR�7 is treated as a row vector, so this function is only included for convenience. �BOutput �8printarray(A,l,p) Prints the elements of an array (matrix or vector) A in successive rows, each with field width l, and with p digits after the decimal point for �AREAL�7 elements by using �8format()�7. �8format(n,l,p) Formats variables of types �AINTEGER�7, �AREAL�7 and �ASTRING�7 for output. It converts �AREAL�7 or �AINTEGER�7 numbers n to signed decimal strings, with p digits after the decimal point for reals (p is irrelevant for integers and strings), and returns them, or strings n, either padded with leading spaces to make their lengths up to l or, if l is too small (in particular if l = 0), at full length without any leading spaces. �BManipulation �8add(c,A) Returns the result of adding the constant c to every element of the array (matrix or vector) A. �8sum(A,B) Returns the array sum A + B of matrices or vectors A and B. An error is given when the arrays are incompatible for addition. �8multiple(c,A) Returns the result of multiplying every element of the array (matrix or vector) A by the constant c. �8product(A,B) Returns the matrix product A.B of the array A (matrix or row vector) and the matrix B. An error is given when the arrays are incompatible for multiplication. �8trace(A) Returns the trace of the square matrix A. An error is given when A is not square. �8transpose(A) Returns the transpose of the matrix A. �8inverse(A) Returns the inverse of a non-singular square matrix A, formed by using elementary row operations. The elements of d can be �AINTEGER�7 or �AREAL�7, but the elements of the inverse will be �AREAL�7. Errors are given if A is not square or is singular. Elements with absolute values less than norm(A)/1000000 are set to zero. It uses the function �8abs()�7. �8concat(A,B) Returns the array concatenation A + B of the �ASTRING�7 arrays A and B (matrices or vectors). An error is given when the arrays are not compatible. �BAuxiliary functions �8newmatrix(m,n) Returns a new m x n matrix with elements of type �ANIL�7. �8abs(n) Returns the absolute value of a �AREAL�7 variable n. Used by �8inverse()�7. �8int_10(n) Returns an �AINTEGER�7 n as a decimal string. Used by �8format()�7.
00000000 5c 23 a3 a4 37 35 0a 0a 20 20 a3 42 54 68 65 20 |\#..75.. .BThe | 00000010 66 75 6e 63 74 69 6f 6e 73 20 69 6e 20 74 68 65 |functions in the| 00000020 20 41 72 72 61 79 20 4c 69 62 72 61 72 79 20 65 | Array Library e| 00000030 78 74 65 6e 64 20 41 72 6d 42 6f 62 20 74 6f 20 |xtend ArmBob to | 00000040 61 6c 6c 6f 77 20 73 6f 6d 65 20 76 65 63 74 6f |allow some vecto| 00000050 72 0a 20 20 a3 42 61 6e 64 20 6d 61 74 72 69 78 |r. .Band matrix| 00000060 20 6f 70 65 72 61 74 69 6f 6e 73 20 74 6f 20 62 | operations to b| 00000070 65 20 70 65 72 66 6f 72 6d 65 64 2e 0a 0a 20 20 |e performed... | 00000080 49 74 20 69 73 20 73 75 70 70 6f 73 65 64 20 74 |It is supposed t| 00000090 68 61 74 20 74 68 65 20 65 6c 65 6d 65 6e 74 73 |hat the elements| 000000a0 20 6f 66 20 6e 75 6d 65 72 69 63 61 6c 20 69 6e | of numerical in| 000000b0 70 75 74 20 61 72 72 61 79 73 20 61 72 65 20 65 |put arrays are e| 000000c0 69 74 68 65 72 0a 20 20 61 6c 6c 20 6f 66 20 74 |ither. all of t| 000000d0 79 70 65 20 a3 41 49 4e 54 45 47 45 52 a3 37 20 |ype .AINTEGER.7 | 000000e0 6f 72 20 61 6c 6c 20 6f 66 20 74 79 70 65 20 a3 |or all of type .| 000000f0 41 52 45 41 4c a3 37 2e 20 49 66 20 74 68 65 20 |AREAL.7. If the | 00000100 69 6e 70 75 74 20 61 72 72 61 79 73 20 61 72 65 |input arrays are| 00000110 20 62 6f 74 68 0a 20 20 6f 66 20 74 79 70 65 20 | both. of type | 00000120 a3 41 49 4e 54 45 47 45 52 a3 37 2c 20 74 68 65 |.AINTEGER.7, the| 00000130 20 6f 75 74 70 75 74 20 77 69 6c 6c 20 62 65 20 | output will be | 00000140 6f 66 20 74 79 70 65 20 a3 41 49 4e 54 45 47 45 |of type .AINTEGE| 00000150 52 a3 37 2c 20 65 78 63 65 70 74 20 66 6f 72 0a |R.7, except for.| 00000160 20 20 a3 38 69 6e 76 65 72 73 65 28 29 a3 37 3b | .8inverse().7;| 00000170 20 6f 74 68 65 72 77 69 73 65 20 74 68 65 20 6f | otherwise the o| 00000180 75 74 70 75 74 20 77 69 6c 6c 20 62 65 20 6f 66 |utput will be of| 00000190 20 74 79 70 65 20 a3 41 52 45 41 4c a3 37 2e 20 | type .AREAL.7. | 000001a0 41 20 66 65 77 20 6f 66 20 74 68 65 0a 20 20 66 |A few of the. f| 000001b0 75 6e 63 74 69 6f 6e 73 20 63 61 6e 20 64 65 61 |unctions can dea| 000001c0 6c 20 77 69 74 68 20 61 72 72 61 79 73 20 6f 66 |l with arrays of| 000001d0 20 6d 69 78 65 64 20 74 79 70 65 73 2c 20 62 75 | mixed types, bu| 000001e0 74 20 74 68 69 73 20 73 68 6f 75 6c 64 20 6e 6f |t this should no| 000001f0 74 20 62 65 0a 20 20 72 65 6c 69 65 64 20 6f 6e |t be. relied on| 00000200 20 61 73 20 69 74 20 63 61 6e 20 6c 65 61 64 20 | as it can lead | 00000210 74 6f 20 65 72 72 6f 72 73 20 74 68 61 74 20 61 |to errors that a| 00000220 72 65 20 6e 6f 74 20 64 65 74 65 63 74 65 64 2e |re not detected.| 00000230 20 41 72 72 61 79 73 20 6f 66 0a 20 20 6d 69 78 | Arrays of. mix| 00000240 65 64 20 74 79 70 65 73 20 63 61 6e 20 61 6c 77 |ed types can alw| 00000250 61 79 73 20 62 65 20 63 6f 6e 76 65 72 74 65 64 |ays be converted| 00000260 20 74 6f 20 a3 41 52 45 41 4c a3 37 20 61 72 72 | to .AREAL.7 arr| 00000270 61 79 73 20 62 79 20 75 73 69 6e 67 20 74 68 65 |ays by using the| 00000280 0a 20 20 66 75 6e 63 74 69 6f 6e 20 a3 38 6d 75 |. function .8mu| 00000290 6c 74 69 70 6c 65 28 29 a3 37 20 77 69 74 68 20 |ltiple().7 with | 000002a0 74 68 65 20 a3 41 52 45 41 4c a3 37 20 66 61 63 |the .AREAL.7 fac| 000002b0 74 6f 72 20 31 2e 30 2e 20 20 0a 0a 20 20 56 61 |tor 1.0. .. Va| 000002c0 72 69 61 62 6c 65 73 20 6f 66 20 74 79 70 65 20 |riables of type | 000002d0 a3 41 56 45 43 54 4f 52 a3 37 20 61 72 65 20 74 |.AVECTOR.7 are t| 000002e0 72 65 61 74 65 64 20 61 73 20 72 6f 77 20 76 65 |reated as row ve| 000002f0 63 74 6f 72 73 2c 20 62 75 74 20 69 74 20 6d 61 |ctors, but it ma| 00000300 79 20 62 65 0a 20 20 65 78 70 65 64 69 65 6e 74 |y be. expedient| 00000310 20 74 6f 20 74 72 65 61 74 20 72 6f 77 20 76 65 | to treat row ve| 00000320 63 74 6f 72 73 20 61 73 20 31 a0 78 a0 6e 20 6d |ctors as 1.x.n m| 00000330 61 74 72 69 63 65 73 20 61 6e 64 20 63 6f 6c 75 |atrices and colu| 00000340 6d 6e 20 76 65 63 74 6f 72 73 20 61 73 0a 20 20 |mn vectors as. | 00000350 6e a0 78 a0 31 20 6d 61 74 72 69 63 65 73 20 66 |n.x.1 matrices f| 00000360 6f 72 20 63 6f 6e 73 69 73 74 65 6e 63 79 2c 20 |or consistency, | 00000370 73 6f 20 66 75 6e 63 74 69 6f 6e 73 20 a3 38 66 |so functions .8f| 00000380 6f 72 6d 5f 72 6f 77 28 29 a3 37 20 61 6e 64 0a |orm_row().7 and.| 00000390 20 20 a3 38 66 6f 72 6d 5f 63 6f 6c 75 6d 6e 28 | .8form_column(| 000003a0 29 a3 37 20 61 72 65 20 70 72 6f 76 69 64 65 64 |).7 are provided| 000003b0 20 66 6f 72 20 63 6f 6e 76 65 72 73 69 6f 6e 73 | for conversions| 000003c0 3a 20 62 6f 74 68 20 61 72 65 20 73 70 65 63 69 |: both are speci| 000003d0 61 6c 20 63 61 73 65 73 20 6f 66 0a 20 20 a3 38 |al cases of. .8| 000003e0 66 6f 72 6d 5f 6d 61 74 72 69 78 28 29 a3 37 2e |form_matrix().7.| 000003f0 20 20 0a 0a 20 20 41 72 72 61 79 73 20 77 69 74 | .. Arrays wit| 00000400 68 20 65 6c 65 6d 65 6e 74 73 20 6f 66 20 74 79 |h elements of ty| 00000410 70 65 20 a3 41 53 54 52 49 4e 47 a3 37 20 63 61 |pe .ASTRING.7 ca| 00000420 6e 20 62 65 20 66 6f 72 6d 65 64 20 77 69 74 68 |n be formed with| 00000430 20 a3 38 66 6f 72 6d 5f 6d 61 74 72 69 78 28 29 | .8form_matrix()| 00000440 a3 37 0a 20 20 6f 72 20 a3 38 66 6f 72 6d 5f 63 |.7. or .8form_c| 00000450 6f 6c 75 6d 6e 28 29 a3 37 20 6f 72 20 a3 38 66 |olumn().7 or .8f| 00000460 6f 72 6d 5f 72 6f 77 28 29 a3 37 2c 20 63 6f 6e |orm_row().7, con| 00000470 63 61 74 65 6e 61 74 65 64 20 77 69 74 68 20 a3 |catenated with .| 00000480 38 63 6f 6e 63 61 74 28 29 a3 37 20 61 6e 64 20 |8concat().7 and | 00000490 70 72 69 6e 74 65 64 0a 20 20 77 69 74 68 20 a3 |printed. with .| 000004a0 38 70 72 69 6e 74 61 72 72 61 79 28 29 a3 37 2e |8printarray().7.| 000004b0 20 4e 6f 20 6f 74 68 65 72 20 61 72 72 61 79 20 | No other array | 000004c0 66 75 6e 63 74 69 6f 6e 73 20 63 61 6e 20 62 65 |functions can be| 000004d0 20 75 73 65 64 20 77 69 74 68 20 73 74 72 69 6e | used with strin| 000004e0 67 0a 20 20 61 72 72 61 79 73 2e 0a 0a 20 20 4e |g. arrays... N| 000004f0 65 61 72 6c 79 20 61 6c 6c 20 74 68 65 20 61 72 |early all the ar| 00000500 72 61 79 20 66 75 6e 63 74 69 6f 6e 73 20 75 73 |ray functions us| 00000510 65 20 74 68 65 20 61 75 78 69 6c 69 61 72 79 20 |e the auxiliary | 00000520 66 75 6e 63 74 69 6f 6e 20 a3 38 6e 65 77 6d 61 |function .8newma| 00000530 74 72 69 78 28 29 a3 37 2c 0a 20 20 61 6e 64 20 |trix().7,. and | 00000540 a3 38 70 72 69 6e 74 61 72 72 61 79 28 29 a3 37 |.8printarray().7| 00000550 20 75 73 65 73 20 74 68 65 20 66 75 6e 63 74 69 | uses the functi| 00000560 6f 6e 20 a3 38 66 6f 72 6d 61 74 28 29 a3 37 2c |on .8format().7,| 00000570 20 73 6f 20 74 68 65 73 65 20 66 75 6e 63 74 69 | so these functi| 00000580 6f 6e 73 20 61 72 65 0a 20 20 70 72 6f 76 69 64 |ons are. provid| 00000590 65 64 20 77 69 74 68 20 74 68 65 20 41 72 72 61 |ed with the Arra| 000005a0 79 20 4c 69 62 72 61 72 79 2e 0a 0a 20 20 a3 42 |y Library... .B| 000005b0 49 6e 70 75 74 a3 37 0a 0a 20 20 a3 38 66 6f 72 |Input.7.. .8for| 000005c0 6d 5f 6d 61 74 72 69 78 28 6d 2c 6e 2c 76 29 0a |m_matrix(m,n,v).| 000005d0 20 20 20 20 52 65 74 75 72 6e 73 20 61 6e 20 6d | Returns an m| 000005e0 20 78 20 6e 20 6d 61 74 72 69 78 20 66 72 6f 6d | x n matrix from| 000005f0 20 61 20 a3 41 56 45 43 54 4f 52 a3 37 20 76 20 | a .AVECTOR.7 v | 00000600 6f 66 20 73 69 7a 65 20 6d 2a 6e 2c 20 77 68 6f |of size m*n, who| 00000610 73 65 20 72 6f 77 73 20 61 72 65 0a 20 20 20 20 |se rows are. | 00000620 73 75 63 63 65 73 73 69 76 65 20 73 65 74 73 20 |successive sets | 00000630 6f 66 20 6e 20 65 6c 65 6d 65 6e 74 73 20 6f 66 |of n elements of| 00000640 20 74 68 65 20 76 65 63 74 6f 72 2e 20 54 68 65 | the vector. The| 00000650 20 65 6c 65 6d 65 6e 74 73 20 6f 66 20 76 20 73 | elements of v s| 00000660 68 6f 75 6c 64 0a 20 20 20 20 62 65 20 61 6c 6c |hould. be all| 00000670 20 a3 41 49 4e 54 45 47 45 52 a3 37 2c 20 61 6c | .AINTEGER.7, al| 00000680 6c 20 a3 41 52 45 41 4c a3 37 20 6f 72 20 61 6c |l .AREAL.7 or al| 00000690 6c 20 a3 41 53 54 52 49 4e 47 a3 37 2e 20 41 6e |l .ASTRING.7. An| 000006a0 20 65 72 72 6f 72 20 69 73 20 67 69 76 65 6e 20 | error is given | 000006b0 69 66 20 74 68 65 0a 20 20 20 20 76 65 63 74 6f |if the. vecto| 000006c0 72 20 76 20 69 73 20 6e 6f 74 20 6f 66 20 73 69 |r v is not of si| 000006d0 7a 65 20 6d 2a 6e 2e 0a 20 20 0a 20 20 a3 38 66 |ze m*n.. . .8f| 000006e0 6f 72 6d 5f 63 6f 6c 75 6d 6e 28 76 29 0a 20 20 |orm_column(v). | 000006f0 20 20 52 65 74 75 72 6e 73 20 61 20 63 6f 6c 75 | Returns a colu| 00000700 6d 6e 20 76 65 63 74 6f 72 20 66 72 6f 6d 20 61 |mn vector from a| 00000710 20 a3 41 56 45 43 54 4f 52 a3 37 20 76 2e 20 54 | .AVECTOR.7 v. T| 00000720 68 65 20 65 6c 65 6d 65 6e 74 73 20 6f 66 20 76 |he elements of v| 00000730 20 73 68 6f 75 6c 64 20 62 65 20 61 6c 6c 0a 20 | should be all. | 00000740 20 20 20 a3 41 49 4e 54 45 47 45 52 a3 37 20 6f | .AINTEGER.7 o| 00000750 72 20 61 6c 6c 20 a3 41 52 45 41 4c a3 37 2e 20 |r all .AREAL.7. | 00000760 49 74 20 69 73 20 61 20 73 70 65 63 69 61 6c 20 |It is a special | 00000770 63 61 73 65 20 6f 66 20 a3 38 66 6f 72 6d 5f 6d |case of .8form_m| 00000780 61 74 72 69 78 28 29 a3 37 2e 0a 0a 20 20 a3 38 |atrix().7... .8| 00000790 66 6f 72 6d 5f 72 6f 77 28 76 29 0a 20 20 20 20 |form_row(v). | 000007a0 52 65 74 75 72 6e 73 20 61 20 72 6f 77 20 76 65 |Returns a row ve| 000007b0 63 74 6f 72 20 66 72 6f 6d 20 61 20 a3 41 56 45 |ctor from a .AVE| 000007c0 43 54 4f 52 a3 37 20 76 2e 20 54 68 65 20 65 6c |CTOR.7 v. The el| 000007d0 65 6d 65 6e 74 73 20 6f 66 20 76 20 73 68 6f 75 |ements of v shou| 000007e0 6c 64 20 62 65 20 61 6c 6c 0a 20 20 20 20 a3 41 |ld be all. .A| 000007f0 49 4e 54 45 47 45 52 a3 37 20 6f 72 20 61 6c 6c |INTEGER.7 or all| 00000800 20 a3 41 52 45 41 4c a3 37 2e 20 49 74 20 69 73 | .AREAL.7. It is| 00000810 20 61 20 73 70 65 63 69 61 6c 20 63 61 73 65 20 | a special case | 00000820 6f 66 20 a3 38 66 6f 72 6d 5f 6d 61 74 72 69 78 |of .8form_matrix| 00000830 28 29 a3 37 3b 20 61 6c 73 6f 20 61 0a 20 20 20 |().7; also a. | 00000840 20 a3 41 56 45 43 54 4f 52 a3 37 20 69 73 20 74 | .AVECTOR.7 is t| 00000850 72 65 61 74 65 64 20 61 73 20 61 20 72 6f 77 20 |reated as a row | 00000860 76 65 63 74 6f 72 2c 20 73 6f 20 74 68 69 73 20 |vector, so this | 00000870 66 75 6e 63 74 69 6f 6e 20 69 73 20 6f 6e 6c 79 |function is only| 00000880 20 69 6e 63 6c 75 64 65 64 0a 20 20 20 20 66 6f | included. fo| 00000890 72 20 63 6f 6e 76 65 6e 69 65 6e 63 65 2e 20 0a |r convenience. .| 000008a0 0a 20 20 a3 42 4f 75 74 70 75 74 0a 0a 20 20 a3 |. .BOutput.. .| 000008b0 38 70 72 69 6e 74 61 72 72 61 79 28 41 2c 6c 2c |8printarray(A,l,| 000008c0 70 29 0a 20 20 20 20 50 72 69 6e 74 73 20 74 68 |p). Prints th| 000008d0 65 20 65 6c 65 6d 65 6e 74 73 20 6f 66 20 61 6e |e elements of an| 000008e0 20 61 72 72 61 79 20 28 6d 61 74 72 69 78 20 6f | array (matrix o| 000008f0 72 20 76 65 63 74 6f 72 29 20 41 20 69 6e 20 73 |r vector) A in s| 00000900 75 63 63 65 73 73 69 76 65 0a 20 20 20 20 72 6f |uccessive. ro| 00000910 77 73 2c 20 65 61 63 68 20 77 69 74 68 20 66 69 |ws, each with fi| 00000920 65 6c 64 20 77 69 64 74 68 20 6c 2c 20 61 6e 64 |eld width l, and| 00000930 20 77 69 74 68 20 70 20 64 69 67 69 74 73 20 61 | with p digits a| 00000940 66 74 65 72 20 74 68 65 20 64 65 63 69 6d 61 6c |fter the decimal| 00000950 0a 20 20 20 20 70 6f 69 6e 74 20 66 6f 72 20 a3 |. point for .| 00000960 41 52 45 41 4c a3 37 20 65 6c 65 6d 65 6e 74 73 |AREAL.7 elements| 00000970 20 62 79 20 75 73 69 6e 67 20 a3 38 66 6f 72 6d | by using .8form| 00000980 61 74 28 29 a3 37 2e 0a 0a 20 20 a3 38 66 6f 72 |at().7... .8for| 00000990 6d 61 74 28 6e 2c 6c 2c 70 29 0a 20 20 20 20 46 |mat(n,l,p). F| 000009a0 6f 72 6d 61 74 73 20 76 61 72 69 61 62 6c 65 73 |ormats variables| 000009b0 20 6f 66 20 74 79 70 65 73 20 a3 41 49 4e 54 45 | of types .AINTE| 000009c0 47 45 52 a3 37 2c 20 a3 41 52 45 41 4c a3 37 20 |GER.7, .AREAL.7 | 000009d0 61 6e 64 20 a3 41 53 54 52 49 4e 47 a3 37 20 66 |and .ASTRING.7 f| 000009e0 6f 72 20 6f 75 74 70 75 74 2e 20 49 74 0a 20 20 |or output. It. | 000009f0 20 20 63 6f 6e 76 65 72 74 73 20 a3 41 52 45 41 | converts .AREA| 00000a00 4c a3 37 20 6f 72 20 a3 41 49 4e 54 45 47 45 52 |L.7 or .AINTEGER| 00000a10 a3 37 20 6e 75 6d 62 65 72 73 20 6e 20 74 6f 20 |.7 numbers n to | 00000a20 73 69 67 6e 65 64 20 64 65 63 69 6d 61 6c 20 73 |signed decimal s| 00000a30 74 72 69 6e 67 73 2c 20 77 69 74 68 20 70 0a 20 |trings, with p. | 00000a40 20 20 20 64 69 67 69 74 73 20 61 66 74 65 72 20 | digits after | 00000a50 74 68 65 20 64 65 63 69 6d 61 6c 20 70 6f 69 6e |the decimal poin| 00000a60 74 20 66 6f 72 20 72 65 61 6c 73 20 28 70 20 69 |t for reals (p i| 00000a70 73 20 69 72 72 65 6c 65 76 61 6e 74 20 66 6f 72 |s irrelevant for| 00000a80 20 69 6e 74 65 67 65 72 73 0a 20 20 20 20 61 6e | integers. an| 00000a90 64 20 73 74 72 69 6e 67 73 29 2c 20 61 6e 64 20 |d strings), and | 00000aa0 72 65 74 75 72 6e 73 20 74 68 65 6d 2c 20 6f 72 |returns them, or| 00000ab0 20 73 74 72 69 6e 67 73 20 6e 2c 20 65 69 74 68 | strings n, eith| 00000ac0 65 72 20 70 61 64 64 65 64 20 77 69 74 68 0a 20 |er padded with. | 00000ad0 20 20 20 6c 65 61 64 69 6e 67 20 73 70 61 63 65 | leading space| 00000ae0 73 20 74 6f 20 6d 61 6b 65 20 74 68 65 69 72 20 |s to make their | 00000af0 6c 65 6e 67 74 68 73 20 75 70 20 74 6f 20 6c 20 |lengths up to l | 00000b00 6f 72 2c 20 69 66 20 6c 20 69 73 20 74 6f 6f 20 |or, if l is too | 00000b10 73 6d 61 6c 6c 20 28 69 6e 0a 20 20 20 20 70 61 |small (in. pa| 00000b20 72 74 69 63 75 6c 61 72 20 69 66 20 6c 20 3d 20 |rticular if l = | 00000b30 30 29 2c 20 61 74 20 66 75 6c 6c 20 6c 65 6e 67 |0), at full leng| 00000b40 74 68 20 77 69 74 68 6f 75 74 20 61 6e 79 20 6c |th without any l| 00000b50 65 61 64 69 6e 67 20 73 70 61 63 65 73 2e 0a 0a |eading spaces...| 00000b60 20 20 a3 42 4d 61 6e 69 70 75 6c 61 74 69 6f 6e | .BManipulation| 00000b70 0a 0a 20 20 a3 38 61 64 64 28 63 2c 41 29 0a 20 |.. .8add(c,A). | 00000b80 20 20 20 52 65 74 75 72 6e 73 20 74 68 65 20 72 | Returns the r| 00000b90 65 73 75 6c 74 20 6f 66 20 61 64 64 69 6e 67 20 |esult of adding | 00000ba0 74 68 65 20 63 6f 6e 73 74 61 6e 74 20 63 20 74 |the constant c t| 00000bb0 6f 20 65 76 65 72 79 20 65 6c 65 6d 65 6e 74 20 |o every element | 00000bc0 6f 66 20 74 68 65 0a 20 20 20 20 61 72 72 61 79 |of the. array| 00000bd0 20 28 6d 61 74 72 69 78 20 6f 72 20 76 65 63 74 | (matrix or vect| 00000be0 6f 72 29 20 41 2e 0a 0a 20 20 a3 38 73 75 6d 28 |or) A... .8sum(| 00000bf0 41 2c 42 29 0a 20 20 20 20 52 65 74 75 72 6e 73 |A,B). Returns| 00000c00 20 74 68 65 20 61 72 72 61 79 20 73 75 6d 20 41 | the array sum A| 00000c10 20 2b 20 42 20 6f 66 20 6d 61 74 72 69 63 65 73 | + B of matrices| 00000c20 20 6f 72 20 76 65 63 74 6f 72 73 20 41 20 61 6e | or vectors A an| 00000c30 64 20 42 2e 20 41 6e 20 65 72 72 6f 72 0a 20 20 |d B. An error. | 00000c40 20 20 69 73 20 67 69 76 65 6e 20 77 68 65 6e 20 | is given when | 00000c50 74 68 65 20 61 72 72 61 79 73 20 61 72 65 20 69 |the arrays are i| 00000c60 6e 63 6f 6d 70 61 74 69 62 6c 65 20 66 6f 72 20 |ncompatible for | 00000c70 61 64 64 69 74 69 6f 6e 2e 0a 0a 20 20 a3 38 6d |addition... .8m| 00000c80 75 6c 74 69 70 6c 65 28 63 2c 41 29 0a 20 20 20 |ultiple(c,A). | 00000c90 20 52 65 74 75 72 6e 73 20 74 68 65 20 72 65 73 | Returns the res| 00000ca0 75 6c 74 20 6f 66 20 6d 75 6c 74 69 70 6c 79 69 |ult of multiplyi| 00000cb0 6e 67 20 65 76 65 72 79 20 65 6c 65 6d 65 6e 74 |ng every element| 00000cc0 20 6f 66 20 74 68 65 20 61 72 72 61 79 20 28 6d | of the array (m| 00000cd0 61 74 72 69 78 0a 20 20 20 20 6f 72 20 76 65 63 |atrix. or vec| 00000ce0 74 6f 72 29 20 41 20 62 79 20 74 68 65 20 63 6f |tor) A by the co| 00000cf0 6e 73 74 61 6e 74 20 63 2e 0a 0a 20 20 a3 38 70 |nstant c... .8p| 00000d00 72 6f 64 75 63 74 28 41 2c 42 29 0a 20 20 20 20 |roduct(A,B). | 00000d10 52 65 74 75 72 6e 73 20 74 68 65 20 6d 61 74 72 |Returns the matr| 00000d20 69 78 20 70 72 6f 64 75 63 74 20 41 2e 42 20 6f |ix product A.B o| 00000d30 66 20 74 68 65 20 61 72 72 61 79 20 41 20 28 6d |f the array A (m| 00000d40 61 74 72 69 78 20 6f 72 20 72 6f 77 20 76 65 63 |atrix or row vec| 00000d50 74 6f 72 29 0a 20 20 20 20 61 6e 64 20 74 68 65 |tor). and the| 00000d60 20 6d 61 74 72 69 78 20 42 2e 20 41 6e 20 65 72 | matrix B. An er| 00000d70 72 6f 72 20 69 73 20 67 69 76 65 6e 20 77 68 65 |ror is given whe| 00000d80 6e 20 74 68 65 20 61 72 72 61 79 73 20 61 72 65 |n the arrays are| 00000d90 20 69 6e 63 6f 6d 70 61 74 69 62 6c 65 0a 20 20 | incompatible. | 00000da0 20 20 66 6f 72 20 6d 75 6c 74 69 70 6c 69 63 61 | for multiplica| 00000db0 74 69 6f 6e 2e 0a 0a 20 20 a3 38 74 72 61 63 65 |tion... .8trace| 00000dc0 28 41 29 0a 20 20 20 20 52 65 74 75 72 6e 73 20 |(A). Returns | 00000dd0 74 68 65 20 74 72 61 63 65 20 6f 66 20 74 68 65 |the trace of the| 00000de0 20 73 71 75 61 72 65 20 6d 61 74 72 69 78 20 41 | square matrix A| 00000df0 2e 20 41 6e 20 65 72 72 6f 72 20 69 73 20 67 69 |. An error is gi| 00000e00 76 65 6e 20 77 68 65 6e 20 41 20 69 73 0a 20 20 |ven when A is. | 00000e10 20 20 6e 6f 74 20 73 71 75 61 72 65 2e 0a 0a 20 | not square... | 00000e20 20 a3 38 74 72 61 6e 73 70 6f 73 65 28 41 29 0a | .8transpose(A).| 00000e30 20 20 20 20 52 65 74 75 72 6e 73 20 74 68 65 20 | Returns the | 00000e40 74 72 61 6e 73 70 6f 73 65 20 6f 66 20 74 68 65 |transpose of the| 00000e50 20 6d 61 74 72 69 78 20 41 2e 0a 0a 20 20 a3 38 | matrix A... .8| 00000e60 69 6e 76 65 72 73 65 28 41 29 0a 20 20 20 20 52 |inverse(A). R| 00000e70 65 74 75 72 6e 73 20 74 68 65 20 69 6e 76 65 72 |eturns the inver| 00000e80 73 65 20 6f 66 20 61 20 6e 6f 6e 2d 73 69 6e 67 |se of a non-sing| 00000e90 75 6c 61 72 20 73 71 75 61 72 65 20 6d 61 74 72 |ular square matr| 00000ea0 69 78 20 41 2c 20 66 6f 72 6d 65 64 20 62 79 20 |ix A, formed by | 00000eb0 75 73 69 6e 67 0a 20 20 20 20 65 6c 65 6d 65 6e |using. elemen| 00000ec0 74 61 72 79 20 72 6f 77 20 6f 70 65 72 61 74 69 |tary row operati| 00000ed0 6f 6e 73 2e 20 54 68 65 20 65 6c 65 6d 65 6e 74 |ons. The element| 00000ee0 73 20 6f 66 20 64 20 63 61 6e 20 62 65 20 a3 41 |s of d can be .A| 00000ef0 49 4e 54 45 47 45 52 a3 37 20 6f 72 20 a3 41 52 |INTEGER.7 or .AR| 00000f00 45 41 4c a3 37 2c 0a 20 20 20 20 62 75 74 20 74 |EAL.7,. but t| 00000f10 68 65 20 65 6c 65 6d 65 6e 74 73 20 6f 66 20 74 |he elements of t| 00000f20 68 65 20 69 6e 76 65 72 73 65 20 77 69 6c 6c 20 |he inverse will | 00000f30 62 65 20 a3 41 52 45 41 4c a3 37 2e 20 45 72 72 |be .AREAL.7. Err| 00000f40 6f 72 73 20 61 72 65 20 67 69 76 65 6e 20 69 66 |ors are given if| 00000f50 20 41 20 69 73 0a 20 20 20 20 6e 6f 74 20 73 71 | A is. not sq| 00000f60 75 61 72 65 20 6f 72 20 69 73 20 73 69 6e 67 75 |uare or is singu| 00000f70 6c 61 72 2e 20 45 6c 65 6d 65 6e 74 73 20 77 69 |lar. Elements wi| 00000f80 74 68 20 61 62 73 6f 6c 75 74 65 20 76 61 6c 75 |th absolute valu| 00000f90 65 73 20 6c 65 73 73 20 74 68 61 6e 0a 20 20 20 |es less than. | 00000fa0 20 6e 6f 72 6d 28 41 29 2f 31 30 30 30 30 30 30 | norm(A)/1000000| 00000fb0 20 61 72 65 20 73 65 74 20 74 6f 20 7a 65 72 6f | are set to zero| 00000fc0 2e 20 49 74 20 75 73 65 73 20 74 68 65 20 66 75 |. It uses the fu| 00000fd0 6e 63 74 69 6f 6e 20 a3 38 61 62 73 28 29 a3 37 |nction .8abs().7| 00000fe0 2e 0a 0a 20 20 a3 38 63 6f 6e 63 61 74 28 41 2c |... .8concat(A,| 00000ff0 42 29 0a 20 20 20 52 65 74 75 72 6e 73 20 74 68 |B). Returns th| 00001000 65 20 61 72 72 61 79 20 63 6f 6e 63 61 74 65 6e |e array concaten| 00001010 61 74 69 6f 6e 20 41 20 2b 20 42 20 6f 66 20 74 |ation A + B of t| 00001020 68 65 20 a3 41 53 54 52 49 4e 47 a3 37 20 61 72 |he .ASTRING.7 ar| 00001030 72 61 79 73 20 41 20 61 6e 64 20 42 0a 20 20 20 |rays A and B. | 00001040 28 6d 61 74 72 69 63 65 73 20 6f 72 20 76 65 63 |(matrices or vec| 00001050 74 6f 72 73 29 2e 20 41 6e 20 65 72 72 6f 72 20 |tors). An error | 00001060 69 73 20 67 69 76 65 6e 20 77 68 65 6e 20 74 68 |is given when th| 00001070 65 20 61 72 72 61 79 73 20 61 72 65 20 6e 6f 74 |e arrays are not| 00001080 0a 20 20 20 63 6f 6d 70 61 74 69 62 6c 65 2e 0a |. compatible..| 00001090 0a 20 20 a3 42 41 75 78 69 6c 69 61 72 79 20 66 |. .BAuxiliary f| 000010a0 75 6e 63 74 69 6f 6e 73 0a 0a 20 20 a3 38 6e 65 |unctions.. .8ne| 000010b0 77 6d 61 74 72 69 78 28 6d 2c 6e 29 0a 20 20 20 |wmatrix(m,n). | 000010c0 20 52 65 74 75 72 6e 73 20 61 20 6e 65 77 20 6d | Returns a new m| 000010d0 20 78 20 6e 20 6d 61 74 72 69 78 20 77 69 74 68 | x n matrix with| 000010e0 20 65 6c 65 6d 65 6e 74 73 20 6f 66 20 74 79 70 | elements of typ| 000010f0 65 20 a3 41 4e 49 4c a3 37 2e 0a 0a 20 20 a3 38 |e .ANIL.7... .8| 00001100 61 62 73 28 6e 29 0a 20 20 20 20 52 65 74 75 72 |abs(n). Retur| 00001110 6e 73 20 74 68 65 20 61 62 73 6f 6c 75 74 65 20 |ns the absolute | 00001120 76 61 6c 75 65 20 6f 66 20 61 20 a3 41 52 45 41 |value of a .AREA| 00001130 4c a3 37 20 76 61 72 69 61 62 6c 65 20 6e 2e 20 |L.7 variable n. | 00001140 55 73 65 64 20 62 79 20 a3 38 69 6e 76 65 72 73 |Used by .8invers| 00001150 65 28 29 a3 37 2e 0a 0a 20 20 a3 38 69 6e 74 5f |e().7... .8int_| 00001160 31 30 28 6e 29 0a 20 20 20 20 52 65 74 75 72 6e |10(n). Return| 00001170 73 20 61 6e 20 a3 41 49 4e 54 45 47 45 52 a3 37 |s an .AINTEGER.7| 00001180 20 6e 20 61 73 20 61 20 64 65 63 69 6d 61 6c 20 | n as a decimal | 00001190 73 74 72 69 6e 67 2e 20 55 73 65 64 20 62 79 20 |string. Used by | 000011a0 a3 38 66 6f 72 6d 61 74 28 29 a3 37 2e 0a |.8format().7..| 000011ae