r38_0200.html 70 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080
  1. <a name=r38_0200>
  2. <title>LINEAR</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>LINEAR</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>declaration</b><P>
  7. <P>
  8. <P>
  9. <P>
  10. An operator can be declared linear in its first argument over powers of
  11. its second argument by the declaration <em>linear.</em>
  12. <P> <H3>
  13. syntax: </H3>
  14. <P>
  15. <P>
  16. <em>linear</em>&lt;operator&gt;{<em>,</em>&lt;operator&gt;}*
  17. <P>
  18. <P>
  19. <P>
  20. &lt;operator&gt; must have been declared to be an operator. Be careful not
  21. to use a system operator name, because this command may change its definition.
  22. The operator being declared must have at least two arguments, and the
  23. second one must be a
  24. <a href=r38_0001.html#r38_0002>kernel</a>.
  25. <P>
  26. <P>
  27. <P> <H3>
  28. examples: </H3>
  29. <p><pre><tt>
  30. operator f;
  31. linear f;
  32. f(0,x);
  33. 0
  34. f(-y,x);
  35. - F(1,X)*Y
  36. f(y+z,x);
  37. F(1,X)*(Y + Z)
  38. f(y*z,x);
  39. F(1,X)*Y*Z
  40. depend z,x;
  41. f(y*z,x);
  42. F(Z,X)*Y
  43. f(y/z,x);
  44. 1
  45. F(-,X)*Y
  46. Z
  47. depend y,x;
  48. f(y/z,x);
  49. Y
  50. F(-,X)
  51. Z
  52. nodepend z,x;
  53. f(y/z,x);
  54. F(Y,X)
  55. ------
  56. Z
  57. f(2*e**sin(x),x);
  58. SIN(X)
  59. 2*F(E ,X)
  60. </tt></pre><p>Even when the operator has not had its functionality attached, it
  61. exhibits
  62. linear properties as shown in the examples. Notice the difference when
  63. dependencies are added. Dependencies are also in effect when the operator's
  64. first argument contains its second, as in the last line above.
  65. <P>
  66. <P>
  67. For a fully-developed example of the use of linear operators, refer to the
  68. article in the &lt;Journal of Computational Physics&gt;, Vol. 14 (1974), pp.
  69. 301-317, ``Analytic Computation of Some Integrals in Fourth Order Quantum
  70. Electrodynamics,&quot; by J.A. Fox and A.C. Hearn. The article includes the
  71. complete listing of REDUCE procedures used for this work.
  72. <P>
  73. <P>
  74. <P>
  75. <a name=r38_0201>
  76. <title>LINELENGTH</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>LINELENGTH</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>declaration</b><P>
  81. <P>
  82. <P>
  83. <P>
  84. The <em>linelength</em> declaration sets the length of the output line. Default
  85. is 80.
  86. <P> <H3>
  87. syntax: </H3>
  88. <P>
  89. <P>
  90. <em>linelength</em>&lt;expression&gt;
  91. <P>
  92. <P>
  93. <P>
  94. To change the linelength,
  95. &lt;expression&gt; must evaluate to a positive integer less than 128
  96. (although this varies from system to system), and should not be less than
  97. 20 or so for proper operation.
  98. <P>
  99. <P>
  100. <em>linelength</em>returns the previous linelength. If you want the current
  101. linelength value, but not change it, say <em>linelength nil</em>.
  102. <P>
  103. <P>
  104. <P>
  105. <a name=r38_0202>
  106. <title>LISP</title></a>
  107. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  108. E"></p>
  109. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  110. <b>LISP</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>command</b><P>
  111. <P>
  112. The <em>lisp</em> command changes REDUCE's mode of operation to symbolic. When
  113. <em>lisp</em> is followed by an expression, that expression is evaluated in
  114. symbolic mode, but REDUCE's mode is not changed. This command is
  115. equivalent to
  116. <a href=r38_0200.html#r38_0221>symbolic</a>.
  117. <P>
  118. <P>
  119. <P> <H3>
  120. examples: </H3>
  121. <p><pre><tt>
  122. lisp;
  123. NIL
  124. car '(a b c d e);
  125. A
  126. algebraic;
  127. c := (lisp car '(first second))**2;
  128. 2
  129. C := FIRST
  130. </tt></pre><p>
  131. <a name=r38_0203>
  132. <title>LISTARGP</title></a>
  133. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  134. E"></p>
  135. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  136. <b>LISTARGP</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>declaration</b><P>
  137. <P>
  138. <P>
  139. <P>
  140. <P> <H3>
  141. syntax: </H3>
  142. <em>listargp</em>&lt;operator&gt;{<em>,</em>&lt;operator&gt;}*
  143. <P>
  144. <P>
  145. <P>
  146. If an operator other than those specifically defined for lists is given a
  147. single argument that is a
  148. <a href=r38_0050.html#r38_0053>list</a>, then the result of this
  149. operation will be a list in which that operator is applied to each element
  150. of the list.
  151. This process can be inhibited for a specific operator, or list of operators,
  152. by using the declaration <em>listargp</em>.
  153. <P>
  154. <P>
  155. <P> <H3>
  156. examples: </H3>
  157. <p><pre><tt>
  158. log {a,b,c};
  159. LOG(A),LOG(B),LOG(C)
  160. listargp log;
  161. log {a,b,c};
  162. LOG(A,B,C)
  163. </tt></pre><p>It is possible to inhibit such distribution globally by turning on
  164. the
  165. switch
  166. <a href=r38_0300.html#r38_0303>listargs</a>. In addition, if an operator has mor
  167. e than one
  168. argument, no such distribution occurs, so <em>listargp</em> has no effect.
  169. <P>
  170. <P>
  171. <P>
  172. <a name=r38_0204>
  173. <title>NODEPEND</title></a>
  174. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  175. E"></p>
  176. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  177. <b>NODEPEND</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>declaration</b><P>
  178. <P>
  179. <P>
  180. <P>
  181. The <em>nodepend</em> declaration removes the dependency declared with
  182. <a href=r38_0150.html#r38_0192>depend</a>.
  183. <P> <H3>
  184. syntax: </H3>
  185. <P>
  186. <P>
  187. <em>nodepend</em>&lt;dep-kernel&gt;{,&lt;kernel&gt;}+
  188. <P>
  189. <P>
  190. <P>
  191. <P>
  192. &lt;dep-kernel&gt; must be a kernel that has had a dependency declared upon the
  193. one or more other kernels that are its other arguments.
  194. <P>
  195. <P>
  196. <P> <H3>
  197. examples: </H3>
  198. <p><pre><tt>
  199. depend y,x,z;
  200. df(sin y,x);
  201. COS(Y)*DF(Y,X)
  202. df(sin y,x,z);
  203. COS(Y)*DF(Y,X,Z) - DF(Y,X)*DF(Y,Z)*SIN(Y)
  204. nodepend y,z;
  205. df(sin y,x);
  206. COS(Y)*DF(Y,X)
  207. df(sin y,x,z);
  208. 0
  209. </tt></pre><p>A warning message is printed if the dependency had not been declar
  210. ed by
  211. <em>depend</em>.
  212. <P>
  213. <P>
  214. <P>
  215. <a name=r38_0205>
  216. <title>MATCH</title></a>
  217. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  218. E"></p>
  219. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  220. <b>MATCH</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>command</b><P>
  221. <P>
  222. <P>
  223. <P>
  224. The <em>match</em> command is similar to the
  225. <a href=r38_0150.html#r38_0199>let</a> command, except
  226. that it matches only explicit powers in substitution.
  227. <P> <H3>
  228. syntax: </H3>
  229. <P>
  230. <P>
  231. <em>match</em>&lt;expr&gt; <em>=</em> &lt;expression&gt;{,&lt;expr&gt;
  232. <em>=</em>&lt;expression&gt;}*
  233. <P>
  234. <P>
  235. <P>
  236. &lt;expr&gt; is generally a term involving powers, and is limited by
  237. the rules for the
  238. <a href=r38_0150.html#r38_0199>let</a> command. &lt;expression&gt; may be
  239. any valid REDUCE scalar expression.
  240. <P>
  241. <P>
  242. <P> <H3>
  243. examples: </H3>
  244. <p><pre><tt>
  245. match c**2*a**2 = d;
  246. (a+c)**4;
  247. 4 3 3 4
  248. A + 4*A *C + 4*A*C + C + 6*D
  249. match a+b = c;
  250. a + 2*b;
  251. B + C
  252. (a + b + c)**2;
  253. 2 2 2
  254. A - B + 2*B*C + 3*C
  255. clear a+b;
  256. (a + b + c)**2;
  257. 2 2 2
  258. A + 2*A*B + 2*A*C + B + 2*B*C + C
  259. let p*r = s;
  260. match p*q = ss;
  261. (a + p*r)**2;
  262. 2 2
  263. A + 2*A*S + S
  264. (a + p*q)**2;
  265. 2 2 2
  266. A + 2*A*SS + P *Q
  267. </tt></pre><p>Note in the last example that <em>a + b</em> has been explicitly m
  268. atched
  269. after the squaring was done, replacing each single power of <em>a</em> by
  270. <em>c - b</em>. This kind of substitution, although following the rules, is
  271. confusing and could lead to unrecognizable results. It is better to use
  272. <em>match</em> with explicit powers or products only. <em>match</em> should
  273. not be used inside procedures for the same reasons that <em>let</em> should
  274. not be.
  275. <P>
  276. <P>
  277. Unlike
  278. <a href=r38_0150.html#r38_0199>let</a> substitutions, <em>match</em> substitutio
  279. ns are executed
  280. after all other operations are complete. The last example shows the
  281. difference. <em>match</em> commands can be cleared by using
  282. <a href=r38_0150.html#r38_0189>clear</a>,
  283. with exactly the expression that the original <em>match</em> took.
  284. <em>match</em> commands can also be done more generally with <em>for all</em>
  285. or
  286. <a href=r38_0150.html#r38_0195>forall</a>...<em>such that</em> commands.
  287. <P>
  288. <P>
  289. <P>
  290. <a name=r38_0206>
  291. <title>NONCOM</title></a>
  292. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  293. E"></p>
  294. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  295. <b>NONCOM</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>declaration</b><P>
  296. <P>
  297. <P>
  298. <P>
  299. <em>noncom</em>declares that already-declared operators are noncommutative
  300. under multiplication.
  301. <P> <H3>
  302. syntax: </H3>
  303. <P>
  304. <P>
  305. <em>noncom</em>&lt;operator&gt;{,&lt;operator&gt;}*
  306. <P>
  307. <P>
  308. <P>
  309. &lt;operator&gt; must have been declared an
  310. <a href=r38_0200.html#r38_0211>operator</a>, or a warning
  311. message is given.
  312. <P>
  313. <P>
  314. <P> <H3>
  315. examples: </H3>
  316. <p><pre><tt>
  317. operator f,h;
  318. noncom f;
  319. f(a)*f(b) - f(b)*f(a);
  320. F(A)*F(B) - F(B)*F(A)
  321. h(a)*h(b) - h(b)*h(a);
  322. 0
  323. operator comm;
  324. for all x,y such that x neq y and ordp(x,y)
  325. let f(x)*f(y) = f(y)*f(x) + comm(x,y);
  326. f(1)*f(2);
  327. F(1)*F(2)
  328. f(2)*f(1);
  329. COMM(2,1) + F(1)*F(2)
  330. </tt></pre><p>The last example introduces the commutator of f(x) and f(y)
  331. for all x and y. The equality check is to prevent an infinite loop. The
  332. operator f can have other functionality attached to it if desired, or it
  333. can remain an indeterminate operator.
  334. <P>
  335. <P>
  336. <P>
  337. <a name=r38_0207>
  338. <title>NONZERO</title></a>
  339. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  340. E"></p>
  341. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  342. <b>NONZERO</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>declaration</b><P>
  343. <P>
  344. <P>
  345. <P>
  346. <P> <H3>
  347. syntax: </H3>
  348. <em>nonzero</em>&lt;identifier&gt;{,&lt;identifier&gt;}*
  349. <P>
  350. <P>
  351. <P>
  352. If an
  353. <a href=r38_0200.html#r38_0211>operator</a> <em>f</em> is declared
  354. <a href=r38_0200.html#r38_0208>odd</a>, then <em>f(0)</em>
  355. is replaced by zero unless <em>f</em> is also declared non zero by the
  356. declaration <em>nonzero</em>.
  357. <P> <H3>
  358. examples: </H3>
  359. <p><pre><tt>
  360. odd f;
  361. f(0)
  362. 0
  363. nonzero f;
  364. f(0)
  365. F(0)
  366. </tt></pre><p><P>
  367. <P>
  368. <a name=r38_0208>
  369. <title>ODD</title></a>
  370. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  371. E"></p>
  372. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  373. <b>ODD</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>declaration</b><P>
  374. <P>
  375. <P>
  376. <P>
  377. <P> <H3>
  378. syntax: </H3>
  379. <em>odd</em>&lt;identifier&gt;{,&lt;identifier&gt;}*
  380. <P>
  381. <P>
  382. <P>
  383. This declaration is used to declare an operator odd in its first
  384. argument. Expressions involving an operator declared in this manner are
  385. transformed if the first argument contains a minus sign. Any other
  386. arguments are not affected.
  387. <P> <H3>
  388. examples: </H3>
  389. <p><pre><tt>
  390. odd f;
  391. f(-a)
  392. -F(A)
  393. f(-a,-b)
  394. -F(A,-B)
  395. f(a,-b)
  396. F(A,-B)
  397. </tt></pre><p><P>
  398. <P>
  399. If say <em>f</em> is declared odd, then <em>f(0)</em> is replaced by zero
  400. unless <em>f</em> is also declared non zero by the declaration
  401. <a href=r38_0200.html#r38_0207>nonzero</a>.
  402. <P>
  403. <P>
  404. <P>
  405. <a name=r38_0209>
  406. <title>OFF</title></a>
  407. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  408. E"></p>
  409. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  410. <b>OFF</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>command</b><P>
  411. <P>
  412. <P>
  413. <P>
  414. The <em>off</em> command is used to turn switches off.
  415. <P> <H3>
  416. syntax: </H3>
  417. <P>
  418. <P>
  419. <em>off</em>&lt;switch&gt;{,&lt;switch&gt;}*
  420. <P>
  421. <P>
  422. <P>
  423. &lt;switch&gt; can be any <em>switch</em> name. There is no problem if the
  424. switch is already off. If the switch name is mistyped, an error message is
  425. given.
  426. <P>
  427. <P>
  428. <a name=r38_0210>
  429. <title>ON</title></a>
  430. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  431. E"></p>
  432. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  433. <b>ON</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>command</b><P>
  434. <P>
  435. <P>
  436. <P>
  437. The <em>on</em> command is used to turn switches on.
  438. <P> <H3>
  439. syntax: </H3>
  440. <P>
  441. <P>
  442. <em>on</em>&lt;switch&gt;{,&lt;switch&gt;}*
  443. <P>
  444. <P>
  445. <P>
  446. &lt;switch&gt; can be any <em>switch</em> name. There is no problem if the
  447. switch is already on. If the switch name is mistyped, an error message is
  448. given.
  449. <P>
  450. <P>
  451. <a name=r38_0211>
  452. <title>OPERATOR</title></a>
  453. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  454. E"></p>
  455. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  456. <b>OPERATOR</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>declaration</b><P>
  457. <P>
  458. Use the <em>operator</em> declaration to declare your own operators.
  459. <P> <H3>
  460. syntax: </H3>
  461. <P>
  462. <P>
  463. <em>operator</em>&lt;identifier&gt;{,&lt;identifier&gt;}*
  464. <P>
  465. <P>
  466. <P>
  467. &lt;identifier&gt; can be any valid REDUCE identifier, which is not the name
  468. of a
  469. <a href=r38_0300.html#r38_0345>matrix</a>,
  470. <a href=r38_0150.html#r38_0188>array</a>, scalar variable or previously-defined
  471. operator.
  472. <P>
  473. <P>
  474. <P> <H3>
  475. examples: </H3>
  476. <p><pre><tt>
  477. operator dis,fac;
  478. let dis(~x,~y) = sqrt(x^2 + y^2);
  479. dis(1,2);
  480. SQRT(5)
  481. dis(a,10);
  482. 2
  483. SQRT(A + 100)
  484. on rounded;
  485. dis(1.5,7.2);
  486. 7.35459040329
  487. let fac(~n) = if n=0 then 1
  488. else if not(fixp n and n&gt;0)
  489. then rederr &quot;choose non-negative integer&quot;
  490. else for i := 1:n product i;
  491. fac(5);
  492. 120
  493. fac(-2);
  494. ***** choose non-negative integer
  495. </tt></pre><p>The first operator is the Euclidean distance metric, the distance
  496. of point
  497. (x,y) from the origin. The second operator is the factorial.
  498. <P>
  499. <P>
  500. Operators can have various properties assigned to them; they can be
  501. declared
  502. <a href=r38_0150.html#r38_0196>infix</a>,
  503. <a href=r38_0200.html#r38_0200>linear</a>,
  504. <a href=r38_0200.html#r38_0222>symmetric</a>,
  505. <a href=r38_0150.html#r38_0187>antisymmetric</a>, or
  506. <a href=r38_0200.html#r38_0206>noncom</a><em>mutative</em>.
  507. The default operator is prefix, nonlinear, and commutative.
  508. Precedence can also be assigned to operators using the declaration
  509. <a href=r38_0200.html#r38_0213>precedence</a>.
  510. <P>
  511. <P>
  512. Functionality is assigned to an operator by a
  513. <a href=r38_0150.html#r38_0199>let</a> statement or
  514. a
  515. <a href=r38_0150.html#r38_0195>forall</a>...<em>let</em> statement,
  516. (or possibly by a procedure with the name
  517. of the operator). Be careful not to redefine a system operator by
  518. accident. REDUCE permits you to redefine system operators, giving you a
  519. warning message that the operator was already defined. This flexibility
  520. allows you to add mathematical rules that do what you want them to do, but
  521. can produce odd or erroneous behavior if you are not careful.
  522. <P>
  523. <P>
  524. You can declare operators from inside
  525. <a href=r38_0050.html#r38_0055>procedure</a>s, as long as they
  526. are not local variables. Operators defined inside procedures are global.
  527. A formal parameter may be declared as an operator, and has the effect of
  528. declaring the calling variable as the operator.
  529. <P>
  530. <P>
  531. <P>
  532. <a name=r38_0212>
  533. <title>ORDER</title></a>
  534. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  535. E"></p>
  536. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  537. <b>ORDER</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>declaration</b><P>
  538. <P>
  539. <P>
  540. <P>
  541. The <em>order</em> declaration changes the order of precedence of kernels for
  542. display purposes only.
  543. <P> <H3>
  544. syntax: </H3>
  545. <P>
  546. <P>
  547. <em>order</em>&lt;identifier&gt;{,&lt;identifier&gt;}*
  548. <P>
  549. <P>
  550. <P>
  551. &lt;kernel&gt; must be a valid
  552. <a href=r38_0001.html#r38_0002>kernel</a> or
  553. <a href=r38_0200.html#r38_0211>operator</a> name
  554. complete with argument or a
  555. <a href=r38_0050.html#r38_0053>list</a> of such objects.
  556. <P>
  557. <P>
  558. <P> <H3>
  559. examples: </H3>
  560. <p><pre><tt>
  561. x + y + z + cos(a);
  562. COS(A) + X + Y + Z
  563. order z,y,x,cos(a);
  564. x + y + z + cos(a);
  565. Z + Y + X + COS(A)
  566. (x + y)**2;
  567. 2 2
  568. Y + 2*Y*X + X
  569. order nil;
  570. (z + cos(z))**2;
  571. 2 2
  572. COS(Z) + 2*COS(Z)*Z + Z
  573. </tt></pre><p><em>order</em>affects the printing order of the identifiers only;
  574. internal
  575. order is unchanged. Change internal order of evaluation with the
  576. declaration
  577. <a href=r38_0150.html#r38_0198>korder</a>. You can use <em>order</em> to feature
  578. variables
  579. or functions you are particularly interested in.
  580. <P>
  581. <P>
  582. Declarations made with <em>order</em> are cumulative: kernels in new order
  583. declarations are ordered behind those in previous declarations, and
  584. previous declarations retain their relative order. Of course, specific
  585. kernels named in new declarations are removed from previous ones and given
  586. the new priority. Return to the standard canonical printing order with the
  587. statement <em>order nil</em>.
  588. <P>
  589. <P>
  590. The print order specified by <em>order</em> commands is not in effect if the
  591. switch
  592. <a href=r38_0300.html#r38_0319>pri</a> is off.
  593. <P>
  594. <P>
  595. <P>
  596. <a name=r38_0213>
  597. <title>PRECEDENCE</title></a>
  598. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  599. E"></p>
  600. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  601. <b>PRECEDENCE</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>declaration</b><P>
  602. <P>
  603. <P>
  604. <P>
  605. The <em>precedence</em> declaration attaches a precedence to an infix operator.
  606. <P> <H3>
  607. syntax: </H3>
  608. <P>
  609. <P>
  610. <em>precedence</em>&lt;operator&gt;,&lt;known\_operator&gt;
  611. <P>
  612. <P>
  613. <P>
  614. &lt;operator&gt; should have been declared an operator but may be a REDUCE
  615. identifier that is not already an operator, array, or matrix.
  616. &lt;known\_operator&gt; must be a system infix operator or have had its
  617. precedence already declared.
  618. <P>
  619. <P>
  620. <P> <H3>
  621. examples: </H3>
  622. <p><pre><tt>
  623. operator f,h;
  624. precedence f,+;
  625. precedence h,*;
  626. a + f(1,2)*c;
  627. (1 F 2)*C + A
  628. a + h(1,2)*c;
  629. 1 H 2*C + A
  630. a*1 f 2*c;
  631. A F 2*C
  632. a*1 h 2*c;
  633. 1 H 2*A*C
  634. </tt></pre><p>The operator whose precedence is being declared is inserted into t
  635. he infix
  636. operator precedence list at the next higher place than &lt;known\_operator&gt;.
  637. <P>
  638. <P>
  639. Attaching a precedence to an operator has the side effect of declaring the
  640. operator to be infix. If the identifier argument for <em>precedence</em> has
  641. not been declared to be an operator, an attempt to use it causes an error
  642. message. After declaring it to be an operator, it becomes an infix operator
  643. with the precedence previously given. Infix operators may be used in prefix
  644. form; if they are used in infix form, a space must be left on each side of
  645. the operator to avoid ambiguity. Declared infix operators are always binary.
  646. <P>
  647. <P>
  648. To see the infix operator precedence list, enter symbolic mode and type
  649. <em>preclis!*;</em>. The lowest precedence operator is listed first.
  650. <P>
  651. <P>
  652. All prefix operators have precedence higher than infix operators.
  653. <P>
  654. <P>
  655. <P>
  656. <a name=r38_0214>
  657. <title>PRECISION</title></a>
  658. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  659. E"></p>
  660. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  661. <b>PRECISION</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>declaration</b><P>
  662. <P>
  663. <P>
  664. <P>
  665. The <em>precision</em> declaration sets the number of decimal places used when
  666. <a href=r38_0300.html#r38_0330>rounded</a> is on. Default is system dependent, a
  667. nd normally about 12.
  668. <P> <H3>
  669. syntax: </H3>
  670. <P>
  671. <P>
  672. <em>precision</em>(&lt;integer&gt;) or <em>precision</em> &lt;integer&gt;
  673. <P>
  674. <P>
  675. <P>
  676. &lt;integer&gt; must be a positive integer. When &lt;integer&gt; is 0, the
  677. current precision is displayed, but not changed. There is no upper limit,
  678. but precision of greater than several hundred causes unpleasantly slow
  679. operation on numeric calculations.
  680. <P>
  681. <P>
  682. <P> <H3>
  683. examples: </H3>
  684. <p><pre><tt>
  685. on rounded;
  686. 7/9;
  687. 0.777777777778
  688. precision 20;
  689. 20
  690. 7/9;
  691. 0.77777777777777777778
  692. sin(pi/4);
  693. 0.7071067811865475244
  694. </tt></pre><p>Trailing zeroes are dropped, so sometimes fewer than 20 decimal pl
  695. aces are
  696. printed as in the last example. Turn on the switch
  697. <a href=r38_0250.html#r38_0291>fullprec</a> if
  698. you want to print all significant digits. The
  699. <a href=r38_0300.html#r38_0330>rounded</a> mode
  700. carries calculations to two more places than given by <em>precision</em>, and
  701. rounds off.
  702. <P>
  703. <P>
  704. <P>
  705. <a name=r38_0215>
  706. <title>PRINT_PRECISION</title></a>
  707. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  708. E"></p>
  709. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  710. <b>PRINT\_PRECISION</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>declaration</b><P>
  711. <P>
  712. <P>
  713. <P>
  714. <P> <H3>
  715. syntax: </H3>
  716. <em>print_precision</em>(&lt;integer&gt;)
  717. or <em>print_precision</em> &lt;integer&gt;
  718. <P>
  719. <P>
  720. <P>
  721. In
  722. <a href=r38_0300.html#r38_0330>rounded</a> mode, numbers are normally printed to
  723. the specified
  724. precision. If the user wishes to print such numbers with less precision,
  725. the printing precision can be set by the declaration <em>print_precision</em>.
  726. <P>
  727. <P>
  728. <P> <H3>
  729. examples: </H3>
  730. <p><pre><tt>
  731. on rounded;
  732. 1/3;
  733. 0.333333333333
  734. print_precision 5;
  735. 1/3
  736. 0.33333
  737. </tt></pre><p>
  738. <a name=r38_0216>
  739. <title>REAL</title></a>
  740. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  741. E"></p>
  742. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  743. <b>REAL</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>declaration</b><P>
  744. <P>
  745. The <em>real</em> declaration must be made immediately after a
  746. <a href=r38_0001.html#r38_0040>begin</a> (or other variable declaration such as
  747. <a href=r38_0150.html#r38_0197>integer</a>
  748. and
  749. <a href=r38_0200.html#r38_0218>scalar</a>) and declares local integer variables.
  750. They are
  751. initialized to zero.
  752. <P> <H3>
  753. syntax: </H3>
  754. <P>
  755. <P>
  756. <em>real</em>&lt;identifier&gt;{,&lt;identifier&gt;}*
  757. <P>
  758. <P>
  759. <P>
  760. &lt;identifier&gt; may be any valid REDUCE identifier, except
  761. <em>t</em> or <em>nil</em>.
  762. <P>
  763. <P>
  764. Real variables remain local, and do not share values with variables of the
  765. same name outside the
  766. <a href=r38_0001.html#r38_0040>begin</a>...<em>end</em> block. When the
  767. block is finished, the variables are removed. You may use the words
  768. <a href=r38_0150.html#r38_0197>integer</a> or
  769. <a href=r38_0200.html#r38_0218>scalar</a> in the place of <em>real</em>.
  770. <em>real</em> does not indicate typechecking by the current REDUCE; it is
  771. only for your own information. Declaration statements must immediately
  772. follow the <em>begin</em>, without a semicolon between <em>begin</em> and the
  773. first variable declaration.
  774. <P>
  775. <P>
  776. Any variables used inside a <em>begin</em>...<em>end</em>
  777. <a href=r38_0001.html#r38_0041>block</a>
  778. that were not declared <em>scalar</em>, <em>real</em> or <em>integer</em> are
  779. global, and any change made to them inside the block affects their global
  780. value. Any
  781. <a href=r38_0150.html#r38_0188>array</a> or
  782. <a href=r38_0300.html#r38_0345>matrix</a> declared inside a block is always
  783. global.
  784. <P>
  785. <P>
  786. <P>
  787. <a name=r38_0217>
  788. <title>REMFAC</title></a>
  789. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  790. E"></p>
  791. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  792. <b>REMFAC</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>declaration</b><P>
  793. <P>
  794. <P>
  795. <P>
  796. The <em>remfac</em> declaration removes the special factoring treatment of its
  797. arguments that was declared with
  798. <a href=r38_0250.html#r38_0287>factor</a>.
  799. <P> <H3>
  800. syntax: </H3>
  801. <P>
  802. <P>
  803. <em>remfac</em>&lt;kernel&gt;{,&lt;kernel&gt;}+
  804. <P>
  805. <P>
  806. <P>
  807. &lt;kernel&gt; must be a
  808. <a href=r38_0001.html#r38_0002>kernel</a> or
  809. <a href=r38_0200.html#r38_0211>operator</a> name that
  810. was declared as special with the
  811. <a href=r38_0250.html#r38_0287>factor</a> declaration.
  812. <P>
  813. <P>
  814. <a name=r38_0218>
  815. <title>SCALAR</title></a>
  816. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  817. E"></p>
  818. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  819. <b>SCALAR</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>declaration</b><P>
  820. <P>
  821. The <em>scalar</em> declaration must be made immediately after a
  822. <a href=r38_0001.html#r38_0040>begin</a> (or other variable declaration such as
  823. <a href=r38_0150.html#r38_0197>integer</a>
  824. and
  825. <a href=r38_0200.html#r38_0216>real</a>) and declares local scalar variables. Th
  826. ey are
  827. initialized to 0.
  828. <P> <H3>
  829. syntax: </H3>
  830. <P>
  831. <P>
  832. <em>scalar</em>&lt;identifier&gt;{,&lt;identifier&gt;}*
  833. <P>
  834. <P>
  835. <P>
  836. &lt;identifier&gt; may be any valid REDUCE identifier, except <em>t</em> or
  837. <em>nil</em>.
  838. <P>
  839. <P>
  840. Scalar variables remain local, and do not share values with variables of
  841. the same name outside the
  842. <a href=r38_0001.html#r38_0040>begin</a>...<em>end</em>
  843. <a href=r38_0001.html#r38_0041>block</a>.
  844. When the block is finished, the variables are removed. You may use the
  845. words
  846. <a href=r38_0200.html#r38_0216>real</a> or
  847. <a href=r38_0150.html#r38_0197>integer</a> in the place of <em>scalar</em>.
  848. <em>real</em> and <em>integer</em> do not indicate typechecking by the current
  849. REDUCE; they are only for your own information. Declaration statements
  850. must immediately follow the <em>begin</em>, without a semicolon between
  851. <em>begin</em> and the first variable declaration.
  852. <P>
  853. <P>
  854. Any variables used inside <em>begin</em>...<em>end</em> blocks that were not
  855. declared <em>scalar</em>, <em>real</em> or <em>integer</em> are global, and any
  856. change made to them inside the block affects their global value. Arrays
  857. declared inside a block are always global.
  858. <P>
  859. <P>
  860. <P>
  861. <a name=r38_0219>
  862. <title>SCIENTIFIC_NOTATION</title></a>
  863. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  864. E"></p>
  865. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  866. <b>SCIENTIFIC\_NOTATION</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>declaration</b><P>
  867. <P>
  868. <P>
  869. <P>
  870. <P> <H3>
  871. syntax: </H3>
  872. <em>scientific_notation</em>(&lt;m&gt;) or
  873. <em>scientific_notation</em>({&lt;m&gt;,&lt;n&gt;})
  874. <P>
  875. <P>
  876. <P>
  877. &lt;m&gt; and &lt;n&gt; are positive integers.
  878. <em>scientific_notation</em> controls the output format of floating point
  879. numbers. At the default settings, any number with five or less digits
  880. before the decimal point is printed in a fixed-point notation, e.g.,
  881. 12345.6. Numbers with more than five digits are printed in scientific
  882. notation, e.g., 1.234567E+5. Similarly, by default, any number with
  883. eleven or more zeros after the decimal point is printed in scientific
  884. notation.
  885. <P>
  886. <P>
  887. When <em>scientific_notation</em> is called with the numerical argument
  888. m a number with more than m digits before the decimal point,
  889. or m or more zeros after the decimal point, is printed in scientific
  890. notation. When <em>scientific_notation</em> is called with a list
  891. {&lt;m&gt;,&lt;n&gt;}, a number with more than m digits before the
  892. decimal point, or n or more zeros after the decimal point is
  893. printed in scientific notation.
  894. <P>
  895. <P>
  896. <P> <H3>
  897. examples: </H3>
  898. <p><pre><tt>
  899. on rounded;
  900. 12345.6;
  901. 12345.6
  902. 123456.5;
  903. 1.234565e+5
  904. 0.00000000000000012;
  905. 1.2e-16
  906. scientific_notation 20;
  907. 5,11
  908. 5: 123456.7;
  909. 123456.7
  910. 0.00000000000000012;
  911. 0.00000000000000012
  912. </tt></pre><p>
  913. <a name=r38_0220>
  914. <title>SHARE</title></a>
  915. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  916. E"></p>
  917. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  918. <b>SHARE</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>declaration</b><P>
  919. <P>
  920. The <em>share</em> declaration allows access to its arguments by both
  921. algebraic and symbolic modes.
  922. <P> <H3>
  923. syntax: </H3>
  924. <P>
  925. <P>
  926. <em>share</em>&lt;identifier&gt;{,&lt;identifier&gt;}*
  927. <P>
  928. <P>
  929. <P>
  930. &lt;identifier&gt; can be any valid REDUCE identifier.
  931. <P>
  932. <P>
  933. Programming in
  934. <a href=r38_0200.html#r38_0221>symbolic</a> as well as algebraic mode allows
  935. you a wider range
  936. of techniques than just algebraic mode alone. Expressions do not cross the
  937. boundary since they have different representations, unless the <em>share</em>
  938. declaration is used. For more information on using symbolic mode, see
  939. the &lt;REDUCE User's Manual&gt;, and the &lt;Standard Lisp Report&gt;.
  940. <P>
  941. <P>
  942. You should be aware that a previously-declared array is destroyed by the
  943. <em>share</em> declaration. Scalar variables retain their values. You can
  944. share a declared
  945. <a href=r38_0300.html#r38_0345>matrix</a> that has not yet
  946. been dimensioned so that it can be
  947. used by both modes. Values that are later put into the matrix are
  948. accessible from symbolic mode too, but not by the usual matrix reference
  949. mechanism. In symbolic mode, a matrix is stored as a list whose first
  950. element is
  951. <a href=r38_0300.html#r38_0343>MAT</a>, and whose next elements are the rows of
  952. the matrix
  953. stored as lists of the individual elements. Access in symbolic mode is by
  954. the operators
  955. <a href=r38_0001.html#r38_0046>first</a>,
  956. <a href=r38_0050.html#r38_0063>second</a>,
  957. <a href=r38_0050.html#r38_0066>third</a> and
  958. <a href=r38_0050.html#r38_0057>rest</a>.
  959. <P>
  960. <P>
  961. <P>
  962. <a name=r38_0221>
  963. <title>SYMBOLIC</title></a>
  964. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  965. E"></p>
  966. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  967. <b>SYMBOLIC</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>command</b><P>
  968. <P>
  969. The <em>symbolic</em> command changes REDUCE's mode of operation to symbolic.
  970. When <em>symbolic</em> is followed by an expression, that expression is
  971. evaluated in symbolic mode, but REDUCE's mode is not changed. It is
  972. equivalent to the
  973. <a href=r38_0200.html#r38_0202>lisp</a> command.
  974. <P>
  975. <P>
  976. <P> <H3>
  977. examples: </H3>
  978. <p><pre><tt>
  979. symbolic;
  980. NIL
  981. cdr '(a b c);
  982. (B C)
  983. algebraic;
  984. x + symbolic car '(y z);
  985. X + Y
  986. </tt></pre><p>
  987. <a name=r38_0222>
  988. <title>SYMMETRIC</title></a>
  989. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  990. E"></p>
  991. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  992. <b>SYMMETRIC</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>declaration</b><P>
  993. <P>
  994. <P>
  995. <P>
  996. When an operator is declared <em>symmetric</em>, its arguments are reordered
  997. to conform to the internal ordering of the system.
  998. <P> <H3>
  999. syntax: </H3>
  1000. <P>
  1001. <P>
  1002. <em>symmetric</em>&lt;identifier&gt;{,&lt;identifier&gt;}*
  1003. <P>
  1004. <P>
  1005. <P>
  1006. &lt;identifier&gt; is an identifier that has been declared an operator.
  1007. <P>
  1008. <P>
  1009. <P> <H3>
  1010. examples: </H3>
  1011. <p><pre><tt>
  1012. operator m,n;
  1013. symmetric m,n;
  1014. m(y,a,sin(x));
  1015. M(SIN(X),A,Y)
  1016. n(z,m(b,a,q));
  1017. N(M(A,B,Q),Z)
  1018. </tt></pre><p>If &lt;identifier&gt; has not been declared to be an operator, the
  1019. flag
  1020. <em>symmetric</em> is still attached to it. When &lt;identifier&gt; is
  1021. subsequently used as an operator, the message <em>Declare</em>&lt;identifier&gt;
  1022. <em>operator ? (Y or N)</em> is printed. If the user replies <em>y</em>, the
  1023. symmetric property of the operator is used.
  1024. <P>
  1025. <P>
  1026. <P>
  1027. <a name=r38_0223>
  1028. <title>TR</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>TR</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>declaration</b><P>
  1033. <P>
  1034. <P>
  1035. <P>
  1036. The <em>tr</em> declaration is used to trace system or user-written procedures.
  1037. It is only useful to those with a good knowledge of both Lisp and the
  1038. internal formats used by REDUCE.
  1039. <P>
  1040. <P>
  1041. <P> <H3>
  1042. syntax: </H3>
  1043. <em>tr</em>&lt;name&gt;{,&lt;name&gt;}*
  1044. <P>
  1045. <P>
  1046. <P>
  1047. &lt;name&gt; is the name of a REDUCE system procedure or one of your own
  1048. procedures.
  1049. <P>
  1050. <P>
  1051. <P> <H3>
  1052. examples: </H3>
  1053. <p><pre><tt></tt></pre><p>The system procedure <em>prepsq</em> is traced,
  1054. which prepares REDUCE standard
  1055. forms for printing by converting them to a Lisp prefix form.<p><pre><tt>
  1056. tr prepsq;
  1057. (PREPSQ)
  1058. x**2 + y;
  1059. PREPSQ entry:
  1060. Arg 1: (((((X . 2) . 1) ((Y . 1) . 1)) . 1)
  1061. PREPSQ return value = (PLUS (EXPT X 2) Y)
  1062. PREPSQ entry:
  1063. Arg 1: (1 . 1)
  1064. PREPSQ return value = 1
  1065. 2
  1066. X + Y
  1067. untr prepsq;
  1068. (PREPSQ)
  1069. </tt></pre><p>
  1070. <P>
  1071. <P>
  1072. This example is for a PSL-based system; the above format will vary if
  1073. other Lisp systems are used.
  1074. <P>
  1075. <P>
  1076. When a procedure is traced, the first lines show entry to the procedure and
  1077. the arguments it is given. The value returned by the procedure is printed
  1078. upon exit. If you are tracing several procedures, with a call to one of
  1079. them inside the other, the inner trace will be indented showing procedure
  1080. nesting. There are no trace options. However, the format of the trace
  1081. depends on the underlying Lisp system used. The trace can be removed with
  1082. the command
  1083. <a href=r38_0200.html#r38_0224>untr</a>. Note that <em>trace</em>, below, is a m
  1084. atrix
  1085. operator, while <em>tr</em> does procedure tracing.
  1086. <P>
  1087. <P>
  1088. <P>
  1089. <a name=r38_0224>
  1090. <title>UNTR</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>UNTR</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>declaration</b><P>
  1095. <P>
  1096. <P>
  1097. <P>
  1098. The <em>untr</em> declaration is used to remove a trace from system or
  1099. user-written procedures declared with
  1100. <a href=r38_0200.html#r38_0223>tr</a>. It is only useful to
  1101. those with a good knowledge of both Lisp and the internal formats used by
  1102. REDUCE.
  1103. <P>
  1104. <P>
  1105. <P> <H3>
  1106. syntax: </H3>
  1107. <em>untr</em>&lt;name&gt;{,&lt;name&gt;}*
  1108. <P>
  1109. <P>
  1110. <P>
  1111. &lt;name&gt; is the name of a REDUCE system procedure or one of your own
  1112. procedures that has previously been the argument of a <em>tr</em>
  1113. declaration.
  1114. <P>
  1115. <P>
  1116. <a name=r38_0225>
  1117. <title>VARNAME</title></a>
  1118. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1119. E"></p>
  1120. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1121. <b>VARNAME</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>declaration</b><P>
  1122. <P>
  1123. The declaration <em>varname</em> instructs REDUCE to use its argument as the
  1124. default Fortran (when
  1125. <a href=r38_0250.html#r38_0289>fort</a> is on) or
  1126. <a href=r38_0150.html#r38_0181>structr</a> identifier
  1127. and identifier stem, rather than using <em>ANS</em>.
  1128. <P> <H3>
  1129. syntax: </H3>
  1130. <P>
  1131. <P>
  1132. <em>varname</em>&lt;identifier&gt;
  1133. <P>
  1134. <P>
  1135. <P>
  1136. &lt;identifier&gt; can be any combination of one or more alphanumeric
  1137. characters. Try to avoid REDUCE reserved words.
  1138. <P>
  1139. <P>
  1140. <P> <H3>
  1141. examples: </H3>
  1142. <p><pre><tt>
  1143. varname ident;
  1144. IDENT
  1145. on fort;
  1146. x**2 + 1;
  1147. IDENT=X**2+1.
  1148. off fort,exp;
  1149. structr(((x+y)**2 + z)**3);
  1150. 3
  1151. IDENT2
  1152. where
  1153. 2
  1154. IDENT2 := IDENT1 + Z
  1155. IDENT1 := X + Y
  1156. </tt></pre><p>
  1157. <a href=r38_0250.html#r38_0284>exp</a>was turned off so that
  1158. <a href=r38_0150.html#r38_0181>structr</a> could show the
  1159. structure. If <em>exp</em> had been on, the expression would have been
  1160. expanded into a polynomial.
  1161. <P>
  1162. <P>
  1163. <P>
  1164. <a name=r38_0226>
  1165. <title>WEIGHT</title></a>
  1166. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1167. E"></p>
  1168. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1169. <b>WEIGHT</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>command</b><P>
  1170. <P>
  1171. The <em>weight</em> command is used to attach weights to kernels for asymptotic
  1172. constraints.
  1173. <P> <H3>
  1174. syntax: </H3>
  1175. <P>
  1176. <P>
  1177. <em>weight</em>&lt;kernel&gt; <em>=</em>&lt;number&gt;
  1178. <P>
  1179. <P>
  1180. <P>
  1181. &lt;kernel&gt; must be a REDUCE
  1182. <a href=r38_0001.html#r38_0002>kernel</a>, &lt;number&gt; must be a
  1183. positive integer, not 0.
  1184. <P>
  1185. <P>
  1186. <P> <H3>
  1187. examples: </H3>
  1188. <p><pre><tt>
  1189. a := (x+y)**4;
  1190. 4 3 2 2 3 4
  1191. A := X + 4*X *Y + 6*X *Y + 4*X*Y + Y
  1192. weight x=2,y=3;
  1193. wtlevel 8;
  1194. a;
  1195. 4
  1196. X
  1197. wtlevel 10;
  1198. a;
  1199. 2 2 2
  1200. X *(6*Y + 4*X*Y + X )
  1201. int(x**2,x);
  1202. ***** X invalid as KERNEL
  1203. </tt></pre><p>Weights and
  1204. <a href=r38_0200.html#r38_0229>wtlevel</a> are used for asymptotic constraints,
  1205. where
  1206. higher-order terms are considered insignificant.
  1207. <P>
  1208. <P>
  1209. Weights are originally equivalent to 0 until set by a <em>weight</em>
  1210. command. To remove a weight from a kernel, use the
  1211. <a href=r38_0150.html#r38_0189>clear</a>
  1212. command. Weights once assigned cannot be changed without clearing the
  1213. identifier. Once a weight is assigned to a kernel, it is no longer a
  1214. kernel and cannot be used in any REDUCE commands or operators that require
  1215. kernels, until the weight is cleared. Note that terms are ordered by
  1216. greatest weight.
  1217. <P>
  1218. <P>
  1219. The weight level of the system is set by
  1220. <a href=r38_0200.html#r38_0229>wtlevel</a>, initially at
  1221. 2. Since no kernels have weights, no effect from <em>wtlevel</em> can be
  1222. seen. Once you assign weights to kernels, you must set <em>wtlevel</em>
  1223. correctly for the desired operation. When weighted variables appear in a
  1224. term, their weights are summed for the total weight of the term (powers of
  1225. variables multiply their weights). When a term exceeds the weight level
  1226. of the system, it is discarded from the result expression.
  1227. <P>
  1228. <P>
  1229. <P>
  1230. <a name=r38_0227>
  1231. <title>WHERE</title></a>
  1232. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1233. E"></p>
  1234. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1235. <b>WHERE</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1236. <P>
  1237. <P>
  1238. <P>
  1239. The <em>where</em> operator provides an infix notation for one-time
  1240. substitutions for kernels in expressions.
  1241. <P> <H3>
  1242. syntax: </H3>
  1243. <P>
  1244. <P>
  1245. &lt;expression&gt; <em>where</em> &lt;kernel&gt;
  1246. <em>=</em>&lt;expression&gt;
  1247. {,&lt;kernel&gt; <em>=</em>&lt;expression&gt;}*
  1248. <P>
  1249. <P>
  1250. <P>
  1251. &lt;expression&gt; can be any REDUCE scalar expression, &lt;kernel&gt; must
  1252. be a
  1253. <a href=r38_0001.html#r38_0002>kernel</a>. Alternatively a
  1254. <a href=r38_0050.html#r38_0060>rule</a> or a <em>rule list</em>
  1255. can be a member of the right-hand part of a <em>where</em> expression.
  1256. <P>
  1257. <P>
  1258. <P> <H3>
  1259. examples: </H3>
  1260. <p><pre><tt>
  1261. x**2 + 17*x*y + 4*y**2 where x=1,y=2;
  1262. 51
  1263. for i := 1:5 collect x**i*q where q= for j := 1:i product j;
  1264. 2 3 4 5
  1265. {X,2*X ,6*X ,24*X ,120*X }
  1266. x**2 + y + z where z=y**3,y=3;
  1267. 2 3
  1268. X + Y + 3
  1269. </tt></pre><p>Substitution inside a <em>where</em> expression has no effect upon
  1270. the values
  1271. of the kernels outside the expression. The <em>where</em> operator has the
  1272. lowest precedence of all the infix operators, which are lower than prefix
  1273. operators, so that the substitutions apply to the entire expression
  1274. preceding the <em>where</em> operator. However, <em>where</em> is applied
  1275. before command keywords such as <em>then</em>, <em>repeat</em>, or <em>do</em>.
  1276. <P>
  1277. <P>
  1278. A
  1279. <a href=r38_0050.html#r38_0060>rule</a> or a <em>rule set</em> in the right-hand
  1280. part of the
  1281. <em>where</em> expression act as if the rules were activated by
  1282. <a href=r38_0150.html#r38_0199>let</a>
  1283. immediately before the evaluation of the expression and deactivated
  1284. by
  1285. <a href=r38_0150.html#r38_0190>clearrules</a> immediately afterwards.
  1286. <P>
  1287. <P>
  1288. <em>where</em>gives you a natural notation for auxiliary variables in
  1289. expressions. As the second example shows, the substitute expression can be
  1290. a command to be evaluated. The substitute assignments are made in
  1291. parallel, rather than sequentially, as the last example shows. The
  1292. expression resulting from the first round of substitutions is not
  1293. reexamined to see if any further such substitutions can be made.
  1294. <em>where</em> can also be used to define auxiliary variables in
  1295. <a href=r38_0050.html#r38_0055>procedure</a> definitions.
  1296. <P>
  1297. <P>
  1298. <P>
  1299. <a name=r38_0228>
  1300. <title>WHILE</title></a>
  1301. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1302. E"></p>
  1303. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1304. <b>WHILE</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>command</b><P>
  1305. <P>
  1306. <P>
  1307. <P>
  1308. The <em>while</em> command causes a statement to be repeatedly executed until a
  1309. given condition is true. If the condition is initially false, the statement
  1310. is not executed at all.
  1311. <P> <H3>
  1312. syntax: </H3>
  1313. <P>
  1314. <P>
  1315. <em>while</em>&lt;condition&gt; <em>do</em> &lt;statement&gt;
  1316. <P>
  1317. <P>
  1318. <P>
  1319. &lt;condition&gt; is given by a logical operator, &lt;statement&gt; must be a
  1320. single REDUCE statement, or a
  1321. <a href=r38_0001.html#r38_0038>group</a> (<em>&lt;&lt;</em>...<em>&gt;&gt;</em>)
  1322. or
  1323. <a href=r38_0001.html#r38_0040>begin</a>...<em>end</em>
  1324. <a href=r38_0001.html#r38_0041>block</a>.
  1325. <P>
  1326. <P>
  1327. <P> <H3>
  1328. examples: </H3>
  1329. <p><pre><tt>
  1330. a := 10;
  1331. A := 10
  1332. while a &lt;= 12 do &lt;&lt;write a; a := a + 1&gt;&gt;;
  1333. 10
  1334. 11
  1335. 12
  1336. while a &lt; 5 do &lt;&lt;write a; a := a + 1&gt;&gt;;
  1337. nothing is printed
  1338. </tt></pre><p>
  1339. <a name=r38_0229>
  1340. <title>WTLEVEL</title></a>
  1341. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1342. E"></p>
  1343. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1344. <b>WTLEVEL</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>command</b><P>
  1345. <P>
  1346. In conjunction with
  1347. <a href=r38_0200.html#r38_0226>weight</a>, <em>wtlevel</em> is used to implement
  1348. asymptotic constraints. Its default value is 2.
  1349. <P> <H3>
  1350. syntax: </H3>
  1351. <P>
  1352. <P>
  1353. <em>wtlevel</em>&lt;expression&gt;
  1354. <P>
  1355. <P>
  1356. <P>
  1357. To change the weight level, &lt;expression&gt; must evaluate to a positive
  1358. integer that is the greatest weight term to be retained in expressions
  1359. involving kernels with weight assignments. <em>wtlevel</em> returns the
  1360. new weight level. If you want the current weight level, but not
  1361. change it, say <em>wtlevel nil</em>.
  1362. <P>
  1363. <P>
  1364. <P> <H3>
  1365. examples: </H3>
  1366. <p><pre><tt>
  1367. (x+y)**4;
  1368. 4 3 2 2 3 4
  1369. X + 4*X *Y + 6*X *Y + 4*X*Y + Y
  1370. weight x=2,y=3;
  1371. wtlevel 8;
  1372. (x+y)**4;
  1373. 4
  1374. X
  1375. wtlevel 10;
  1376. (x+y)**4;
  1377. 2 2 2
  1378. X *(6*Y + 4*X*Y + X )
  1379. int(x**2,x);
  1380. ***** X invalid as KERNEL
  1381. </tt></pre><p><em>wtlevel</em>is used in conjunction with the command
  1382. <a href=r38_0200.html#r38_0226>weight</a> to
  1383. enable asymptotic constraints. Weight of a term is computed by multiplying
  1384. the weights of each variable in it by the power to which it has been
  1385. raised, and adding the resulting weights for each variable. If the weight
  1386. of the term is greater than <em>wtlevel</em>, the term is dropped from the
  1387. expression, and not used in any further computation involving the
  1388. expression.
  1389. <P>
  1390. <P>
  1391. Once a weight has been attached to a
  1392. <a href=r38_0001.html#r38_0002>kernel</a>, it is no longer
  1393. recognized by the system as a kernel, though still a variable. It cannot
  1394. be used in REDUCE commands and operators that need kernels. The weight
  1395. attachment can be undone with a
  1396. <a href=r38_0150.html#r38_0189>clear</a> command. <em>wtlevel</em> can
  1397. be changed as desired.
  1398. <P>
  1399. <P>
  1400. <P>
  1401. <a name=r38_0230>
  1402. <title>Declarations</title></a>
  1403. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1404. E"></p>
  1405. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1406. <b>Declarations</b><menu>
  1407. <li><a href=r38_0150.html#r38_0186>ALGEBRAIC command</a><P>
  1408. <li><a href=r38_0150.html#r38_0187>ANTISYMMETRIC declaration</a><P>
  1409. <li><a href=r38_0150.html#r38_0188>ARRAY declaration</a><P>
  1410. <li><a href=r38_0150.html#r38_0189>CLEAR command</a><P>
  1411. <li><a href=r38_0150.html#r38_0190>CLEARRULES command</a><P>
  1412. <li><a href=r38_0150.html#r38_0191>DEFINE command</a><P>
  1413. <li><a href=r38_0150.html#r38_0192>DEPEND declaration</a><P>
  1414. <li><a href=r38_0150.html#r38_0193>EVEN declaration</a><P>
  1415. <li><a href=r38_0150.html#r38_0194>FACTOR declaration</a><P>
  1416. <li><a href=r38_0150.html#r38_0195>FORALL command</a><P>
  1417. <li><a href=r38_0150.html#r38_0196>INFIX declaration</a><P>
  1418. <li><a href=r38_0150.html#r38_0197>INTEGER declaration</a><P>
  1419. <li><a href=r38_0150.html#r38_0198>KORDER declaration</a><P>
  1420. <li><a href=r38_0150.html#r38_0199>LET command</a><P>
  1421. <li><a href=r38_0200.html#r38_0200>LINEAR declaration</a><P>
  1422. <li><a href=r38_0200.html#r38_0201>LINELENGTH declaration</a><P>
  1423. <li><a href=r38_0200.html#r38_0202>LISP command</a><P>
  1424. <li><a href=r38_0200.html#r38_0203>LISTARGP declaration</a><P>
  1425. <li><a href=r38_0200.html#r38_0204>NODEPEND declaration</a><P>
  1426. <li><a href=r38_0200.html#r38_0205>MATCH command</a><P>
  1427. <li><a href=r38_0200.html#r38_0206>NONCOM declaration</a><P>
  1428. <li><a href=r38_0200.html#r38_0207>NONZERO declaration</a><P>
  1429. <li><a href=r38_0200.html#r38_0208>ODD declaration</a><P>
  1430. <li><a href=r38_0200.html#r38_0209>OFF command</a><P>
  1431. <li><a href=r38_0200.html#r38_0210>ON command</a><P>
  1432. <li><a href=r38_0200.html#r38_0211>OPERATOR declaration</a><P>
  1433. <li><a href=r38_0200.html#r38_0212>ORDER declaration</a><P>
  1434. <li><a href=r38_0200.html#r38_0213>PRECEDENCE declaration</a><P>
  1435. <li><a href=r38_0200.html#r38_0214>PRECISION declaration</a><P>
  1436. <li><a href=r38_0200.html#r38_0215>PRINT\_PRECISION declaration</a><P>
  1437. <li><a href=r38_0200.html#r38_0216>REAL declaration</a><P>
  1438. <li><a href=r38_0200.html#r38_0217>REMFAC declaration</a><P>
  1439. <li><a href=r38_0200.html#r38_0218>SCALAR declaration</a><P>
  1440. <li><a href=r38_0200.html#r38_0219>SCIENTIFIC\_NOTATION declaration</a><P>
  1441. <li><a href=r38_0200.html#r38_0220>SHARE declaration</a><P>
  1442. <li><a href=r38_0200.html#r38_0221>SYMBOLIC command</a><P>
  1443. <li><a href=r38_0200.html#r38_0222>SYMMETRIC declaration</a><P>
  1444. <li><a href=r38_0200.html#r38_0223>TR declaration</a><P>
  1445. <li><a href=r38_0200.html#r38_0224>UNTR declaration</a><P>
  1446. <li><a href=r38_0200.html#r38_0225>VARNAME declaration</a><P>
  1447. <li><a href=r38_0200.html#r38_0226>WEIGHT command</a><P>
  1448. <li><a href=r38_0200.html#r38_0227>WHERE operator</a><P>
  1449. <li><a href=r38_0200.html#r38_0228>WHILE command</a><P>
  1450. <li><a href=r38_0200.html#r38_0229>WTLEVEL command</a><P>
  1451. </menu>
  1452. <a name=r38_0231>
  1453. <title>IN</title></a>
  1454. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1455. E"></p>
  1456. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1457. <b>IN</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>command</b><P>
  1458. <P>
  1459. <P>
  1460. <P>
  1461. The <em>in</em> command takes a list of file names and inputs each file into
  1462. the system.
  1463. <P> <H3>
  1464. syntax: </H3>
  1465. <P>
  1466. <P>
  1467. <em>in</em>&lt;filename&gt;{,&lt;filename&gt;}*
  1468. <P>
  1469. <P>
  1470. <P>
  1471. &lt;filename&gt; must be in the current directory, or be a valid pathname.
  1472. If the file name is not an identifier, double quote marks (<em>&quot;</em>) are
  1473. needed around the file name.
  1474. <P>
  1475. <P>
  1476. A message is given if the file cannot be found, or has a mistake
  1477. in it.
  1478. <P>
  1479. <P>
  1480. Ending the command with a semicolon causes the file to be echoed to the
  1481. screen; ending it with a dollar sign does not echo the file. If you want
  1482. some but not all of a file echoed, turn the switch
  1483. <a href=r38_0250.html#r38_0281>echo</a> on or off
  1484. in the file.
  1485. <P>
  1486. <P>
  1487. An efficient way to develop procedures in REDUCE is to write them into a file
  1488. using a system editor of your choice, and then input the
  1489. files into an active REDUCE session. REDUCE reparses the procedure as
  1490. it takes information from the file, overwriting the previous procedure
  1491. definition. When it accepts the procedure, it echoes its name to the screen.
  1492. Data can also be input to the system from files.
  1493. <P>
  1494. <P>
  1495. Files to be read in should always end in
  1496. <a href=r38_0001.html#r38_0044>end</a><em>;</em> to avoid
  1497. end-of-file problems. Note that this is an additional <em>end;</em> to any
  1498. ending procedures in the file.
  1499. <P>
  1500. <P>
  1501. <P>
  1502. <a name=r38_0232>
  1503. <title>INPUT</title></a>
  1504. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1505. E"></p>
  1506. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1507. <b>INPUT</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>command</b><P>
  1508. <P>
  1509. <P>
  1510. <P>
  1511. The <em>input</em> command returns the input expression to the REDUCE numbered
  1512. prompt that is its argument.
  1513. <P> <H3>
  1514. syntax: </H3>
  1515. <P>
  1516. <P>
  1517. <em>input</em>(&lt;number&gt;) or <em>input</em> &lt;number&gt;
  1518. <P>
  1519. <P>
  1520. <P>
  1521. <P>
  1522. &lt;number&gt; must be between 1 and the current REDUCE prompt number.
  1523. <P>
  1524. <P>
  1525. An expression brought back by <em>input</em> can be reexecuted with new
  1526. values or switch settings, or used as an argument in another expression.
  1527. The command
  1528. <a href=r38_0150.html#r38_0184>ws</a> brings back the results of a numbered REDU
  1529. CE
  1530. statement. Two lists contain every input and every output statement since
  1531. the beginning of the session. If your session is very long, storage space
  1532. begins to fill up with these expressions, so it is a good idea to end the
  1533. session once in a while, saving needed expressions to files with the
  1534. <a href=r38_0100.html#r38_0133>saveas</a> and
  1535. <a href=r38_0200.html#r38_0233>out</a> commands.
  1536. <P>
  1537. <P>
  1538. Switch settings and
  1539. <a href=r38_0150.html#r38_0199>let</a> statements can also be reexecuted by usin
  1540. g
  1541. <em>input</em>.
  1542. <P>
  1543. <P>
  1544. An error message is given if a number is called for that has not yet been used.
  1545. <P>
  1546. <P>
  1547. <P>
  1548. <a name=r38_0233>
  1549. <title>OUT</title></a>
  1550. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1551. E"></p>
  1552. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1553. <b>OUT</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>command</b><P>
  1554. <P>
  1555. <P>
  1556. <P>
  1557. The <em>out</em> command directs output to the filename that is its argument,
  1558. until another <em>out</em> changes the output file, or
  1559. <a href=r38_0200.html#r38_0234>shut</a> closes it.
  1560. <P> <H3>
  1561. syntax: </H3>
  1562. <P>
  1563. <P>
  1564. <em>out</em>&lt;filename&gt; or <em>out &quot;</em>&lt;pathname&gt; <em>&quot;
  1565. </em> or <em>out t</em>
  1566. <P>
  1567. <P>
  1568. <P>
  1569. &lt;filename&gt; must be in the current directory, or be a valid complete
  1570. file description for your system. If the file name is not
  1571. in the current directory, quote marks are needed around the file name.
  1572. If the file already exists, a message is printed allowing you to decide
  1573. whether to supersede the contents of the file with new material.
  1574. <P>
  1575. <P>
  1576. To restore output to the terminal, type <em>out t</em>, or
  1577. <a href=r38_0200.html#r38_0234>shut</a> the
  1578. file. When you use <em>out t</em>, the file remains available, and if you
  1579. open it again (with another <em>out</em>), new material is appended rather
  1580. than overwriting.
  1581. <P>
  1582. <P>
  1583. To write a file using <em>out</em> that can be input at a later time, the
  1584. switch
  1585. <a href=r38_0300.html#r38_0308>nat</a> must be turned off, so that the standard
  1586. linear form
  1587. is saved that can be read in by
  1588. <a href=r38_0200.html#r38_0231>in</a>. If <em>nat</em> is on, exponents
  1589. are printed on the line above the expression, which causes trouble
  1590. when REDUCE tries to read the file.
  1591. <P>
  1592. <P>
  1593. There is a slight complication if you are using the <em>out</em> command from
  1594. inside a file to create another file. The
  1595. <a href=r38_0250.html#r38_0281>echo</a> switch is normally
  1596. off at the top-level and on while reading files (so you can see what is
  1597. being read in). If you create a file using <em>out</em> at the top-level,
  1598. the result lines are printed into the file as you want them. But if you
  1599. create such a file from inside a file, the <em>echo</em> switch is on, and
  1600. every line is echoed, first as you typed it, then as REDUCE parsed it, and
  1601. then once more for the file. Therefore, when you create a file from
  1602. a file, you need to turn <em>echo</em> off explicitly before the <em>out</em>
  1603. command, and turn it back on when you <em>shut</em> the created file, so your
  1604. executing file echoes as it should. This behavior also means that as you
  1605. watch the file execute, you cannot see the lines that are being put into
  1606. the <em>out</em> file. As soon as you turn <em>echo</em> on, you can see
  1607. output again.
  1608. <P>
  1609. <P>
  1610. <P>
  1611. <a name=r38_0234>
  1612. <title>SHUT</title></a>
  1613. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1614. E"></p>
  1615. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1616. <b>SHUT</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>command</b><P>
  1617. <P>
  1618. <P>
  1619. <P>
  1620. The <em>shut</em> command closes output files.
  1621. <P> <H3>
  1622. syntax: </H3>
  1623. <P>
  1624. <P>
  1625. <em>shut</em>&lt;filename&gt;{,&lt;filename&gt;}*
  1626. <P>
  1627. <P>
  1628. <P>
  1629. &lt;filename&gt; must have been a file opened by
  1630. <a href=r38_0200.html#r38_0233>out</a>.
  1631. <P>
  1632. <P>
  1633. A file that has been opened by
  1634. <a href=r38_0200.html#r38_0233>out</a> must be <em>shut</em> before it is
  1635. brought in by
  1636. <a href=r38_0200.html#r38_0231>in</a>. Files that have been opened by <em>out
  1637. </em> should
  1638. always be <em>shut</em> before the end of the REDUCE session, to avoid either
  1639. loss of information or the printing of extraneous information into the file.
  1640. In most systems, terminating a session by
  1641. <a href=r38_0100.html#r38_0124>bye</a> closes all open
  1642. output files.
  1643. <P>
  1644. <P>
  1645. <P>
  1646. <a name=r38_0235>
  1647. <title>Input and Output</title></a>
  1648. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1649. E"></p>
  1650. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1651. <b>Input and Output</b><menu>
  1652. <li><a href=r38_0200.html#r38_0231>IN command</a><P>
  1653. <li><a href=r38_0200.html#r38_0232>INPUT command</a><P>
  1654. <li><a href=r38_0200.html#r38_0233>OUT command</a><P>
  1655. <li><a href=r38_0200.html#r38_0234>SHUT command</a><P>
  1656. </menu>
  1657. <a name=r38_0236>
  1658. <title>ACOS</title></a>
  1659. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1660. E"></p>
  1661. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1662. <b>ACOS</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1663. <P>
  1664. <P>
  1665. <P>
  1666. The <em>acos</em> operator returns the arccosine of its argument.
  1667. <P>
  1668. <P>
  1669. <P> <H3>
  1670. syntax: </H3>
  1671. <em>acos</em>(&lt;expression&gt;) or <em>acos</em> &lt;simple\_expression&gt;
  1672. <P>
  1673. <P>
  1674. <P>
  1675. &lt;expression&gt; may be any scalar REDUCE expression, not an array, matrix or
  1676. vector expression. &lt;simple\_expression&gt; must be a single identifier or
  1677. begin with a prefix operator name.
  1678. <P>
  1679. <P>
  1680. <P> <H3>
  1681. examples: </H3>
  1682. <p><pre><tt>
  1683. acos(ab);
  1684. ACOS(AB)
  1685. acos 15;
  1686. ACOS(15)
  1687. df(acos(x*y),x);
  1688. 2 2
  1689. SQRT( - X *Y + 1)*Y
  1690. --------------------
  1691. 2 2
  1692. X *Y - 1
  1693. on rounded;
  1694. res := acos(sqrt(2)/2);
  1695. RES := 0.785398163397
  1696. res-pi/4;
  1697. 0
  1698. </tt></pre><p>An explicit numeric value is not given unless the switch
  1699. <a href=r38_0300.html#r38_0330>rounded</a> is
  1700. on and the argument has an absolute numeric value less than or equal to 1.
  1701. <P>
  1702. <P>
  1703. <P>
  1704. <a name=r38_0237>
  1705. <title>ACOSH</title></a>
  1706. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1707. E"></p>
  1708. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1709. <b>ACOSH</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1710. <P>
  1711. <P>
  1712. <P>
  1713. <em>acosh</em>represents the hyperbolic arccosine of its argument. It takes
  1714. an arbitrary scalar expression as its argument. The derivative of
  1715. <em>acosh</em> is known to the system. Numerical values may also be found by
  1716. turning on the switch
  1717. <a href=r38_0300.html#r38_0330>rounded</a>.
  1718. <P>
  1719. <P>
  1720. <P> <H3>
  1721. syntax: </H3>
  1722. <em>acosh</em>(&lt;expression&gt;) or <em>acosh</em> &lt;simple\_expression&gt;
  1723. <P>
  1724. <P>
  1725. <P>
  1726. &lt;expression&gt; may be any scalar REDUCE expression, not an array, matrix or
  1727. vector expression. &lt;simple\_expression&gt; must be a single identifier or
  1728. begin with a prefix operator name.
  1729. <P>
  1730. <P>
  1731. <P> <H3>
  1732. examples: </H3>
  1733. <p><pre><tt>
  1734. acosh a;
  1735. ACOSH(A)
  1736. acosh(0);
  1737. ACOSH(0)
  1738. df(acosh(a**2),a);
  1739. 4
  1740. 2*SQRT(A - 1)*A
  1741. ----------------
  1742. 4
  1743. A - 1
  1744. int(acosh(x),x);
  1745. INT(ACOSH(X),X)
  1746. </tt></pre><p>You may attach functionality by defining <em>acosh</em> to be the
  1747. inverse of
  1748. <em>cosh</em>. This is done by the commands
  1749. <p><pre><tt>
  1750. put('cosh,'inverse,'acosh);
  1751. put('acosh,'inverse,'cosh);
  1752. </tt></pre><p><P>
  1753. <P>
  1754. You can write a procedure to attach integrals or other
  1755. functions to <em>acosh</em>. You may wish to add a check to see that its
  1756. argument is properly restricted.
  1757. <P>
  1758. <P>
  1759. <P>
  1760. <a name=r38_0238>
  1761. <title>ACOT</title></a>
  1762. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1763. E"></p>
  1764. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1765. <b>ACOT</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1766. <P>
  1767. <P>
  1768. <P>
  1769. <em>acot</em>represents the arccotangent of its argument. It takes
  1770. an arbitrary scalar expression as its argument. The derivative of
  1771. <em>acot</em> is known to the system. Numerical values may also be found by
  1772. turning on the switch
  1773. <a href=r38_0300.html#r38_0330>rounded</a>.
  1774. <P>
  1775. <P>
  1776. <P> <H3>
  1777. syntax: </H3>
  1778. <em>acot</em>(&lt;expression&gt;) or <em>acot</em> &lt;simple\_expression&gt;
  1779. <P>
  1780. <P>
  1781. <P>
  1782. &lt;expression&gt; may be any scalar REDUCE expression, not an array, matrix or
  1783. vector expression. &lt;simple\_expression&gt; must be a single identifier or
  1784. begin with a prefix operator name.
  1785. You can add functionality yourself with <em>let</em> and procedures.
  1786. <P>
  1787. <P>
  1788. <a name=r38_0239>
  1789. <title>ACOTH</title></a>
  1790. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1791. E"></p>
  1792. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1793. <b>ACOTH</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1794. <P>
  1795. <P>
  1796. <P>
  1797. <em>acoth</em>represents the inverse hyperbolic cotangent of its argument.
  1798. It takes an arbitrary scalar expression as its argument. The derivative
  1799. of <em>acoth</em> is known to the system. Numerical values may also be found
  1800. by turning on the switch
  1801. <a href=r38_0300.html#r38_0330>rounded</a>.
  1802. <P>
  1803. <P>
  1804. <P> <H3>
  1805. syntax: </H3>
  1806. <em>acoth</em>(&lt;expression&gt;) or <em>acoth</em> &lt;simple\_expression&gt;
  1807. <P>
  1808. <P>
  1809. <P>
  1810. &lt;expression&gt; may be any scalar REDUCE expression, not an array,
  1811. matrix or vector expression. &lt;simple\_expression&gt; must be a single
  1812. identifier or begin with a prefix operator name. You can add
  1813. functionality yourself with <em>let</em> and procedures.
  1814. <P>
  1815. <P>
  1816. <a name=r38_0240>
  1817. <title>ACSC</title></a>
  1818. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1819. E"></p>
  1820. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1821. <b>ACSC</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1822. <P>
  1823. <P>
  1824. <P>
  1825. The <em>acsc</em> operator returns the arccosecant of its argument.
  1826. <P>
  1827. <P>
  1828. <P> <H3>
  1829. syntax: </H3>
  1830. <em>acsc</em>(&lt;expression&gt;) or <em>acsc</em> &lt;simple\_expression&gt;
  1831. <P>
  1832. <P>
  1833. <P>
  1834. &lt;expression&gt; may be any scalar REDUCE expression, not an array, matrix or
  1835. vector expression. &lt;simple\_expression&gt; must be a single identifier or
  1836. begin with a prefix operator name.
  1837. <P>
  1838. <P>
  1839. <P> <H3>
  1840. examples: </H3>
  1841. <p><pre><tt>
  1842. acsc(ab);
  1843. ACSC(AB)
  1844. acsc 15;
  1845. ACSC(15)
  1846. df(acsc(x*y),x);
  1847. 2 2
  1848. -SQRT(X *Y - 1)
  1849. ----------------
  1850. 2 2
  1851. X*(X *Y - 1)
  1852. on rounded;
  1853. res := acsc(2/sqrt(3));
  1854. RES := 1.0471975512
  1855. res-pi/3;
  1856. 0
  1857. </tt></pre><p>An explicit numeric value is not given unless the switch <em>round
  1858. ed</em> is
  1859. on and the argument has an absolute numeric value less than or equal to 1.
  1860. <P>
  1861. <P>
  1862. <P>
  1863. <a name=r38_0241>
  1864. <title>ACSCH</title></a>
  1865. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1866. E"></p>
  1867. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1868. <b>ACSCH</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1869. <P>
  1870. <P>
  1871. <P>
  1872. The <em>acsch</em> operator returns the hyperbolic arccosecant of its argument.
  1873. <P>
  1874. <P>
  1875. <P> <H3>
  1876. syntax: </H3>
  1877. <em>acsch</em>(&lt;expression&gt;) or <em>acsch</em> &lt;simple\_expression&gt;
  1878. <P>
  1879. <P>
  1880. <P>
  1881. &lt;expression&gt; may be any scalar REDUCE expression, not an array, matrix or
  1882. vector expression. &lt;simple\_expression&gt; must be a single identifier or
  1883. begin with a prefix operator name.
  1884. <P>
  1885. <P>
  1886. <P> <H3>
  1887. examples: </H3>
  1888. <p><pre><tt>
  1889. acsch(ab);
  1890. ACSCH(AB)
  1891. acsch 15;
  1892. ACSCH(15)
  1893. df(acsch(x*y),x);
  1894. 2 2
  1895. -SQRT(X *Y + 1)
  1896. ----------------
  1897. 2 2
  1898. X*(X *Y + 1)
  1899. on rounded;
  1900. res := acsch(3);
  1901. RES := 0.327450150237
  1902. </tt></pre><p>An explicit numeric value is not given unless the switch <em>round
  1903. ed</em> is
  1904. on and the argument has an absolute numeric value less than or equal to 1.
  1905. <P>
  1906. <P>
  1907. <P>
  1908. <a name=r38_0242>
  1909. <title>ASEC</title></a>
  1910. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1911. E"></p>
  1912. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1913. <b>ASEC</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1914. <P>
  1915. <P>
  1916. <P>
  1917. The <em>asec</em> operator returns the arccosecant of its argument.
  1918. <P>
  1919. <P>
  1920. <P> <H3>
  1921. syntax: </H3>
  1922. <em>asec</em>(&lt;expression&gt;) or <em>asec</em> &lt;simple\_expression&gt;
  1923. <P>
  1924. <P>
  1925. <P>
  1926. &lt;expression&gt; may be any scalar REDUCE expression, not an array, matrix or
  1927. vector expression. &lt;simple\_expression&gt; must be a single identifier or
  1928. begin with a prefix operator name.
  1929. <P>
  1930. <P>
  1931. <P> <H3>
  1932. examples: </H3>
  1933. <p><pre><tt>
  1934. asec(ab);
  1935. ASEC(AB)
  1936. asec 15;
  1937. ASEC(15)
  1938. df(asec(x*y),x);
  1939. 2 2
  1940. SQRT(X *Y - 1)
  1941. ---------------
  1942. 2 2
  1943. X*(X *Y - 1)
  1944. on rounded;
  1945. res := asec sqrt(2);
  1946. RES := 0.785398163397
  1947. res-pi/4;
  1948. 0
  1949. </tt></pre><p>An explicit numeric value is not given unless the switch <em>round
  1950. ed</em> is
  1951. on and the argument has an absolute numeric value greater or equal to 1.
  1952. <P>
  1953. <P>
  1954. <P>
  1955. <a name=r38_0243>
  1956. <title>ASECH</title></a>
  1957. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1958. E"></p>
  1959. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1960. <b>ASECH</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1961. <P>
  1962. <P>
  1963. <P>
  1964. <em>asech</em>represents the hyperbolic arccosecant of its argument. It takes
  1965. an arbitrary scalar expression as its argument. The derivative of
  1966. <em>asech</em> is known to the system. Numerical values may also be found by
  1967. turning on the switch
  1968. <a href=r38_0300.html#r38_0330>rounded</a>.
  1969. <P>
  1970. <P>
  1971. <P> <H3>
  1972. syntax: </H3>
  1973. <em>asech</em>(&lt;expression&gt;) or <em>asech</em> &lt;simple\_expression&gt;
  1974. <P>
  1975. <P>
  1976. <P>
  1977. &lt;expression&gt; may be any scalar REDUCE expression, not an array, matrix or
  1978. vector expression. &lt;simple\_expression&gt; must be a single identifier or
  1979. begin with a prefix operator name.
  1980. <P>
  1981. <P>
  1982. <P> <H3>
  1983. examples: </H3>
  1984. <p><pre><tt>
  1985. asech a;
  1986. ASECH(A)
  1987. asech(1);
  1988. 0
  1989. df(acosh(a**2),a);
  1990. 4
  1991. 2*SQRT(- A + 1)
  1992. ----------------
  1993. 4
  1994. A*(A - 1)
  1995. int(asech(x),x);
  1996. INT(ASECH(X),X)
  1997. </tt></pre><p>You may attach functionality by defining <em>asech</em> to be the
  1998. inverse of
  1999. <em>sech</em>. This is done by the commands
  2000. <p><pre><tt>
  2001. put('sech,'inverse,'asech);
  2002. put('asech,'inverse,'sech);
  2003. </tt></pre><p><P>
  2004. <P>
  2005. You can write a procedure to attach integrals or other
  2006. functions to <em>asech</em>. You may wish to add a check to see that its
  2007. argument is properly restricted.
  2008. <P>
  2009. <P>
  2010. <P>
  2011. <a name=r38_0244>
  2012. <title>ASIN</title></a>
  2013. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  2014. E"></p>
  2015. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  2016. <b>ASIN</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  2017. <P>
  2018. <P>
  2019. <P>
  2020. The <em>asin</em> operator returns the arcsine of its argument.
  2021. <P>
  2022. <P>
  2023. <P> <H3>
  2024. syntax: </H3>
  2025. <em>asin</em>(&lt;expression&gt;) or <em>asin</em> &lt;simple\_expression&gt;
  2026. <P>
  2027. <P>
  2028. <P>
  2029. &lt;expression&gt; may be any scalar REDUCE expression, not an array, matrix or
  2030. vector expression. &lt;simple\_expression&gt; must be a single identifier or
  2031. begin with a prefix operator name.
  2032. <P>
  2033. <P>
  2034. <P> <H3>
  2035. examples: </H3>
  2036. <p><pre><tt>
  2037. asin(givenangle);
  2038. ASIN(GIVENANGLE)
  2039. asin(5);
  2040. ASIN(5)
  2041. df(asin(2*x),x);
  2042. 2
  2043. 2*SQRT( - 4*X + 1))
  2044. - --------------------
  2045. 2
  2046. 4*X - 1
  2047. on rounded;
  2048. asin .5;
  2049. 0.523598775598
  2050. asin(sqrt(3));
  2051. ASIN(1.73205080757)
  2052. asin(sqrt(3)/2);
  2053. 1.04719755120
  2054. </tt></pre><p>A numeric value is not returned by <em>asin</em> unless the switch
  2055. <em>rounded</em> is on and its argument has an absolute value less than or
  2056. equal to 1.
  2057. <P>
  2058. <P>
  2059. <P>
  2060. <a name=r38_0245>
  2061. <title>ASINH</title></a>
  2062. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  2063. E"></p>
  2064. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  2065. <b>ASINH</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  2066. <P>
  2067. <P>
  2068. <P>
  2069. The <em>asinh</em> operator returns the hyperbolic arcsine of its argument.
  2070. The derivative of <em>asinh</em> and some simple transformations are known
  2071. to the system.
  2072. <P>
  2073. <P>
  2074. <P> <H3>
  2075. syntax: </H3>
  2076. <em>asinh</em>(&lt;expression&gt;) or <em>asinh</em> &lt;simple\_expression&gt;
  2077. <P>
  2078. <P>
  2079. <P>
  2080. &lt;expression&gt; may be any scalar REDUCE expression, not an array, matrix or
  2081. vector expression. &lt;simple\_expression&gt; must be a single identifier or
  2082. begin with a prefix operator name.
  2083. <P>
  2084. <P>
  2085. <P> <H3>
  2086. examples: </H3>
  2087. <p><pre><tt>
  2088. asinh d;
  2089. ASINH(D)
  2090. asinh(1);
  2091. ASINH(1)
  2092. df(asinh(2*x),x);
  2093. 2
  2094. 2*SQRT(4*X + 1))
  2095. -----------------
  2096. 2
  2097. 4*X + 1
  2098. </tt></pre><p>You may attach further functionality by defining <em>asinh</em> to
  2099. be the
  2100. inverse of <em>sinh</em>. This is done by the commands
  2101. <p><pre><tt>
  2102. put('sinh,'inverse,'asinh);
  2103. put('asinh,'inverse,'sinh);
  2104. </tt></pre><p><P>
  2105. <P>
  2106. A numeric value is not returned by <em>asinh</em> unless the switch
  2107. <em>rounded</em> is on and its argument evaluates to a number.
  2108. <P>
  2109. <P>
  2110. <P>
  2111. <a name=r38_0246>
  2112. <title>ATAN</title></a>
  2113. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  2114. E"></p>
  2115. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  2116. <b>ATAN</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  2117. <P>
  2118. <P>
  2119. <P>
  2120. The <em>atan</em> operator returns the arctangent of its argument.
  2121. <P>
  2122. <P>
  2123. <P> <H3>
  2124. syntax: </H3>
  2125. <em>atan</em>(&lt;expression&gt;) or <em>atan</em> &lt;simple\_expression&gt;
  2126. <P>
  2127. <P>
  2128. <P>
  2129. &lt;expression&gt; may be any scalar REDUCE expression, not an array, matrix or
  2130. vector expression. &lt;simple\_expression&gt; must be a single identifier or
  2131. begin with a prefix operator name.
  2132. <P>
  2133. <P>
  2134. <P> <H3>
  2135. examples: </H3>
  2136. <p><pre><tt>
  2137. atan(middle);
  2138. ATAN(MIDDLE)
  2139. on rounded;
  2140. atan 45;
  2141. 1.54857776147
  2142. off rounded;
  2143. int(atan(x),x);
  2144. 2
  2145. 2*ATAN(X)*X - LOG(X + 1)
  2146. -------------------------
  2147. 2
  2148. df(atan(y**2),y);
  2149. 2*Y
  2150. -------
  2151. 4
  2152. Y + 1
  2153. </tt></pre><p>A numeric value is not returned by <em>atan</em> unless the switch
  2154. <a href=r38_0300.html#r38_0330>rounded</a> is on and its argument evaluates to a
  2155. number.
  2156. <P>
  2157. <P>
  2158. <P>
  2159. <a name=r38_0247>
  2160. <title>ATANH</title></a>
  2161. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  2162. E"></p>
  2163. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  2164. <b>ATANH</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  2165. <P>
  2166. <P>
  2167. <P>
  2168. The <em>atanh</em> operator returns the hyperbolic arctangent of its argument.
  2169. The derivative of <em>asinh</em> and some simple transformations are known
  2170. to the system.
  2171. <P>
  2172. <P>
  2173. <P> <H3>
  2174. syntax: </H3>
  2175. <em>atanh</em>(&lt;expression&gt;) or <em>atanh</em> &lt;simple\_expression&gt;
  2176. <P>
  2177. <P>
  2178. <P>
  2179. &lt;expression&gt; may be any scalar REDUCE expression, not an array, matrix or
  2180. vector expression. &lt;simple\_expression&gt; must be a single identifier or
  2181. begin with a prefix operator name.
  2182. <P>
  2183. <P>
  2184. <P> <H3>
  2185. examples: </H3>
  2186. <p><pre><tt>
  2187. atanh aa;
  2188. ATANH(AA)
  2189. atanh(1);
  2190. ATANH(1)
  2191. df(atanh(x*y),y);
  2192. - X
  2193. ----------
  2194. 2 2
  2195. X *Y - 1
  2196. </tt></pre><p>A numeric value is not returned by <em>asinh</em> unless the switc
  2197. h
  2198. <em>rounded</em> is on and its argument evaluates to a number.
  2199. You may attach additional functionality by defining <em>atanh</em> to be the
  2200. inverse of <em>tanh</em>. This is done by the commands
  2201. <P>
  2202. <P>
  2203. <p><pre><tt>
  2204. put('tanh,'inverse,'atanh);
  2205. put('atanh,'inverse,'tanh);
  2206. </tt></pre><p><P>
  2207. <P>
  2208. <a name=r38_0248>
  2209. <title>ATAN2</title></a>
  2210. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  2211. E"></p>
  2212. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  2213. <b>ATAN2</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  2214. <P>
  2215. <P>
  2216. <P>
  2217. <P> <H3>
  2218. syntax: </H3>
  2219. <em>atan2</em>(&lt;expression&gt;,&lt;expression&gt;)
  2220. <P>
  2221. <P>
  2222. <P>
  2223. &lt;expression&gt; is any valid scalar REDUCE expression. In
  2224. <a href=r38_0300.html#r38_0330>rounded</a> mode, if a numerical value exists,
  2225. <em>atan2</em> returns
  2226. the principal value of the arc tangent of the second argument divided by
  2227. the first in the range [-pi,+pi] radians, using the signs of both
  2228. arguments to determine the quadrant of the return value. An expression in
  2229. terms of <em>atan2</em> is returned in other cases.
  2230. <P>
  2231. <P>
  2232. <P> <H3>
  2233. examples: </H3>
  2234. <p><pre><tt>
  2235. atan2(3,2);
  2236. ATAN2(3,2);
  2237. on rounded;
  2238. atan2(3,2);
  2239. 0.982793723247
  2240. atan2(a,b);
  2241. ATAN2(A,B);
  2242. atan2(1,0);
  2243. 1.57079632679
  2244. </tt></pre><p><em>atan2</em>returns a numeric value only if
  2245. <a href=r38_0300.html#r38_0330>rounded</a> is on. Then
  2246. <em>atan2</em> is calculated to the current degree of floating point precision.
  2247. <P>
  2248. <P>
  2249. <P>
  2250. <P>
  2251. <a name=r38_0249>
  2252. <title>COS</title></a>
  2253. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  2254. E"></p>
  2255. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  2256. <b>COS</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  2257. <P>
  2258. The <em>cos</em> operator returns the cosine of its argument.
  2259. <P>
  2260. <P>
  2261. <P> <H3>
  2262. syntax: </H3>
  2263. <em>cos</em>(&lt;expression&gt;) or <em>cos</em> &lt;simple\_expression&gt;
  2264. <P>
  2265. <P>
  2266. <P>
  2267. &lt;expression&gt; is any valid scalar REDUCE expression,
  2268. &lt;simple\_expression&gt; is a single identifier or begins with a prefix
  2269. operator name.
  2270. <P>
  2271. <P>
  2272. <P> <H3>
  2273. examples: </H3>
  2274. <p><pre><tt>
  2275. cos abc;
  2276. COS(ABC)
  2277. cos(pi);
  2278. -1
  2279. cos 4;
  2280. COS(4)
  2281. on rounded;
  2282. cos(4);
  2283. - 0.653643620864
  2284. cos log 5;
  2285. - 0.0386319699339
  2286. </tt></pre><p><em>cos</em>returns a numeric value only if
  2287. <a href=r38_0300.html#r38_0330>rounded</a> is on. Then the
  2288. cosine is calculated to the current degree of floating point precision.
  2289. <P>
  2290. <P>
  2291. <P>
  2292. <P>