r38_0300.html 54 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424
  1. <a name=r38_0300>
  2. <title>LESSSPACE</title></a>
  3. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  4. E"></p>
  5. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  6. <b>LESSSPACE</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  7. <P>
  8. <P>
  9. <P>
  10. You can turn on the switch <em>lessspace</em> if you want fewer
  11. blank lines in your output.
  12. <P>
  13. <P>
  14. <a name=r38_0301>
  15. <title>LIMITEDFACTORS</title></a>
  16. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  17. E"></p>
  18. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  19. <b>LIMITEDFACTORS</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  20. <P>
  21. <P>
  22. <P>
  23. To get limited factorization in cases where it is too expensive to use
  24. full multivariate polynomial factorization, the switch
  25. <em>limitedfactors</em> can be turned on. In that case, only ``inexpensive''
  26. factoring operations, such as square-free factorization, will be used
  27. when
  28. <a href=r38_0150.html#r38_0151>factorize</a> is called.
  29. <P>
  30. <P>
  31. <P> <H3>
  32. examples: </H3>
  33. <p><pre><tt>
  34. a := (y-x)^2*(y^3+2x*y+5)*(y^2-3x*y+7)$
  35. factorize a;
  36. 2
  37. {- 3*X*Y + Y + 7,1}
  38. 3
  39. {2*X*Y + Y + 5,1},
  40. {X - Y,2}}
  41. on limitedfactors;
  42. factorize a;
  43. 2 2 4 3 5 3 2
  44. {- 6*X *Y - 3*X*Y + 2*X*Y - X*Y + Y + 7*Y + 5*Y + 35,1},
  45. {X - Y,2}}
  46. </tt></pre><p>
  47. <a name=r38_0302>
  48. <title>LIST_switch</title></a>
  49. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  50. E"></p>
  51. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  52. <b>LIST</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  53. <P>
  54. The <em>list</em> switch causes REDUCE to print each term in any sum on
  55. separate lines.
  56. <P>
  57. <P>
  58. <P> <H3>
  59. examples: </H3>
  60. <p><pre><tt>
  61. x**2*(y**2 + 2*y) + x*(y**2 + z)/(2*a);
  62. 2 2
  63. X*(2*A*X*Y + 4*A*X*Y + Y +Z)
  64. ------------------------------
  65. 2*A
  66. on list;
  67. ws;
  68. 2
  69. (X*(2*A*X*Y
  70. + 4*A*X*Y
  71. 2
  72. + Y
  73. + Z))/(2*A)
  74. </tt></pre><p>
  75. <a name=r38_0303>
  76. <title>LISTARGS</title></a>
  77. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  78. E"></p>
  79. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  80. <b>LISTARGS</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  81. <P>
  82. <P>
  83. <P>
  84. If an operator other than those specifically defined for lists is given a
  85. single argument that is a list, then the result of this operation will be
  86. a list in which that operator is applied to each element of the list.
  87. This process can be inhibited globally by turning on the switch
  88. <em>listargs</em>.
  89. <P>
  90. <P>
  91. <P> <H3>
  92. examples: </H3>
  93. <p><pre><tt>
  94. log {a,b,c};
  95. LOG(A),LOG(B),LOG(C)
  96. on listargs;
  97. log {a,b,c};
  98. LOG(A,B,C)
  99. </tt></pre><p>It is possible to inhibit such distribution for a specific operato
  100. r by
  101. using the declaration
  102. <a href=r38_0200.html#r38_0203>listargp</a>. In addition, if an operator has
  103. more than one argument, no such distribution occurs, so <em>listargs</em>
  104. has no effect.
  105. <P>
  106. <P>
  107. <P>
  108. <a name=r38_0304>
  109. <title>MCD</title></a>
  110. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  111. E"></p>
  112. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  113. <b>MCD</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  114. <P>
  115. <P>
  116. <P>
  117. When <em>mcd</em> is on, sums and differences of rational expressions are put
  118. on a common denominator. Default is <em>on</em>.
  119. <P>
  120. <P>
  121. <P> <H3>
  122. examples: </H3>
  123. <p><pre><tt>
  124. a/(x+1) + b/5;
  125. 5*A + B*X + B
  126. -------------
  127. 5*(X + 1)
  128. off mcd;
  129. a/(x+1) + b/5;
  130. -1
  131. (X + 1) *A + 1/5*B
  132. 1/6 + 1/7;
  133. 13/42
  134. </tt></pre><p>Even with <em>mcd</em> off, rational expressions involving only nu
  135. mbers are still
  136. put over a common denominator.
  137. <P>
  138. <P>
  139. Turning <em>mcd</em> off is useful when explicit negative powers are needed,
  140. or if no greatest common divisor calculations are desired, or when
  141. differentiating complicated rational expressions. Results when <em>mcd</em>
  142. is off are no longer in canonical form, and expressions equivalent to zero
  143. may not simplify to 0. Some operations, such as factoring cannot be done
  144. while <em>mcd</em> is off. This option should therefore be used with some
  145. caution. Turning <em>mcd</em> off is most valuable in intermediate parts of
  146. a complicated calculation, and should be turned back on for the last stage.
  147. <P>
  148. <P>
  149. <P>
  150. <a name=r38_0305>
  151. <title>MODULAR</title></a>
  152. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  153. E"></p>
  154. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  155. <b>MODULAR</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  156. <P>
  157. <P>
  158. <P>
  159. When <em>modular</em> is on, polynomial coefficients are reduced by the
  160. modulus set by
  161. <a href=r38_0100.html#r38_0104>setmod</a>. If no modulus has been set, <em>modul
  162. ar</em>
  163. has no effect.
  164. <P>
  165. <P>
  166. <P> <H3>
  167. examples: </H3>
  168. <p><pre><tt>
  169. setmod 2;
  170. 1
  171. on modular;
  172. (x+y)**2;
  173. 2 2
  174. X + Y
  175. 145*x**2 + 20*x**3 + 17 + 15*x*y;
  176. 2
  177. X + X*Y + 1
  178. </tt></pre><p>Modular operations are only conducted on the coefficients, not the
  179. exponents. The modulus is not restricted to being prime. When the modulus
  180. is prime, division by a number not relatively prime to the modulus results
  181. in a &lt;Zero divisor&gt; error message. When the modulus is a composite
  182. number, division by a power of the modulus results in an error message, but
  183. division by an integer which is a factor of the modulus does not.
  184. The representation of modular number can be influenced by
  185. <a href=r38_0250.html#r38_0269>balanced_mod</a>.
  186. <P>
  187. <P>
  188. <P>
  189. <a name=r38_0306>
  190. <title>MSG</title></a>
  191. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  192. E"></p>
  193. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  194. <b>MSG</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  195. <P>
  196. <P>
  197. <P>
  198. When <em>msg</em> is off, the printing of warning messages is suppressed. Error
  199. messages are still printed.
  200. <P>
  201. <P>
  202. Warning messages include those about redimensioning an
  203. <a href=r38_0150.html#r38_0188>array</a>
  204. or declaring an
  205. <a href=r38_0200.html#r38_0211>operator</a> where one is expected.
  206. <P>
  207. <P>
  208. <P>
  209. <a name=r38_0307>
  210. <title>MULTIPLICITIES</title></a>
  211. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  212. E"></p>
  213. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  214. <b>MULTIPLICITIES</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  215. <P>
  216. <P>
  217. <P>
  218. When
  219. <a href=r38_0150.html#r38_0179>solve</a> is applied to a set of equations with m
  220. ultiple roots,
  221. solution multiplicities are normally stored in the global variable
  222. <a href=r38_0001.html#r38_0017>root_multiplicities</a> rather than the solution
  223. list. If you want
  224. the multiplicities explicitly displayed, the switch <em>multiplicities</em>
  225. should be turned on. In this case, <em>root_multiplicities</em> has no value.
  226. <P>
  227. <P>
  228. <P> <H3>
  229. examples: </H3>
  230. <p><pre><tt>
  231. solve(x^2=2x-1,x);
  232. X=1
  233. root_multiplicities;
  234. 2
  235. on multiplicities;
  236. solve(x^2=2x-1,x);
  237. X=1,X=1
  238. root_multiplicities;
  239. </tt></pre><p>
  240. <a name=r38_0308>
  241. <title>NAT</title></a>
  242. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  243. E"></p>
  244. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  245. <b>NAT</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  246. <P>
  247. <P>
  248. <P>
  249. When <em>nat</em> is on, output is printed to the screen in natural form, with
  250. raised exponents. <em>nat</em> should be turned off when outputting expressions
  251. to a file for future input. Default is <em>on</em>.
  252. <P>
  253. <P>
  254. <P> <H3>
  255. examples: </H3>
  256. <p><pre><tt>
  257. (x + y)**3;
  258. 3 2 2 3
  259. X + 3*X *Y + 3*X*Y + Y
  260. off nat;
  261. (x + y)**3;
  262. X**3 + 3*X**2*Y + 3*X*Y**2 + Y**3$
  263. on fort;
  264. (x + y)**3;
  265. ANS=X**3+3.*X**2*Y+3.*X*Y**2+Y**3
  266. </tt></pre><p>With <em>nat</em> off, a dollar sign is printed at the end of each
  267. expression.
  268. An output file written with <em>nat</em> off is ready to be read into REDUCE
  269. using the command
  270. <a href=r38_0200.html#r38_0231>in</a>.
  271. <P>
  272. <P>
  273. <P>
  274. <a name=r38_0309>
  275. <title>NERO</title></a>
  276. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  277. E"></p>
  278. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  279. <b>NERO</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  280. <P>
  281. <P>
  282. <P>
  283. When <em>nero</em> is on, zero assignments (such as matrix elements) are not
  284. printed.
  285. <P>
  286. <P>
  287. <P> <H3>
  288. examples: </H3>
  289. <p><pre><tt>
  290. matrix a;
  291. a := mat((1,0),(0,1));
  292. A(1,1) := 1
  293. A(1,2) := 0
  294. A(2,1) := 0
  295. A(2,2) := 1
  296. on nero;
  297. a;
  298. MAT(1,1) := 1
  299. MAT(2,2) := 1
  300. a(1,2); </tt></pre><p>nothing is printed.<p><pre><tt>
  301. b := 0; </tt></pre><p>nothing is printed.<p><pre><tt>
  302. off nero;
  303. b := 0;
  304. B := 0
  305. </tt></pre><p>
  306. <P>
  307. <P>
  308. <em>nero</em>is often used when dealing with large sparse matrices, to avoid
  309. being overloaded with zero assignments.
  310. <P>
  311. <P>
  312. <P>
  313. <a name=r38_0310>
  314. <title>NOARG</title></a>
  315. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  316. E"></p>
  317. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  318. <b>NOARG</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  319. <P>
  320. <P>
  321. <P>
  322. When
  323. <a href=r38_0250.html#r38_0279>dfprint</a> is on, expressions in the differentia
  324. tion operator
  325. <a href=r38_0100.html#r38_0148>df</a> are printed in a more ``natural'' notation
  326. , with the
  327. differentiation variables appearing as subscripts. When <em>noarg</em>
  328. is on (the default), the arguments of the differentiated operator are also
  329. suppressed.
  330. <P>
  331. <P>
  332. <P> <H3>
  333. examples: </H3>
  334. <p><pre><tt>
  335. operator f;
  336. df(f x,x);
  337. DF(F(X),X);
  338. on dfprint;
  339. ws;
  340. F
  341. X
  342. off noarg;
  343. ws;
  344. F(X)
  345. X
  346. </tt></pre><p>
  347. <a name=r38_0311>
  348. <title>NOLNR</title></a>
  349. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  350. E"></p>
  351. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  352. <b>NOLNR</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  353. <P>
  354. <P>
  355. <P>
  356. When <em>nolnr</em> is on, the linear properties of the integration operator
  357. <a href=r38_0150.html#r38_0154>int</a> are suppressed if the integral cannot be
  358. found in closed terms.
  359. <P>
  360. <P>
  361. REDUCE uses the linear properties of integration to attempt to break down
  362. an integral into manageable pieces. If an integral cannot be found in
  363. closed terms, these pieces are returned. When the <em>nolnr</em> switch is off,
  364. as many of the pieces as possible are integrated. When it is on, if any piece
  365. fails, the rest of them remain unevaluated.
  366. <P>
  367. <P>
  368. <P>
  369. <a name=r38_0312>
  370. <title>NOSPLIT</title></a>
  371. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  372. E"></p>
  373. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  374. <b>NOSPLIT</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  375. <P>
  376. <P>
  377. <P>
  378. Under normal circumstances, the printing routines try to break an expression
  379. across lines at a natural point. This is a fairly expensive process. If
  380. you are not overly concerned about where the end-of-line breaks come, you
  381. can speed up the printing of expressions by turning off the switch
  382. <em>nosplit</em>. This switch is normally on.
  383. <P>
  384. <P>
  385. <a name=r38_0313>
  386. <title>NUMVAL</title></a>
  387. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  388. E"></p>
  389. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  390. <b>NUMVAL</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  391. <P>
  392. <P>
  393. <P>
  394. With
  395. <a href=r38_0300.html#r38_0330>rounded</a> on, elementary functions with numeric
  396. al arguments
  397. will return a numerical answer where appropriate. If you wish to inhibit
  398. this evaluation, <em>numval</em> should be turned off. It is normally on.
  399. <P>
  400. <P>
  401. <P> <H3>
  402. examples: </H3>
  403. <p><pre><tt>
  404. on rounded;
  405. cos 3.4;
  406. - 0.966798192579
  407. off numval;
  408. cos 3.4;
  409. COS(3.4)
  410. </tt></pre><p>
  411. <a name=r38_0314>
  412. <title>OUTPUT</title></a>
  413. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  414. E"></p>
  415. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  416. <b>OUTPUT</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  417. <P>
  418. <P>
  419. <P>
  420. When <em>output</em> is off, no output is printed from any REDUCE calculation.
  421. The calculations have their usual effects other than printing. Default is
  422. <em>on</em>.
  423. <P>
  424. <P>
  425. Turn output <em>off</em> if you do not wish to see output when executing
  426. large files, or to save the time REDUCE spends formatting large expressions
  427. for display. Results are still available with
  428. <a href=r38_0150.html#r38_0184>ws</a>, or in their
  429. assigned variables.
  430. <P>
  431. <P>
  432. <P>
  433. <a name=r38_0315>
  434. <title>OVERVIEW</title></a>
  435. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  436. E"></p>
  437. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  438. <b>OVERVIEW</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  439. <P>
  440. <P>
  441. <P>
  442. When <em>overview</em> is on, the amount of detail reported by the factorizer
  443. switches
  444. <a href=r38_0300.html#r38_0335>trfac</a> and
  445. <a href=r38_0300.html#r38_0334>trallfac</a> is reduced.
  446. <P>
  447. <P>
  448. <a name=r38_0316>
  449. <title>PERIOD</title></a>
  450. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  451. E"></p>
  452. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  453. <b>PERIOD</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  454. <P>
  455. <P>
  456. <P>
  457. When <em>period</em> is on, periods are added after integers in
  458. Fortran-compatible output (when
  459. <a href=r38_0250.html#r38_0289>fort</a> is on). There is no effect
  460. when <em>fort</em> is off. Default is <em>on</em>.
  461. <P>
  462. <P>
  463. <a name=r38_0317>
  464. <title>PRECISE</title></a>
  465. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  466. E"></p>
  467. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  468. <b>PRECISE</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  469. <P>
  470. <P>
  471. <P>
  472. When the <em>precise</em> switch is on, simplification of roots of even
  473. powers returns absolute values, a more precise answer mathematically.
  474. Default is <em>on</em>.
  475. <P>
  476. <P>
  477. <P> <H3>
  478. examples: </H3>
  479. <p><pre><tt>
  480. sqrt(x**2);
  481. X
  482. (x**2)**(1/4);
  483. SQRT(X)
  484. on precise;
  485. sqrt(x**2);
  486. ABS(X)
  487. (x**2)**(1/4);
  488. SQRT(ABS(X))
  489. </tt></pre><p>In many types of mathematical work, simplification of powers and s
  490. urds can
  491. proceed by the fastest means of simplifying the exponents arithmetically.
  492. When it is important to you that the positive root be returned, turn
  493. <em>precise</em> on. One situation where this is important is when graphing
  494. square-root expressions such as sqrt(x^2+y^2) to
  495. avoid a spike caused by REDUCE simplifying
  496. sqrt(y^2) to y when x is
  497. zero.
  498. <P>
  499. <P>
  500. <P>
  501. <a name=r38_0318>
  502. <title>PRET</title></a>
  503. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  504. E"></p>
  505. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  506. <b>PRET</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  507. <P>
  508. <P>
  509. <P>
  510. When <em>pret</em> is on, input is printed in standard REDUCE format and then
  511. evaluated.
  512. <P>
  513. <P>
  514. <P> <H3>
  515. examples: </H3>
  516. <p><pre><tt>
  517. on pret;
  518. (x+1)^3;
  519. (x + 1)**3;
  520. 3 2
  521. X + 3*X + 3*X + 1
  522. procedure fac(n);
  523. if not (fixp(n) and n&gt;=0)
  524. then rederr &quot;Choose nonneg. integer only&quot;
  525. else for i := 0:n-1 product i+1;
  526. procedure fac n;
  527. if not (fixp n and n&gt;=0)
  528. then rederr &quot;Choose nonneg. integer only&quot;
  529. else for i := 0:n - 1 product i + 1;
  530. FAC
  531. fac 5;
  532. fac 5;
  533. 120
  534. </tt></pre><p>Note that all input is converted to lower case except strings (whi
  535. ch keep
  536. the same case) all operators with a single argument have had the
  537. parentheses removed, and all infix operators have had a space added on each
  538. side. In addition, syntactical constructs like
  539. <em>if</em>...<em>then</em>...<em>else</em> are printed in a standard format.
  540. <P>
  541. <P>
  542. <P>
  543. <a name=r38_0319>
  544. <title>PRI</title></a>
  545. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  546. E"></p>
  547. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  548. <b>PRI</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  549. <P>
  550. <P>
  551. <P>
  552. When <em>pri</em> is on, the declarations
  553. <a href=r38_0200.html#r38_0212>order</a> and
  554. <a href=r38_0250.html#r38_0287>factor</a> can
  555. be used, and the switches
  556. <a href=r38_0250.html#r38_0267>allfac</a>,
  557. <a href=r38_0250.html#r38_0280>div</a>,
  558. <a href=r38_0300.html#r38_0321>rat</a>,
  559. and
  560. <a href=r38_0300.html#r38_0326>revpri</a> take effect when they are on. Default
  561. is <em>on</em>.
  562. <P>
  563. <P>
  564. Printing of expressions is faster with <em>pri</em> off. The expressions are
  565. then returned in one standard form, without any of the display options that
  566. can be used to feature or display various parts of the expression. You can
  567. also gain insight into REDUCE's representation of expressions with
  568. <em>pri</em> off.
  569. <P>
  570. <P>
  571. <P>
  572. <a name=r38_0320>
  573. <title>RAISE</title></a>
  574. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  575. E"></p>
  576. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  577. <b>RAISE</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  578. <P>
  579. <P>
  580. <P>
  581. When <em>raise</em> is on, lower case letters are automatically converted to
  582. upper case on input. <em>raise</em> is normally on.
  583. <P>
  584. <P>
  585. This conversion affects the internal representation of the letter, and is
  586. independent of the case with which a letter is printed, which is normally
  587. lower case.
  588. <P>
  589. <P>
  590. <P>
  591. <a name=r38_0321>
  592. <title>RAT</title></a>
  593. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  594. E"></p>
  595. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  596. <b>RAT</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  597. <P>
  598. <P>
  599. <P>
  600. When the <em>rat</em> switch is on, and kernels have been selected to display
  601. with the
  602. <a href=r38_0250.html#r38_0287>factor</a> declaration, the denominator is printe
  603. d with each
  604. term rather than one common denominator at the end of an expression.
  605. <P>
  606. <P>
  607. <P> <H3>
  608. examples: </H3>
  609. <p><pre><tt>
  610. (x+1)/x + x**2/sin y;
  611. 3
  612. SIN(Y)*X + SIN(Y) + X
  613. ---------------------- factor x;
  614. SIN(Y)*X
  615. (x+1)/x + x**2/sin y;
  616. 3
  617. X + X*SIN(Y) + SIN(Y)
  618. ---------------------- on rat;
  619. X*SIN(Y)
  620. (x+1)/x + x**2/sin y;
  621. 2
  622. X -1
  623. ------ + 1 + X
  624. SIN(Y)
  625. </tt></pre><p>The <em>rat</em> switch only has effect when the
  626. <a href=r38_0300.html#r38_0319>pri</a> switch is on.
  627. When <em>pri</em> is off, regardless of the setting of <em>rat</em>, the
  628. printing behavior is as if <em>rat</em> were off. <em>rat</em> only has
  629. effect upon the display of expressions, not their internal form.
  630. <P>
  631. <P>
  632. <P>
  633. <a name=r38_0322>
  634. <title>RATARG</title></a>
  635. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  636. E"></p>
  637. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  638. <b>RATARG</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  639. <P>
  640. <P>
  641. <P>
  642. When <em>ratarg</em> is on, rational expressions can be given to operators
  643. such as
  644. <a href=r38_0100.html#r38_0141>coeff</a> and
  645. <a href=r38_0150.html#r38_0161>lterm</a> that normally require
  646. polynomials in one of their arguments. When <em>ratarg</em> is off, rational
  647. expressions cause an error message.
  648. <P>
  649. <P>
  650. <P> <H3>
  651. examples: </H3>
  652. <p><pre><tt>
  653. aa := x/y**2 + 1/x + y/x**2;
  654. 3 2 3
  655. X + X*Y + Y
  656. AA := --------------
  657. 2 2
  658. X *Y
  659. coeff(aa,x);
  660. 3 2 3
  661. X + X*Y + Y
  662. ***** -------------- invalid as POLYNOMIAL
  663. 2 2
  664. X *Y
  665. on ratarg;
  666. coeff(aa,x);
  667. Y 1 1
  668. {--,--,0,-----}
  669. 2 2 2 2
  670. X X X *Y
  671. </tt></pre><p>
  672. <a name=r38_0323>
  673. <title>RATIONAL</title></a>
  674. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  675. E"></p>
  676. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  677. <b>RATIONAL</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  678. <P>
  679. <P>
  680. <P>
  681. When <em>rational</em> is on, polynomial expressions with rational coefficients
  682. are produced.
  683. <P>
  684. <P>
  685. <P> <H3>
  686. examples: </H3>
  687. <p><pre><tt>
  688. x/2 + 3*y/4;
  689. 2*X + 3*Y
  690. ---------
  691. 4
  692. (x**2 + 5*x + 17)/2;
  693. 2
  694. X + 5*X + 17
  695. -------------
  696. 2
  697. on rational;
  698. x/2 + 3y/4;
  699. 1 3
  700. -*(X + -*Y)
  701. 2 2
  702. (x**2 + 5*x + 17)/2;
  703. 1 2
  704. -*(X + 5*X + 17)
  705. 2
  706. </tt></pre><p>By using <em>rational</em>, polynomial expressions with rational
  707. coefficients can be used in some commands that expect polynomials. With
  708. <em>rational</em> off, such a polynomial becomes a rational expression, with
  709. denominator the least common multiple of the denominators of the rational
  710. number coefficients. <P>
  711. <P>
  712. <P>
  713. <P>
  714. <a name=r38_0324>
  715. <title>RATIONALIZE</title></a>
  716. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  717. E"></p>
  718. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  719. <b>RATIONALIZE</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  720. <P>
  721. <P>
  722. <P>
  723. When the <em>rationalize</em> switch is on, denominators of rational expressions
  724. that contain complex numbers or root expressions are simplified by
  725. multiplication by their conjugates.
  726. <P>
  727. <P>
  728. <P> <H3>
  729. examples: </H3>
  730. <p><pre><tt>
  731. qq := (1+sqrt(3))/(sqrt(3)-7);
  732. SQRT(3) + 1
  733. QQ := -----------
  734. SQRT(3) - 7
  735. on rationalize;
  736. qq;
  737. - 4*SQRT(3) - 5
  738. ---------------
  739. 23
  740. 2/(4 + 6**(1/3));
  741. 2/3 1/3
  742. 6 - 4*6 + 16
  743. ------------------
  744. 35
  745. (i-1)/(i+3);
  746. 2*I - 1
  747. -------
  748. 5
  749. off rationalize;
  750. (i-1)/(i+3);
  751. I - 1
  752. ------
  753. I + 3
  754. </tt></pre><p>
  755. <a name=r38_0325>
  756. <title>RATPRI</title></a>
  757. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  758. E"></p>
  759. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  760. <b>RATPRI</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  761. <P>
  762. <P>
  763. <P>
  764. When the <em>ratpri</em> switch is on, rational expressions and fractions are
  765. printed as two lines separated by a fraction bar, rather than in a linear
  766. style. Default is <em>on</em>.
  767. <P>
  768. <P>
  769. <P> <H3>
  770. examples: </H3>
  771. <p><pre><tt>
  772. 3/17;
  773. 3
  774. --
  775. 17
  776. 2/b + 3/y;
  777. 3*B + 2*Y
  778. ---------
  779. B*Y
  780. off ratpri;
  781. 3/17;
  782. 3/17
  783. 2/b + 3/y;
  784. (3*B + 2*Y)/(B*Y)
  785. </tt></pre><p>
  786. <a name=r38_0326>
  787. <title>REVPRI</title></a>
  788. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  789. E"></p>
  790. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  791. <b>REVPRI</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  792. <P>
  793. <P>
  794. <P>
  795. When the <em>revpri</em> switch is on, terms are printed in reverse order from
  796. the normal printing order.
  797. <P>
  798. <P>
  799. <P> <H3>
  800. examples: </H3>
  801. <p><pre><tt>
  802. x**5 + x**2 + 18 + sqrt(y);
  803. 5 2
  804. SQRT(Y) + X + X + 18
  805. a + b + c + w;
  806. A + B + C + W
  807. on revpri;
  808. x**5 + x**2 + 18 + sqrt(y);
  809. 2 5
  810. 17 + X + X + SQRT(Y)
  811. a + b + c + w;
  812. W + C + B + A
  813. </tt></pre><p>Turn <em>revpri</em> on when you want to display a polynomial in a
  814. scending
  815. rather than descending order.
  816. <P>
  817. <P>
  818. <P>
  819. <a name=r38_0327>
  820. <title>RLISP88</title></a>
  821. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  822. E"></p>
  823. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  824. <b>RLISP88</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  825. <P>
  826. <P>
  827. <P>
  828. Rlisp '88 is a superset of the Rlisp that has been traditionally used for
  829. the support of REDUCE. It is fully documented in the book Marti, J.B.,
  830. ``RLISP '88: An Evolutionary Approach to Program Design and Reuse'',
  831. World Scientific, Singapore (1993). It supports different looping
  832. constructs from the traditional Rlisp, and treats ``-'' as a letter unless
  833. separated by spaces. Turning on the switch <em>rlisp88</em> converts to
  834. Rlisp '88 parsing conventions in symbolic mode, and enables the use of
  835. Rlisp '88 extensions. Turning off the switch reverts to the traditional
  836. Rlisp and the previous mode ( (
  837. <a href=r38_0200.html#r38_0221>symbolic</a> or
  838. <a href=r38_0150.html#r38_0186>algebraic</a>)
  839. in force before <em>rlisp88</em> was turned on.
  840. <P>
  841. <P>
  842. <a name=r38_0328>
  843. <title>ROUNDALL</title></a>
  844. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  845. E"></p>
  846. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  847. <b>ROUNDALL</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  848. <P>
  849. <P>
  850. <P>
  851. In
  852. <a href=r38_0300.html#r38_0330>rounded</a> mode, rational numbers are normally c
  853. onverted to a
  854. floating point representation. If <em>roundall</em> is off, this conversion
  855. does not occur. <em>roundall</em> is normally <em>on</em>.
  856. <P>
  857. <P>
  858. <P> <H3>
  859. examples: </H3>
  860. <p><pre><tt>
  861. on rounded;
  862. 1/2;
  863. 0.5
  864. off roundall;
  865. </tt></pre><p>
  866. <a name=r38_0329>
  867. <title>ROUNDBF</title></a>
  868. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  869. E"></p>
  870. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  871. <b>ROUNDBF</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  872. <P>
  873. When
  874. <a href=r38_0300.html#r38_0330>rounded</a> is on, the normal defaults cause unde
  875. rflows to be
  876. converted to zero. If you really want the small number that results in
  877. such cases, <em>roundbf</em> can be turned on.
  878. <P>
  879. <P>
  880. <P> <H3>
  881. examples: </H3>
  882. <p><pre><tt>
  883. on rounded;
  884. exp(-100000.1^2);
  885. 0
  886. on roundbf;
  887. exp(-100000.1^2);
  888. 1.18441281937E-4342953505
  889. </tt></pre><p>If a polynomial is input in
  890. <a href=r38_0300.html#r38_0330>rounded</a> mode at the default
  891. precision into any
  892. <a href=r38_0400.html#r38_0439>roots</a> function, and it is not possible to
  893. represent any of the coefficients of the polynomial precisely in the
  894. system floating point representation, the switch <em>roundbf</em> will be
  895. automatically turned on. All rounded computation will use the internal
  896. bigfloat representation until the user subsequently turns <em>roundbf</em>
  897. off. (A message is output to indicate that this condition is in effect.)
  898. <P>
  899. <P>
  900. <P>
  901. <a name=r38_0330>
  902. <title>ROUNDED</title></a>
  903. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  904. E"></p>
  905. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  906. <b>ROUNDED</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  907. <P>
  908. <P>
  909. <P>
  910. When <em>rounded</em> is on, floating-point arithmetic is enabled, with
  911. precision initially at a system default value, which is usually 12 digits.
  912. The precise number can be found by the command
  913. <a href=r38_0200.html#r38_0214>precision</a>(0).
  914. <P> <H3>
  915. examples: </H3>
  916. <p><pre><tt>
  917. pi;
  918. PI
  919. 35/217;
  920. 5
  921. --
  922. 31
  923. on rounded;
  924. pi;
  925. 3.14159265359
  926. 35/217;
  927. 0.161
  928. sqrt(3);
  929. 1.73205080756
  930. </tt></pre><p><P>
  931. <P>
  932. If more than the default number of decimal places are required, use the
  933. <a href=r38_0200.html#r38_0214>precision</a> command to set the required number.
  934. <P>
  935. <P>
  936. <P>
  937. <a name=r38_0331>
  938. <title>SAVESTRUCTR</title></a>
  939. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  940. E"></p>
  941. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  942. <b>SAVESTRUCTR</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  943. <P>
  944. <P>
  945. <P>
  946. When <em>savestructr</em> is on, results of the
  947. <a href=r38_0150.html#r38_0181>structr</a> command are
  948. returned as a list whose first element is the representation for the
  949. expression and the remaining elements are equations showing the
  950. relationships of the generated variables.
  951. <P>
  952. <P>
  953. <P> <H3>
  954. examples: </H3>
  955. <p><pre><tt>
  956. off exp;
  957. structr((x+y)^3 + sin(x)^2);
  958. ANS3
  959. where
  960. 3 2
  961. ANS3 := ANS1 + ANS2
  962. ANS2 := SIN(X)
  963. ANS1 := X + Y
  964. ans3;
  965. ANS3
  966. on savestructr;
  967. structr((x+y)^{3} + sin(x)^{2});
  968. 3 2
  969. ANS3,ANS3=ANS1 + ANS2 ,ANS2=SIN(X),ANS1=X + Y
  970. ans3 where rest ws;
  971. 3 2
  972. (X + Y) + SIN(X)
  973. </tt></pre><p>In normal operation,
  974. <a href=r38_0150.html#r38_0181>structr</a> is only a display command. With
  975. <em>savestructr</em> on, you can access the various parts of the expression
  976. produced by <em>structr</em>.
  977. <P>
  978. <P>
  979. The generic system names use the stem <em>ANS</em>. You can change this to your
  980. own stem by the command
  981. <a href=r38_0200.html#r38_0225>varname</a>. REDUCE adds integers to this stem
  982. to make unique identifiers.
  983. <P>
  984. <P>
  985. <P>
  986. <a name=r38_0332>
  987. <title>SOLVESINGULAR</title></a>
  988. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  989. E"></p>
  990. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  991. <b>SOLVESINGULAR</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  992. <P>
  993. <P>
  994. <P>
  995. When <em>solvesingular</em> is on, singular or underdetermined systems of
  996. linear equations are solved, using arbitrary real, complex or integer
  997. variables in the answer. Default is <em>on</em>.
  998. <P>
  999. <P>
  1000. <P> <H3>
  1001. examples: </H3>
  1002. <p><pre><tt>
  1003. solve({2x + y,4x + 2y},{x,y});
  1004. ARBCOMPLEX(1)
  1005. {{X= - -------------,Y=ARBCOMPLEX(1)}}
  1006. 2
  1007. solve({7x + 15y - z,x - y - z},{x,y,z});
  1008. 8*ARBCOMPLEX(3)
  1009. {{X=----------------
  1010. 11
  1011. 3*ARBCOMPLEX(3)
  1012. Y= - ----------------
  1013. 11
  1014. Z=ARBCOMPLEX(3)}}
  1015. off solvesingular;
  1016. solve({2x + y,4x + 2y},{x,y});
  1017. ***** SOLVE given singular equations
  1018. solve({7x + 15y - z,x - y - z},{x,y,z});
  1019. ***** SOLVE given singular equations
  1020. </tt></pre><p>The integer following the identifier
  1021. <a href=r38_0100.html#r38_0139>arbcomplex</a> above is assigned by
  1022. the system, and serves to identify the variable uniquely. It has no other
  1023. significance.
  1024. <P>
  1025. <P>
  1026. <P>
  1027. <a name=r38_0333>
  1028. <title>TIME</title></a>
  1029. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1030. E"></p>
  1031. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1032. <b>TIME</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  1033. <P>
  1034. <P>
  1035. <P>
  1036. When <em>time</em> is on, the system time used in executing each REDUCE
  1037. statement is printed after the answer is printed.
  1038. <P>
  1039. <P>
  1040. <P> <H3>
  1041. examples: </H3>
  1042. <p><pre><tt>
  1043. on time;
  1044. Time: 4940 ms
  1045. df(sin(x**2 + y),y);
  1046. 2
  1047. COS(X + Y )
  1048. Time: 180 ms
  1049. solve(x**2 - 6*y,x);
  1050. {X= - SQRT(Y)*SQRT(6),
  1051. X=SQRT(Y)*SQRT(6)}
  1052. Time: 320 ms
  1053. </tt></pre><p>When <em>time</em> is first turned on, the time since the beginnin
  1054. g of the
  1055. REDUCE session is printed. After that, the time used in computation,
  1056. (usually in milliseconds, though this is system dependent) is printed after
  1057. the results of each command. Idle time or time spent typing in commands is
  1058. not counted. If <em>time</em> is turned off, the first reading after it is
  1059. turned on again gives the time elapsed since it was turned off. The time
  1060. printed is CPU or wall clock time, depending on the system.
  1061. <P>
  1062. <P>
  1063. <P>
  1064. <a name=r38_0334>
  1065. <title>TRALLFAC</title></a>
  1066. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1067. E"></p>
  1068. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1069. <b>TRALLFAC</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  1070. <P>
  1071. <P>
  1072. <P>
  1073. When <em>trallfac</em> is on, a more detailed trace of factorizer calls is
  1074. generated.
  1075. <P>
  1076. <P>
  1077. The <em>trallfac</em> switch takes precedence over
  1078. <a href=r38_0300.html#r38_0335>trfac</a> if they are
  1079. both on. <em>trfac</em> gives a factorization trace with less detail in it.
  1080. When the
  1081. <a href=r38_0250.html#r38_0287>factor</a> switch is on also, all input polynomia
  1082. ls are sent to
  1083. the factorizer automatically and trace information is generated. The
  1084. <a href=r38_0200.html#r38_0233>out</a> command saves the results of the factorin
  1085. g, but not the trace.
  1086. <P>
  1087. <P>
  1088. <P>
  1089. <a name=r38_0335>
  1090. <title>TRFAC</title></a>
  1091. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1092. E"></p>
  1093. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1094. <b>TRFAC</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  1095. <P>
  1096. <P>
  1097. <P>
  1098. When <em>trfac</em> is on, a narrative trace of any calls to the factorizer is
  1099. generated. Default is <em>off</em>.
  1100. <P>
  1101. <P>
  1102. When the switch
  1103. <a href=r38_0250.html#r38_0287>factor</a> is on, and <em>trfac</em> is on, every
  1104. input
  1105. polynomial is sent to the factorizer, and a trace generated. With
  1106. <em>factor</em> off, only polynomials that are explicitly factored with the
  1107. command
  1108. <a href=r38_0150.html#r38_0151>factorize</a> generate trace information.
  1109. <P>
  1110. <P>
  1111. The
  1112. <a href=r38_0200.html#r38_0233>out</a> command saves the results of the factorin
  1113. g, but not
  1114. the trace. The
  1115. <a href=r38_0300.html#r38_0334>trallfac</a> switch gives trace information to a
  1116. greater level of detail.
  1117. <P>
  1118. <P>
  1119. <P>
  1120. <a name=r38_0336>
  1121. <title>TRIGFORM</title></a>
  1122. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1123. E"></p>
  1124. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1125. <b>TRIGFORM</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  1126. <P>
  1127. <P>
  1128. <P>
  1129. When
  1130. <a href=r38_0250.html#r38_0292>fullroots</a> is on,
  1131. <a href=r38_0150.html#r38_0179>solve</a> will compute the
  1132. roots of a cubic or quartic polynomial is closed form. When
  1133. <em>trigform</em> is on, the roots will be expressed by trigonometric
  1134. forms. Otherwise nested surds are used. Default is <em>on</em>.
  1135. <P>
  1136. <P>
  1137. <a name=r38_0337>
  1138. <title>TRINT</title></a>
  1139. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1140. E"></p>
  1141. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1142. <b>TRINT</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  1143. <P>
  1144. <P>
  1145. <P>
  1146. When <em>trint</em> is on, a narrative tracing various steps in the
  1147. integration process is produced.
  1148. <P>
  1149. <P>
  1150. The
  1151. <a href=r38_0200.html#r38_0233>out</a> command saves the results of the integrat
  1152. ion, but not the
  1153. trace.
  1154. <P>
  1155. <P>
  1156. <P>
  1157. <a name=r38_0338>
  1158. <title>TRNONLNR</title></a>
  1159. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1160. E"></p>
  1161. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1162. <b>TRNONLNR</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  1163. <P>
  1164. <P>
  1165. <P>
  1166. When <em>trnonlnr</em> is on, a narrative tracing various steps in
  1167. the process for solving non-linear equations is produced.
  1168. <P>
  1169. <P>
  1170. <em>trnonlnr</em>can only be used after the solve package has been loaded
  1171. (e.g., by an explicit call of
  1172. <a href=r38_0100.html#r38_0127>load_package</a>). The
  1173. <a href=r38_0200.html#r38_0233>out</a>
  1174. command saves the results of the equation solving, but not the trace.
  1175. <P>
  1176. <P>
  1177. <P>
  1178. <a name=r38_0339>
  1179. <title>VAROPT</title></a>
  1180. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1181. E"></p>
  1182. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1183. <b>VAROPT</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  1184. <P>
  1185. <P>
  1186. <P>
  1187. When <em>varopt</em> is on, the sequence of variables is optimized by
  1188. <a href=r38_0150.html#r38_0179>solve</a> with respect to execution speed. Otherw
  1189. ise, the sequence
  1190. given in the call to
  1191. <a href=r38_0150.html#r38_0179>solve</a> is preserved. Default is <em>on</em>.
  1192. <P>
  1193. <P>
  1194. In combination with the switch
  1195. <a href=r38_0250.html#r38_0268>arbvars</a>, <em>varopt</em> can be used
  1196. to control variable elimination.
  1197. <P>
  1198. <P>
  1199. <P> <H3>
  1200. examples: </H3>
  1201. <p><pre><tt>
  1202. off arbvars;
  1203. solve({x+2z,x-3y},{x,y,z});
  1204. x x
  1205. {{y=-,z= - -}}
  1206. 3 2
  1207. solve({x*y=1,z=x},{x,y,z});
  1208. 1
  1209. {{z=x,y=-}}
  1210. x
  1211. off varopt;
  1212. solve({x+2z,x-3y},{x,y,z});
  1213. 2*z
  1214. {{x= - 2*z,y= - ---}}
  1215. 3
  1216. solve({x*y=1,z=x},{x,y,z});
  1217. 1
  1218. {{y=-,x=z}}
  1219. z
  1220. </tt></pre><p>
  1221. <a name=r38_0340>
  1222. <title>General Switches</title></a>
  1223. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1224. E"></p>
  1225. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1226. <b>General Switches</b><menu>
  1227. <li><a href=r38_0250.html#r38_0264>SWITCHES introduction</a><P>
  1228. <li><a href=r38_0250.html#r38_0265>ALGINT switch</a><P>
  1229. <li><a href=r38_0250.html#r38_0266>ALLBRANCH switch</a><P>
  1230. <li><a href=r38_0250.html#r38_0267>ALLFAC switch</a><P>
  1231. <li><a href=r38_0250.html#r38_0268>ARBVARS switch</a><P>
  1232. <li><a href=r38_0250.html#r38_0269>BALANCED\_MOD switch</a><P>
  1233. <li><a href=r38_0250.html#r38_0270>BFSPACE switch</a><P>
  1234. <li><a href=r38_0250.html#r38_0271>COMBINEEXPT switch</a><P>
  1235. <li><a href=r38_0250.html#r38_0272>COMBINELOGS switch</a><P>
  1236. <li><a href=r38_0250.html#r38_0273>COMP switch</a><P>
  1237. <li><a href=r38_0250.html#r38_0274>COMPLEX switch</a><P>
  1238. <li><a href=r38_0250.html#r38_0275>CREF switch</a><P>
  1239. <li><a href=r38_0250.html#r38_0276>CRAMER switch</a><P>
  1240. <li><a href=r38_0250.html#r38_0277>DEFN switch</a><P>
  1241. <li><a href=r38_0250.html#r38_0278>DEMO switch</a><P>
  1242. <li><a href=r38_0250.html#r38_0279>DFPRINT switch</a><P>
  1243. <li><a href=r38_0250.html#r38_0280>DIV switch</a><P>
  1244. <li><a href=r38_0250.html#r38_0281>ECHO switch</a><P>
  1245. <li><a href=r38_0250.html#r38_0282>ERRCONT switch</a><P>
  1246. <li><a href=r38_0250.html#r38_0283>EVALLHSEQP switch</a><P>
  1247. <li><a href=r38_0250.html#r38_0284>EXP switch</a><P>
  1248. <li><a href=r38_0250.html#r38_0285>EXPANDLOGS switch</a><P>
  1249. <li><a href=r38_0250.html#r38_0286>EZGCD switch</a><P>
  1250. <li><a href=r38_0250.html#r38_0287>FACTOR switch</a><P>
  1251. <li><a href=r38_0250.html#r38_0288>FAILHARD switch</a><P>
  1252. <li><a href=r38_0250.html#r38_0289>FORT switch</a><P>
  1253. <li><a href=r38_0250.html#r38_0290>FORTUPPER switch</a><P>
  1254. <li><a href=r38_0250.html#r38_0291>FULLPREC switch</a><P>
  1255. <li><a href=r38_0250.html#r38_0292>FULLROOTS switch</a><P>
  1256. <li><a href=r38_0250.html#r38_0293>GC switch</a><P>
  1257. <li><a href=r38_0250.html#r38_0294>GCD switch</a><P>
  1258. <li><a href=r38_0250.html#r38_0295>HORNER switch</a><P>
  1259. <li><a href=r38_0250.html#r38_0296>IFACTOR switch</a><P>
  1260. <li><a href=r38_0250.html#r38_0297>INT switch</a><P>
  1261. <li><a href=r38_0250.html#r38_0298>INTSTR switch</a><P>
  1262. <li><a href=r38_0250.html#r38_0299>LCM switch</a><P>
  1263. <li><a href=r38_0300.html#r38_0300>LESSSPACE switch</a><P>
  1264. <li><a href=r38_0300.html#r38_0301>LIMITEDFACTORS switch</a><P>
  1265. <li><a href=r38_0300.html#r38_0302>LIST switch</a><P>
  1266. <li><a href=r38_0300.html#r38_0303>LISTARGS switch</a><P>
  1267. <li><a href=r38_0300.html#r38_0304>MCD switch</a><P>
  1268. <li><a href=r38_0300.html#r38_0305>MODULAR switch</a><P>
  1269. <li><a href=r38_0300.html#r38_0306>MSG switch</a><P>
  1270. <li><a href=r38_0300.html#r38_0307>MULTIPLICITIES switch</a><P>
  1271. <li><a href=r38_0300.html#r38_0308>NAT switch</a><P>
  1272. <li><a href=r38_0300.html#r38_0309>NERO switch</a><P>
  1273. <li><a href=r38_0300.html#r38_0310>NOARG switch</a><P>
  1274. <li><a href=r38_0300.html#r38_0311>NOLNR switch</a><P>
  1275. <li><a href=r38_0300.html#r38_0312>NOSPLIT switch</a><P>
  1276. <li><a href=r38_0300.html#r38_0313>NUMVAL switch</a><P>
  1277. <li><a href=r38_0300.html#r38_0314>OUTPUT switch</a><P>
  1278. <li><a href=r38_0300.html#r38_0315>OVERVIEW switch</a><P>
  1279. <li><a href=r38_0300.html#r38_0316>PERIOD switch</a><P>
  1280. <li><a href=r38_0300.html#r38_0317>PRECISE switch</a><P>
  1281. <li><a href=r38_0300.html#r38_0318>PRET switch</a><P>
  1282. <li><a href=r38_0300.html#r38_0319>PRI switch</a><P>
  1283. <li><a href=r38_0300.html#r38_0320>RAISE switch</a><P>
  1284. <li><a href=r38_0300.html#r38_0321>RAT switch</a><P>
  1285. <li><a href=r38_0300.html#r38_0322>RATARG switch</a><P>
  1286. <li><a href=r38_0300.html#r38_0323>RATIONAL switch</a><P>
  1287. <li><a href=r38_0300.html#r38_0324>RATIONALIZE switch</a><P>
  1288. <li><a href=r38_0300.html#r38_0325>RATPRI switch</a><P>
  1289. <li><a href=r38_0300.html#r38_0326>REVPRI switch</a><P>
  1290. <li><a href=r38_0300.html#r38_0327>RLISP88 switch</a><P>
  1291. <li><a href=r38_0300.html#r38_0328>ROUNDALL switch</a><P>
  1292. <li><a href=r38_0300.html#r38_0329>ROUNDBF switch</a><P>
  1293. <li><a href=r38_0300.html#r38_0330>ROUNDED switch</a><P>
  1294. <li><a href=r38_0300.html#r38_0331>SAVESTRUCTR switch</a><P>
  1295. <li><a href=r38_0300.html#r38_0332>SOLVESINGULAR switch</a><P>
  1296. <li><a href=r38_0300.html#r38_0333>TIME switch</a><P>
  1297. <li><a href=r38_0300.html#r38_0334>TRALLFAC switch</a><P>
  1298. <li><a href=r38_0300.html#r38_0335>TRFAC switch</a><P>
  1299. <li><a href=r38_0300.html#r38_0336>TRIGFORM switch</a><P>
  1300. <li><a href=r38_0300.html#r38_0337>TRINT switch</a><P>
  1301. <li><a href=r38_0300.html#r38_0338>TRNONLNR switch</a><P>
  1302. <li><a href=r38_0300.html#r38_0339>VAROPT switch</a><P>
  1303. </menu>
  1304. <a name=r38_0341>
  1305. <title>COFACTOR</title></a>
  1306. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1307. E"></p>
  1308. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1309. <b>COFACTOR</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1310. <P>
  1311. <P>
  1312. <P>
  1313. The operator <em>cofactor</em> returns the cofactor of the element in row
  1314. &lt;row&gt; and column &lt;column&gt; of a
  1315. <a href=r38_0300.html#r38_0345>matrix</a>. Errors occur
  1316. if &lt;row&gt; or &lt;column&gt; do not evaluate to integer expressions or if
  1317. the matrix is not square.
  1318. <P>
  1319. <P>
  1320. <P> <H3>
  1321. syntax: </H3>
  1322. <em>cofactor</em>(&lt;matrix\_expression&gt;,&lt;row&gt;,&lt;column&gt;)
  1323. <P>
  1324. <P>
  1325. <P>
  1326. <P> <H3>
  1327. examples: </H3>
  1328. <p><pre><tt>
  1329. cofactor(mat((a,b,c),(d,e,f),(p,q,r)),2,2);
  1330. A*R - C*P
  1331. cofactor(mat((a,b,c),(d,e,f)),1,1);
  1332. ***** non-square matrix
  1333. </tt></pre><p>
  1334. <a name=r38_0342>
  1335. <title>DET</title></a>
  1336. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1337. E"></p>
  1338. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1339. <b>DET</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1340. <P>
  1341. <P>
  1342. <P>
  1343. The <em>det</em> operator returns the determinant of its
  1344. (square
  1345. <a href=r38_0300.html#r38_0345>matrix</a>) argument.
  1346. <P>
  1347. <P>
  1348. <P> <H3>
  1349. syntax: </H3>
  1350. <em>det</em>(&lt;expression&gt;) or <em>det</em> &lt;expression&gt;
  1351. <P>
  1352. <P>
  1353. <P>
  1354. &lt;expression&gt; must evaluate to a square matrix.
  1355. <P>
  1356. <P>
  1357. <P> <H3>
  1358. examples: </H3>
  1359. <p><pre><tt>
  1360. matrix m,n;
  1361. m := mat((a,b),(c,d));
  1362. M(1,1) := A
  1363. M(1,2) := B
  1364. M(2,1) := C
  1365. M(2,2) := D
  1366. det m;
  1367. A*D - B*C
  1368. n := mat((1,2),(1,2));
  1369. N(1,1) := 1
  1370. N(1,2) := 2
  1371. N(2,1) := 1
  1372. N(2,2) := 2
  1373. det(n);
  1374. 0
  1375. det(5);
  1376. 5
  1377. </tt></pre><p>Given a numerical argument, <em>det</em> returns the number. Howev
  1378. er, given a
  1379. variable name that has not been declared of type matrix, or a non-square
  1380. matrix, <em>det</em> returns an error message.
  1381. <P>
  1382. <P>
  1383. <P>
  1384. <a name=r38_0343>
  1385. <title>MAT</title></a>
  1386. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1387. E"></p>
  1388. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1389. <b>MAT</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1390. <P>
  1391. <P>
  1392. <P>
  1393. The <em>mat</em> operator is used to represent a two-dimensional
  1394. <a href=r38_0300.html#r38_0345>matrix</a>.
  1395. <P> <H3>
  1396. syntax: </H3>
  1397. <P>
  1398. <P>
  1399. <em>mat</em>((&lt;expr&gt;{,&lt;expr&gt;}*) {(&lt;expr&gt;{<em>,</em>&lt;expr
  1400. &gt;}*)}*)
  1401. <P>
  1402. <P>
  1403. <P>
  1404. &lt;expr&gt; may be any valid REDUCE scalar expression.
  1405. <P>
  1406. <P>
  1407. <P> <H3>
  1408. examples: </H3>
  1409. <p><pre><tt>
  1410. mat((1,2),(3,4));
  1411. MAT(1,1) := 1
  1412. MAT(2,3) := 2
  1413. MAT(2,1) := 3
  1414. MAT(2,2) := 4
  1415. mat(2,1);
  1416. ***** Matrix mismatch
  1417. Cont? (Y or N)
  1418. matrix qt;
  1419. qt := ws;
  1420. QT(1,1) := 1
  1421. QT(1,2) := 2
  1422. QT(2,1) := 3
  1423. QT(2,2) := 4
  1424. matrix a,b;
  1425. a := mat((x),(y),(z));
  1426. A(1,1) := X
  1427. A(2,1) := Y
  1428. A(3,1) := Z
  1429. b := mat((sin x,cos x,1));
  1430. B(1,1) := SIN(X)
  1431. B(1,2) := COS(X)
  1432. B(1,3) := 1
  1433. </tt></pre><p>Matrices need not have a size declared (unlike arrays). <em>mat
  1434. </em>
  1435. redimensions a matrix variable as needed. It is necessary, of course,
  1436. that all rows be the same length. An anonymous matrix, as shown in the
  1437. first example, must be named before it can be referenced (note error
  1438. message). When using <em>mat</em> to fill a 1 x n
  1439. matrix, the row of values must be inside a second set of parentheses, to
  1440. eliminate ambiguity.
  1441. <P>
  1442. <P>
  1443. <P>
  1444. <a name=r38_0344>
  1445. <title>MATEIGEN</title></a>
  1446. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1447. E"></p>
  1448. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1449. <b>MATEIGEN</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1450. <P>
  1451. <P>
  1452. <P>
  1453. The <em>mateigen</em> operator calculates the eigenvalue equation and the
  1454. corresponding eigenvectors of a
  1455. <a href=r38_0300.html#r38_0345>matrix</a>.
  1456. <P> <H3>
  1457. syntax: </H3>
  1458. <P>
  1459. <P>
  1460. <em>mateigen</em>(&lt;matrix-id&gt;,&lt;tag-id&gt;)
  1461. <P>
  1462. <P>
  1463. <P>
  1464. &lt;matrix-id&gt; must be a declared matrix of values, and &lt;tag-id&gt; must b
  1465. e
  1466. a legal REDUCE identifier.
  1467. <P>
  1468. <P>
  1469. <P> <H3>
  1470. examples: </H3>
  1471. <p><pre><tt>
  1472. aa := mat((2,5),(1,0))$
  1473. mateigen(aa,alpha);
  1474. 2
  1475. {{ALPHA - 2*ALPHA - 5,
  1476. 1,
  1477. 5*ARBCOMPLEX(1)
  1478. MAT(1,1) := ---------------,
  1479. ALPHA - 2
  1480. MAT(2,1) := ARBCOMPLEX(1)
  1481. }}
  1482. charpoly := first first ws;
  1483. 2
  1484. CHARPOLY := ALPHA - 2*ALPHA - 5
  1485. bb := mat((1,0,1),(1,1,0),(0,0,1))$
  1486. mateigen(bb,lamb);
  1487. {{LAMB - 1,3,
  1488. [ 0 ]
  1489. [ARBCOMPLEX(2)]
  1490. [ 0 ]
  1491. }}
  1492. </tt></pre><p>The <em>mateigen</em> operator returns a list of lists of three
  1493. elements. The first element is a square free factor of the characteristic
  1494. polynomial; the second element is its multiplicity; and the third element
  1495. is the corresponding eigenvector. If the characteristic polynomial can be
  1496. completely factored, the product of the first elements of all the sublists
  1497. will produce the minimal polynomial. You can access the various parts of
  1498. the answer with the usual list access operators.
  1499. <P>
  1500. <P>
  1501. If the matrix is degenerate, more than one eigenvector can be produced for
  1502. the same eigenvalue, as shown by more than one arbitrary variable in the
  1503. eigenvector. The identification numbers of the arbitrary complex variables
  1504. shown in the examples above may not be the same as yours. Note that since
  1505. <em>lambda</em> is a reserved word in REDUCE, you cannot use it as a
  1506. tag-id for this operator.
  1507. <P>
  1508. <P>
  1509. <P>
  1510. <a name=r38_0345>
  1511. <title>MATRIX</title></a>
  1512. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1513. E"></p>
  1514. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1515. <b>MATRIX</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>declaration</b><P>
  1516. <P>
  1517. Identifiers are declared to be of type <em>matrix</em>.
  1518. <P> <H3>
  1519. syntax: </H3>
  1520. <P>
  1521. <P>
  1522. <em>matrix</em>&lt;identifier&gt; _ _ _ option (&lt;index&gt;,&lt;index&gt;)
  1523. <P>
  1524. <P>
  1525. {,&lt;identifier&gt; _ _ _ option
  1526. (&lt;index&gt;,&lt;index&gt;)}*
  1527. <P>
  1528. <P>
  1529. <P>
  1530. &lt;identifier&gt; must not be an already-defined operator or array or
  1531. the name of a scalar variable. Dimensions are optional, and if used appear
  1532. inside parentheses. &lt;index&gt; must be a positive integer.
  1533. <P>
  1534. <P>
  1535. <P> <H3>
  1536. examples: </H3>
  1537. <p><pre><tt>
  1538. matrix a,b(1,4),c(4,4);
  1539. b(1,1);
  1540. 0
  1541. a(1,1);
  1542. ***** Matrix A not set
  1543. a := mat((x0,y0),(x1,y1));
  1544. A(1,1) := X0
  1545. A(1,2) := Y0
  1546. A(2,1) := X0
  1547. A(2,2) := X1
  1548. length a;
  1549. {2,2}
  1550. b := a**2;
  1551. 2
  1552. B(1,1) := X0 + X1*Y0
  1553. B(1,2) := Y0*(X0 + Y1)
  1554. B(2,1) := X1*(X0 + Y1)
  1555. 2
  1556. B(2,2) := X1*Y0 + Y1
  1557. </tt></pre><p>When a matrix variable has not been dimensioned, matrix elements c
  1558. annot be
  1559. referenced until the matrix is set by the
  1560. <a href=r38_0300.html#r38_0343>mat</a> operator. When a
  1561. matrix is dimensioned in its declaration, matrix elements are set to 0.
  1562. Matrix elements cannot stand for themselves. When you use
  1563. <a href=r38_0150.html#r38_0199>let</a> on
  1564. a matrix element, there is no effect unless the element contains a
  1565. constant, in which case an error message is returned. The same behavior
  1566. occurs with
  1567. <a href=r38_0150.html#r38_0189>clear</a>. Do &lt;not&gt; use
  1568. <a href=r38_0150.html#r38_0189>clear</a> to try to
  1569. set a matrix element to 0.
  1570. <a href=r38_0150.html#r38_0199>let</a> statements can be applied to
  1571. matrices as a whole, if the right-hand side of the expression is a matrix
  1572. expression, and the left-hand side identifier has been declared to be a matrix.
  1573. <P>
  1574. <P>
  1575. Arithmetical operators apply to matrices of the correct dimensions. The
  1576. operators <em>+</em> and <em>-</em> can be used with matrices of the same
  1577. dimensions. The operator <em>*</em> can be used to multiply
  1578. m x n matrices by n x p
  1579. matrices. Matrix multiplication is non-commutative. Scalars can also be
  1580. multiplied with matrices, with the result that each element of the matrix
  1581. is multiplied by the scalar. The operator <em>/</em> applied to two
  1582. matrices computes the first matrix multiplied by the inverse of the
  1583. second, if the inverse exists, and produces an error message otherwise.
  1584. Matrices can be divided by scalars, which results in dividing each element
  1585. of the matrix. Scalars can also be divided by matrices when the matrices
  1586. are invertible, and the result is the multiplication of the scalar by the
  1587. inverse of the matrix. Matrix inverses can by found by <em>1/A</em> or
  1588. <em>/A</em>, where <em>A</em> is a matrix. Square matrices can be raised to
  1589. positive integer powers, and also to negative integer powers if they are
  1590. nonsingular.
  1591. <P>
  1592. <P>
  1593. When a matrix variable is assigned to the results of a calculation, the
  1594. matrix is redimensioned if necessary.
  1595. <P>
  1596. <P>
  1597. <P>
  1598. <a name=r38_0346>
  1599. <title>NULLSPACE</title></a>
  1600. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1601. E"></p>
  1602. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1603. <b>NULLSPACE</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1604. <P>
  1605. <P>
  1606. <P>
  1607. <P> <H3>
  1608. syntax: </H3>
  1609. <em>nullspace</em>(&lt;matrix\_expression&gt;)
  1610. <P>
  1611. <P>
  1612. <P>
  1613. &lt;nullspace&gt; calculates for its
  1614. <a href=r38_0300.html#r38_0345>matrix</a> argument,
  1615. <em>a</em>, a list of
  1616. linear independent vectors (a basis) whose linear combinations satisfy the
  1617. equation a x = 0. The basis is provided in a form such that as many
  1618. upper components as possible are isolated.
  1619. <P>
  1620. <P>
  1621. <P> <H3>
  1622. examples: </H3>
  1623. <p><pre><tt>
  1624. nullspace mat((1,2,3,4),(5,6,7,8));
  1625. {
  1626. [ 1 ]
  1627. [ ]
  1628. [ 0 ]
  1629. [ ]
  1630. [ - 3]
  1631. [ ]
  1632. [ 2 ]
  1633. ,
  1634. [ 0 ]
  1635. [ ]
  1636. [ 1 ]
  1637. [ ]
  1638. [ - 2]
  1639. [ ]
  1640. [ 1 ]
  1641. }
  1642. </tt></pre><p>Note that with <em>b := nullspace a</em>, the expression <em>lengt
  1643. h b</em> is
  1644. the nullity/ of A, and that <em>second length a - length b</em>
  1645. calculates the rank/ of A. The rank of a matrix expression can
  1646. also be found more directly by the
  1647. <a href=r38_0300.html#r38_0347>rank</a> operator.
  1648. <P>
  1649. <P>
  1650. In addition to the REDUCE matrix form, <em>nullspace</em> accepts as input a
  1651. matrix given as a
  1652. <a href=r38_0050.html#r38_0053>list</a> of lists, that is interpreted as a row m
  1653. atrix. If
  1654. that form of input is chosen, the vectors in the result will be
  1655. represented by lists as well. This additional input syntax facilitates
  1656. the use of <em>nullspace</em> in applications different from classical linear
  1657. algebra.
  1658. <P>
  1659. <P>
  1660. <P>
  1661. <a name=r38_0347>
  1662. <title>RANK</title></a>
  1663. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1664. E"></p>
  1665. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1666. <b>RANK</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1667. <P>
  1668. <P>
  1669. <P>
  1670. <P> <H3>
  1671. syntax: </H3>
  1672. <em>rank</em>(&lt;matrix\_expression&gt;)
  1673. <P>
  1674. <P>
  1675. <P>
  1676. <em>rank</em>calculates the rank of its matrix argument.
  1677. <P>
  1678. <P>
  1679. <P> <H3>
  1680. examples: </H3>
  1681. <p><pre><tt>
  1682. rank mat((a,b,c),(d,e,f));
  1683. 2
  1684. </tt></pre><p>The argument to <em>rank</em> can also be a
  1685. <a href=r38_0050.html#r38_0053>list</a> of lists, interpreted
  1686. either as a row matrix or a set of equations. If that form of input is
  1687. chosen, the vectors in the result will be represented by lists as well.
  1688. This additional input syntax facilitates the use of <em>rank</em> in
  1689. applications different from classical linear algebra.
  1690. <P>
  1691. <P>
  1692. <P>
  1693. <a name=r38_0348>
  1694. <title>TP</title></a>
  1695. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1696. E"></p>
  1697. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1698. <b>TP</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1699. <P>
  1700. <P>
  1701. <P>
  1702. The <em>tp</em> operator returns the transpose of its
  1703. <a href=r38_0300.html#r38_0345>matrix</a>
  1704. argument.
  1705. <P> <H3>
  1706. syntax: </H3>
  1707. <P>
  1708. <P>
  1709. <em>tp</em>&lt;identifier&gt; or <em>tp</em>(&lt;identifier&gt;)
  1710. <P>
  1711. <P>
  1712. <P>
  1713. &lt;identifier&gt; must be a matrix, which either has had its dimensions set
  1714. in its declaration, or has had values put into it by <em>mat</em>.
  1715. <P>
  1716. <P>
  1717. <P> <H3>
  1718. examples: </H3>
  1719. <p><pre><tt>
  1720. matrix m,n;
  1721. m := mat((1,2,3),(4,5,6))$
  1722. n := tp m;
  1723. N(1,1) := 1
  1724. N(1,2) := 4
  1725. N(2,1) := 2
  1726. N(2,2) := 5
  1727. N(3,1) := 3
  1728. N(3,2) := 6
  1729. </tt></pre><p>In an assignment statement involving <em>tp</em>, the matrix ident
  1730. ifier on the
  1731. left-hand side is redimensioned to the correct size for the transpose.
  1732. <P>
  1733. <P>
  1734. <P>
  1735. <a name=r38_0349>
  1736. <title>TRACE</title></a>
  1737. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1738. E"></p>
  1739. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1740. <b>TRACE</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1741. <P>
  1742. <P>
  1743. <P>
  1744. The <em>trace</em> operator finds the trace of its
  1745. <a href=r38_0300.html#r38_0345>matrix</a> argument.
  1746. <P> <H3>
  1747. syntax: </H3>
  1748. <P>
  1749. <P>
  1750. <em>trace</em>(&lt;expression&gt;) or <em>trace</em> &lt;simple\_expression&gt;
  1751. <P>
  1752. <P>
  1753. <P>
  1754. &lt;expression&gt; or &lt;simple\_expression&gt; must evaluate to a square
  1755. matrix.
  1756. <P>
  1757. <P>
  1758. <P> <H3>
  1759. examples: </H3>
  1760. <p><pre><tt>
  1761. matrix a;
  1762. a := mat((x1,y1),(x2,y2))$
  1763. trace a;
  1764. X1 + Y2
  1765. </tt></pre><p>The trace is the sum of the entries along the diagonal of a square
  1766. matrix.
  1767. Given a non-matrix expression, or a non-square matrix, <em>trace</em> returns
  1768. an error message.
  1769. <P>
  1770. <P>
  1771. <P>