12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693 |
- <a name=r38_0250>
- <title>COSH</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>COSH</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
- <P>
-
- <P>
- <P>
- The <em>cosh</em> operator returns the hyperbolic cosine of its argument.
- The derivative of <em>cosh</em> and some simple transformations are known
- to the system.
- <P>
- <P>
- <P> <H3>
- syntax: </H3>
- <em>cosh</em>(<expression>) or <em>cosh</em> <simple\_expression>
- <P>
- <P>
- <P>
- <expression> may be any scalar REDUCE expression, not an array, matrix or
- vector expression. <simple\_expression> must be a single identifier or
- begin with a prefix operator name.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- cosh b;
- COSH(B)
- cosh(0);
- 1
- df(cosh(x*y),x);
- SINH(X*Y)*Y
- int(cosh(x),x);
- SINH(X)
- </tt></pre><p>You may attach further functionality by defining its inverse (see
- <a href=r38_0200.html#r38_0237>acosh</a>).
- A numeric value is not returned by <em>cosh</em> unless the switch
- <a href=r38_0300.html#r38_0330>rounded</a> is on and its argument evaluates to a
- number.
- <P>
- <P>
- <P>
- <P>
- <a name=r38_0251>
- <title>COT</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>COT</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
- <P>
-
- <em>cot</em> represents the cotangent of its argument. It takes an arbitrary
- scalar expression as its argument. The derivative of <em>acot</em> and some
- simple properties are known to the system.
- <P>
- <P>
- <P> <H3>
- syntax: </H3>
- <em>cot</em>(<expression>) or <em>cot</em> <simple\_expression>
- <P>
- <P>
- <P>
- <expression> may be any scalar REDUCE expression. <simple\_expression
- >
- must be a single identifier or begin with a prefix operator name.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- cot(a)*tan(a);
- COT(A)*TAN(A))
- cot(1);
- COT(1)
- df(cot(2*x),x);
- 2
- - 2*(COT(2*X) + 1)
- </tt></pre><p>Numerical values of expressions involving <em>cot</em> may be foun
- d by
- turning on the switch
- <a href=r38_0300.html#r38_0330>rounded</a>.
- <P>
- <P>
- <P>
- <P>
- <a name=r38_0252>
- <title>COTH</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>COTH</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
- <P>
-
- <P>
- <P>
- The <em>coth</em> operator returns the hyperbolic cotangent of its argument.
- The derivative of <em>coth</em> and some simple transformations are known
- to the system.
- <P>
- <P>
- <P> <H3>
- syntax: </H3>
- <em>coth</em>(<expression>) or <em>coth</em> <simple\_expression>
- <P>
- <P>
- <P>
- <expression> may be any scalar REDUCE expression. <simple\_expression
- >
- must be a single identifier or begin with a prefix operator name.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- df(coth(x*y),x);
- 2
- - Y*(COTH(X*Y) - 1)
- coth acoth z;
- Z
- </tt></pre><p>You can write
- <a href=r38_0150.html#r38_0199>let</a> statements and procedures to add further
- functionality to <em>coth</em> if you wish. Numerical values of expressions
- involving <em>coth</em> may also be found by turning on the switch
- <a href=r38_0300.html#r38_0330>rounded</a>.
- <P>
- <P>
- <P>
- <P>
- <a name=r38_0253>
- <title>CSC</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>CSC</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
- <P>
-
- <P>
- <P>
- The <em>csc</em> operator returns the cosecant of its argument.
- The derivative of <em>csc</em> and some simple transformations are known
- to the system.
- <P>
- <P>
- <P> <H3>
- syntax: </H3>
- <em>csc</em>(<expression>) or <em>csc</em> <simple\_expression>
- <P>
- <P>
- <P>
- <expression> may be any scalar REDUCE expression. <simple\_expression
- >
- must be a single identifier or begin with a prefix operator name.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- csc(q)*sin(q);
- CSC(Q)*SIN(Q)
- df(csc(x*y),x);
- -COT(X*Y)*CSC(X*Y)*Y
- </tt></pre><p>You can write
- <a href=r38_0150.html#r38_0199>let</a> statements and procedures to add further
- functionality to <em>csc</em> if you wish. Numerical values of expressions
- involving <em>csc</em> may also be found by turning on the switch
- <a href=r38_0300.html#r38_0330>rounded</a>.
- <P>
- <P>
- <P>
- <P>
- <a name=r38_0254>
- <title>CSCH</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>CSCH</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
- <P>
-
- <P>
- <P>
- The <em>cosh</em> operator returns the hyperbolic cosecant of its argument.
- The derivative of <em>csch</em> and some simple transformations are known
- to the system.
- <P>
- <P>
- <P> <H3>
- syntax: </H3>
- <em>csch</em>(<expression>) or <em>csch</em> <simple\_expression>
- <P>
- <P>
- <P>
- <expression> may be any scalar REDUCE expression, not an array, matrix or
- vector expression. <simple\_expression> must be a single identifier or
- begin with a prefix operator name.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- csch b;
- CSCH(B)
- csch(0);
- 0
- df(csch(x*y),x);
- - COTH(X*Y)*CSCH(X*Y)*Y
- int(csch(x),x);
- INT(CSCH(X),X)
- </tt></pre><p>A numeric value is not returned by <em>csch</em> unless the switch
-
- <a href=r38_0300.html#r38_0330>rounded</a> is on and its argument evaluates to a
- number.
- <P>
- <P>
- <P>
- <a name=r38_0255>
- <title>ERF</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>ERF</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
- <P>
-
- <P>
- <P>
- The <em>erf</em> operator represents the error function, defined by
- <P>
- <P>
- erf(x) = (2/sqrt(pi))*int(e^(-x^2),x)
- <P>
- <P>
- A limited number of its properties are known to the system, including the
- fact that it is an odd function. Its derivative is known, and from this,
- some integrals may be computed. However, a complete integration procedure
- for this operator is not currently included.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- erf(0);
- 0
- erf(-a);
- - ERF(A)
- df(erf(x**2),x);
- 4*SQRT(PI)*X
- ------------
- 4
- X
- E *PI
- int(erf(x),x);
- 2
- X
- E *ERF(X)*PI*X + SQRT(PI)
- ---------------------------
- 2
- X
- E *PI
- </tt></pre><p>
- <a name=r38_0256>
- <title>EXP</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>EXP</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
- <P>
-
- <P>
- <P>
- The <em>exp</em> operator returns <em>e</em> raised to the power of its argument
- .
- <P> <H3>
- syntax: </H3>
- <P>
- <P>
- <em>exp</em>(<expression>) or <em>exp</em> <simple\_expression>
- <P>
- <P>
- <P>
- <expression> can be any valid REDUCE scalar expression.
- <simple\_expression> must be a single identifier or begin with a
- prefix operator.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- exp(sin(x));
- SIN X
- E
- exp(11);
- 11
- E
- on rounded;
- exp sin(pi/3);
- 2.37744267524
- </tt></pre><p>Numeric values are returned only when <em>rounded</em> is on.
- The single letter <em>e</em> with the exponential operator <em>^</em> or
- <em>**</em> may be substituted for <em>exp</em> without change of function.
- <P>
- <P>
- <P>
- <a name=r38_0257>
- <title>SEC</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>SEC</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
- <P>
-
- The <em>sec</em> operator returns the secant of its argument.
- <P>
- <P>
- <P> <H3>
- syntax: </H3>
- <em>sec</em>(<expression>) or <em>sec</em> <simple\_expression>
- <P>
- <P>
- <P>
- <expression> is any valid scalar REDUCE expression,
- <simple\_expression> is a single identifier or begins with a prefix
- operator name.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- sec abc;
- SEC(ABC)
- sec(pi);
- -1
- sec 4;
- SEC(4)
- on rounded;
- sec(4);
- - 1.52988565647
- sec log 5;
- - 25.8852966005
- </tt></pre><p><em>sec</em>returns a numeric value only if
- <a href=r38_0300.html#r38_0330>rounded</a> is on. Then the
- secant is calculated to the current degree of floating point precision.
- <P>
- <P>
- <P>
- <a name=r38_0258>
- <title>SECH</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>SECH</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
- <P>
-
- <P>
- <P>
- The <em>sech</em> operator returns the hyperbolic secant of its argument.
- <P>
- <P>
- <P> <H3>
- syntax: </H3>
- <em>sech</em>(<expression>) or <em>sech</em> <simple\_expression>
- <P>
- <P>
- <P>
- <expression> is any valid scalar REDUCE expression,
- <simple\_expression> is a single identifier or begins with a prefix
- operator name.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- sech abc;
- SECH(ABC)
- sech(0);
- 1
- sech 4;
- SECH(4)
- on rounded;
- sech(4);
- 0.0366189934737
- sech log 5;
- 0.384615384615
- </tt></pre><p><em>sech</em>returns a numeric value only if
- <a href=r38_0300.html#r38_0330>rounded</a> is on. Then the
- expression is calculated to the current degree of floating point precision.
- <P>
- <P>
- <P>
- <a name=r38_0259>
- <title>SIN</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>SIN</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
- <P>
-
- <P>
- <P>
- The <em>sin</em> operator returns the sine of its argument.
- <P> <H3>
- syntax: </H3>
- <P>
- <P>
- <em>sin</em>(<expression>) or <em>sin</em> <simple\_expression>
- <P>
- <P>
- <P>
- <expression> is any valid scalar REDUCE expression,
- <simple\_expression> is a single identifier or begins with a prefix
- operator name.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- sin aa;
- SIN(AA)
- sin(pi/2);
- 1
- on rounded;
- sin 3;
- 0.14112000806
- sin(pi/2);
- 1.0
- </tt></pre><p><em>sin</em>returns a numeric value only if <em>rounded</em> is on
- .
- Then the sine is calculated to the current degree of floating point precision.
- The argument in this case is assumed to be in radians.
- <P>
- <P>
- <P>
- <a name=r38_0260>
- <title>SINH</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>SINH</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
- <P>
-
- <P>
- <P>
- The <em>sinh</em> operator returns the hyperbolic sine of its argument.
- The derivative of <em>sinh</em> and some simple transformations are known
- to the system.
- <P>
- <P>
- <P> <H3>
- syntax: </H3>
- <em>sinh</em>(<expression>) or <em>sinh</em> <simple\_expression>
- <P>
- <P>
- <P>
- <expression> may be any scalar REDUCE expression, not an array, matrix or
- vector expression. <simple\_expression> must be a single identifier or
- begin with a prefix operator name.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- sinh b;
- SINH(B)
- sinh(0);
- 0
- df(sinh(x**2),x);
- 2
- 2*COSH(X )*X
- int(sinh(4*x),x);
- COSH(4*X)
- ---------
- 4
- on rounded;
- sinh 4;
- 27.2899171971
- </tt></pre><p>You may attach further functionality by defining its inverse (see
- <a href=r38_0200.html#r38_0245>asinh</a>).
- A numeric value is not returned by <em>sinh</em> unless the switch
- <a href=r38_0300.html#r38_0330>rounded</a> is on and its argument evaluates to a
- number.
- <P>
- <P>
- <P>
- <a name=r38_0261>
- <title>TAN</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>TAN</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
- <P>
-
- The <em>tan</em> operator returns the tangent of its argument.
- <P> <H3>
- syntax: </H3>
- <P>
- <P>
- <em>tan</em>(<expression>) or <em>tan</em> <simple\_expression>
- <P>
- <P>
- <P>
- <P>
- <expression> is any valid scalar REDUCE expression,
- <simple\_expression> is a single identifier or begins with a prefix
- operator name.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- tan a;
- TAN(A)
- tan(pi/5);
- PI
- TAN(--)
- 5
- on rounded;
- tan(pi/5);
- 0.726542528005
- </tt></pre><p><em>tan</em>returns a numeric value only if <em>rounded</em> is on
- . Then the
- tangent is calculated to the current degree of floating point accuracy.
- <P>
- <P>
- When
- <a href=r38_0300.html#r38_0330>rounded</a> is on,
- no check is made to see if the argument of <em>tan</em> is a multiple of
- pi/2, for which the tangent goes to positive or negative infinity.
- (Of course, since REDUCE uses a fixed-point representation of pi/2,
- it produces a large but not infinite number.) You need to make a check for
- multiples of pi/2 in any program you use that might possibly ask
- for the tangent of such a quantity.
- <P>
- <P>
- <P>
- <a name=r38_0262>
- <title>TANH</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>TANH</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
- <P>
-
- <P>
- <P>
- The <em>tanh</em> operator returns the hyperbolic tangent of its argument.
- The derivative of <em>tanh</em> and some simple transformations are known
- to the system.
- <P>
- <P>
- <P> <H3>
- syntax: </H3>
- <em>tanh</em>(<expression>) or <em>tanh</em> <simple\_expression>
- <P>
- <P>
- <P>
- <expression> may be any scalar REDUCE expression, not an array, matrix or
- vector expression. <simple\_expression> must be a single identifier or
- begin with a prefix operator name.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- tanh b;
- TANH(B)
- tanh(0);
- 0
- df(tanh(x*y),x);
- 2
- Y*( - TANH(X*Y) + 1)
- int(tanh(x),x);
- 2*X
- LOG(E + 1) - X
- on rounded; tanh 2;
- 0.964027580076
- </tt></pre><p>You may attach further functionality by defining its inverse (see
- <a href=r38_0200.html#r38_0247>atanh</a>).
- A numeric value is not returned by <em>tanh</em> unless the switch
- <a href=r38_0300.html#r38_0330>rounded</a> is on and its argument evaluates to a
- number.
- <P>
- <P>
- <P>
- <a name=r38_0263>
- <title>Elementary Functions</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>Elementary Functions</b><menu>
- <li><a href=r38_0200.html#r38_0236>ACOS operator</a><P>
- <li><a href=r38_0200.html#r38_0237>ACOSH operator</a><P>
- <li><a href=r38_0200.html#r38_0238>ACOT operator</a><P>
- <li><a href=r38_0200.html#r38_0239>ACOTH operator</a><P>
- <li><a href=r38_0200.html#r38_0240>ACSC operator</a><P>
- <li><a href=r38_0200.html#r38_0241>ACSCH operator</a><P>
- <li><a href=r38_0200.html#r38_0242>ASEC operator</a><P>
- <li><a href=r38_0200.html#r38_0243>ASECH operator</a><P>
- <li><a href=r38_0200.html#r38_0244>ASIN operator</a><P>
- <li><a href=r38_0200.html#r38_0245>ASINH operator</a><P>
- <li><a href=r38_0200.html#r38_0246>ATAN operator</a><P>
- <li><a href=r38_0200.html#r38_0247>ATANH operator</a><P>
- <li><a href=r38_0200.html#r38_0248>ATAN2 operator</a><P>
- <li><a href=r38_0200.html#r38_0249>COS operator</a><P>
- <li><a href=r38_0250.html#r38_0250>COSH operator</a><P>
- <li><a href=r38_0250.html#r38_0251>COT operator</a><P>
- <li><a href=r38_0250.html#r38_0252>COTH operator</a><P>
- <li><a href=r38_0250.html#r38_0253>CSC operator</a><P>
- <li><a href=r38_0250.html#r38_0254>CSCH operator</a><P>
- <li><a href=r38_0250.html#r38_0255>ERF operator</a><P>
- <li><a href=r38_0250.html#r38_0256>EXP operator</a><P>
- <li><a href=r38_0250.html#r38_0257>SEC operator</a><P>
- <li><a href=r38_0250.html#r38_0258>SECH operator</a><P>
- <li><a href=r38_0250.html#r38_0259>SIN operator</a><P>
- <li><a href=r38_0250.html#r38_0260>SINH operator</a><P>
- <li><a href=r38_0250.html#r38_0261>TAN operator</a><P>
- <li><a href=r38_0250.html#r38_0262>TANH operator</a><P>
- </menu>
- <a name=r38_0264>
- <title>SWITCHES</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>SWITCHES</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>introduction</b><P>
- <P>
-
- Switches are set on or off using the commands
- <a href=r38_0200.html#r38_0210>on</a> or
- <a href=r38_0200.html#r38_0209>off</a>, respectively.
- The default setting of the switches described in this section is
- <a href=r38_0200.html#r38_0209>off</a> unless stated otherwise.
- <P>
- <P>
- <a name=r38_0265>
- <title>ALGINT</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>ALGINT</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
- <P>
-
- <P>
- <P>
- When the <em>algint</em> switch is on, the algebraic integration module (which
- must be loaded from the REDUCE library) is used for integration.
- <P>
- <P>
- Loading <em>algint</em> from the library automatically turns on the
- <em>algint</em> switch. An error message will be given if <em>algint</em> is
- turned on when the <em>algint</em> has not been loaded from the library.
- <P>
- <P>
- <P>
- <a name=r38_0266>
- <title>ALLBRANCH</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>ALLBRANCH</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
- <P>
-
- When <em>allbranch</em> is on, the operator
- <a href=r38_0150.html#r38_0179>solve</a> selects all
- branches of solutions.
- When <em>allbranch</em> is off, it selects only the principal
- branches. Default is <em>on</em>.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- solve(log(sin(x+3)),x);
- {X=2*ARBINT(1)*PI - ASIN(1) - 3,
- X=2*ARBINT(1)*PI + ASIN(1) + PI - 3}
- off allbranch;
- solve(log(sin(x+3)),x);
- X=ASIN(1) - 3
- </tt></pre><p>
- <a href=r38_0100.html#r38_0138>arbint</a>(1) indicates an arbitrary integer, whi
- ch is given a
- unique identifier by REDUCE, showing that there are infinitely many
- solutions of this type. When <em>allbranch</em> is off, the single
- canonical solution is given.
- <P>
- <P>
- <P>
- <a name=r38_0267>
- <title>ALLFAC</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>ALLFAC</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
- <P>
-
- <P>
- <P>
- The <em>allfac</em> switch, when on, causes REDUCE to factor out automatically
- common products in the output of expressions. Default is <em>on</em>.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- x + x*y**3 + x**2*cos(z);
- 3
- X*(COS(Z)*X + Y + 1)
- off allfac;
- x + x*y**3 + x**2*cos(z);
- 2 3
- COS(Z)*X + X*Y + X
- </tt></pre><p>The <em>allfac</em> switch has no effect when <em>pri</em> is off.
- Although the
- switch setting stays as it was, printing behavior is as if it were off.
- <P>
- <P>
- <P>
- <a name=r38_0268>
- <title>ARBVARS</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>ARBVARS</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
- <P>
-
- <P>
- <P>
- When <em>arbvars</em> is on, the solutions of singular or underdetermined
- systems of equations are presented in terms of arbitrary complex variables
- (see
- <a href=r38_0100.html#r38_0139>arbcomplex</a>). Otherwise, the solution is param
- etrized in
- terms of some of the input variables. Default is <em>on</em>.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- solve({2x + y,4x + 2y},{x,y});
- arbcomplex(1)
- {{x= - -------------,y=arbcomplex(1)}}
- 2
- solve({sqrt(x)+ y**3-1},{x,y});
- 6 3
- {{y=arbcomplex(2),x=y - 2*y + 1}}
- off arbvars;
- solve({2x + y,4x + 2y},{x,y});
- y
- {{x= - -}}
- 2
- solve({sqrt(x)+ y**3-1},{x,y});
- 6 3
- {{x=y - 2*y + 1}}
- </tt></pre><p>With <em>arbvars</em> off, the return value <em>{{}}</em> means th
- at the
- equations given to
- <a href=r38_0150.html#r38_0179>solve</a> imply no relation among the input
- variables.
- <P>
- <P>
- <P>
- <a name=r38_0269>
- <title>BALANCED_MOD</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>BALANCED\_MOD</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
- <P>
-
- <P>
- <P>
- <a href=r38_0300.html#r38_0305>modular</a>numbers are normally produced in the r
- ange [0,...<n>),
- where
- <n> is the current modulus. With <em>balanced_mod</em> on, the range
- [-<n>/2,<n>/2], or more precisely
- [-floor((<n>-1)/2), ceiling((<n>-1)/2)], is used instead.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- setmod 7;
- 1
- on modular;
- 4;
- 4
- on balanced_mod;
- 4;
- -3
- </tt></pre><p>
- <a name=r38_0270>
- <title>BFSPACE</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>BFSPACE</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
- <P>
-
- <P>
- <P>
- Floating point numbers are normally printed in a compact notation (either
- fixed point or in scientific notation if
- <a href=r38_0200.html#r38_0219>SCIENTIFIC_NOTATION</a>
- has been used). In some (but not all) cases, it helps comprehensibility
- if spaces are inserted in the number at regular intervals. The switch
- <em>bfspace</em>, if on, will cause a blank to be inserted in the number after
- every five characters.
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- on rounded;
- 1.2345678;
- 1.2345678
- on bfspace;
- 1.2345678;
- 1.234 5678
- </tt></pre><p><P>
- <P>
- <em>bfspace</em>is normally off.
- <P>
- <P>
- <P>
- <a name=r38_0271>
- <title>COMBINEEXPT</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>COMBINEEXPT</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
- <P>
-
- <P>
- <P>
- REDUCE is in general poor at surd simplification. However, when the
- switch <em>combineexpt</em> is on, the system attempts to combine
- exponentials whenever possible.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- 3^(1/2)*3^(1/3)*3^(1/6);
- 1/3 1/6
- SQRT(3)*3 *3
- on combineexpt;
- ws;
- 1
- </tt></pre><p>
- <a name=r38_0272>
- <title>COMBINELOGS</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>COMBINELOGS</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
- <P>
-
- <P>
- <P>
- In many cases it is desirable to expand product arguments of logarithms,
- or collect a sum of logarithms into a single logarithm. Since these are
- inverse operations, it is not possible to provide rules for doing both at
- the same time and preserve the REDUCE concept of idempotent evaluation.
- As an alternative, REDUCE provides two switches
- <a href=r38_0250.html#r38_0285>expandlogs</a> and
- <em>combinelogs</em> to carry out these operations.
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- on expandlogs;
- log(x*y);
- LOG(X) + LOG(Y)
- on combinelogs;
- ws;
- LOG(X*Y)
- </tt></pre><p><P>
- <P>
- At the present time, it is possible to have both switches on at once,
- which could lead to infinite recursion. However, an expression is
- switched from one form to the other in this case. Users should not rely
- on this behavior, since it may change in the next release.
- <P>
- <P>
- <P>
- <a name=r38_0273>
- <title>COMP</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>COMP</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
- <P>
-
- <P>
- <P>
- When <em>comp</em> is on, any succeeding function definitions are compiled
- into a faster-running form. Default is <em>off</em>.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt></tt></pre><p>The following procedure finds Fibonacci numbers recurs
- ively.
- Create a new file ``refib" in your current directory with the following
- lines in it:<p><pre><tt>
- procedure refib(n);
- if fixp n and n >= 0 then
- if n <= 1 then 1
- else refib(n-1) + refib(n-2)
- else rederr "nonnegative integer only";
- end;
- </tt></pre><p>Now load REDUCE and run the following:<p><pre><tt>
- on time;
- Time: 100 ms
- in "refib"$
- Time: 0 ms
-
- REFIB
-
- Time: 260 ms
-
- Time: 20 ms
- refib(80);
- 37889062373143906
-
- Time: 14840 ms
- on comp;
- Time: 80 ms
- in "refib"$
- Time: 20 ms
-
- REFIB
-
- Time: 640 ms
- refib(80);
- 37889062373143906
-
- Time: 10940 ms
- </tt></pre><p>
- <P>
- <P>
- Note that the compiled procedure runs faster. Your time messages will
- differ depending upon which system you have. Compiled functions remain so
- for the duration of the REDUCE session, and are then lost. They must be
- recompiled if wanted in another session. With the switch
- <a href=r38_0300.html#r38_0333>time</a> on
- as shown above, the CPU time used in executing the command is returned in
- milliseconds. Be careful not to leave <em>comp</em> on unless you want it,
- as it makes the processing of procedures much slower.
- <P>
- <P>
- <P>
- <P>
- <a name=r38_0274>
- <title>COMPLEX</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>COMPLEX</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
- <P>
-
- <P>
- <P>
- When the <em>complex</em> switch is on, full complex arithmetic is used in
- simplification, function evaluation, and factorization. Default is <em>off</em>.
-
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- factorize(a**2 + b**2);
- 2 2
- {{A + B ,1}}
- on complex;
- factorize(a**2 + b**2);
- {{A + I*B,1},{A - I*B,1}}
- (x**2 + y**2)/(x + i*y);
- X - I*Y
- on rounded;
- *** Domain mode COMPLEX changed to COMPLEX_FLOAT
- sqrt(-17);
- 4.12310562562*I
- log(7*i);
- 1.94591014906 + 1.57079632679*I
- </tt></pre><p>Complex floating-point can be done by turning on
- <a href=r38_0300.html#r38_0330>rounded</a> in
- addition to <em>complex</em>. With <em>complex</em> off however, REDUCE knows
- that i is the square root of -1 but will not
- carry out more complicated complex operations. If you want complex
- denominators cleared by multiplication by their conjugates, turn on the
- switch
- <a href=r38_0300.html#r38_0324>rationalize</a>.
- <P>
- <P>
- <P>
- <a name=r38_0275>
- <title>CREF</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>CREF</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
- <P>
-
- <P>
- <P>
- The switch <em>cref</em> invokes the CREF cross-reference program that
- processes a set of procedure definitions to produce a summary of their
- entry points, undefined procedures, non-local variables and so on. The
- program will also check that procedures are called with a consistent
- number of arguments, and print a diagnostic message otherwise.
- <P>
- <P>
- The output is alphabetized on the first seven characters of each function
- name.
- <P>
- <P>
- To invoke the cross-reference program, <em>cref</em> is first turned on.
- This causes the program to load and the cross-referencing process to
- begin. After all the required definitions are loaded, turning <em>cref</em>
- off will cause a cross-reference listing to be produced.
- <P>
- <P>
- Algebraic procedures in REDUCE are treated as if they were symbolic, so
- that algebraic constructs will actually appear as calls to symbolic
- functions, such as <em>aeval</em>.
- <P>
- <P>
- <P>
- <a name=r38_0276>
- <title>CRAMER</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>CRAMER</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
- <P>
-
- <P>
- <P>
- When the <em>cramer</em> switch is on,
- <a href=r38_0300.html#r38_0345>matrix</a> inversion
- and linear equation
- solving (operator
- <a href=r38_0150.html#r38_0179>solve</a>) is done by Cramer's rule, through exte
- rior
- multiplication. Default is <em>off</em>.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- on time;
- Time: 80 ms
- off output;
- Time: 100 ms
- mm := mat((a,b,c,d,f),(a,a,c,f,b),(b,c,a,c,d), (c,c,a,b,f),
- (d,a,d,e,f));
-
- Time: 300 ms
- inverse := 1/mm;
- Time: 18460 ms
- on cramer;
- Time: 80 ms
- cramersinv := 1/mm;
- Time: 9260 ms
- </tt></pre><p>Your time readings will vary depending on the REDUCE version you u
- se.
- After you invert the matrix, turn on
- <a href=r38_0300.html#r38_0314>output</a> and ask for one of
- the elements of the inverse matrix, such as <em>cramersinv(3,2)</em>, so that
- you can see the size of the expressions produced.
- <P>
- <P>
- Inversion of matrices and the solution of linear equations with dense
- symbolic entries in many variables is generally considerably faster with
- <em>cramer</em> on. However, inversion of numeric-valued matrices is
- slower. Consider the matrices you're inverting before deciding whether to
- turn <em>cramer</em> on or off. A substantial portion of the time in matrix
- inversion is given to formatting the results for printing. To save this
- time, turn <em>output</em> off, as shown in this example or terminate the
- expression with a dollar sign instead of a semicolon. The results are
- still available to you in the workspace associated with your prompt
- number, or you can assign them to an identifier for further use.
- <P>
- <P>
- <P>
- <a name=r38_0277>
- <title>DEFN</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>DEFN</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
- <P>
-
- <P>
- <P>
- When the switch <em>defn</em> is on, the Standard Lisp equivalent of the
- input statement or procedure is printed, but not evaluated. Default is
- <em>off</em>.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- on defn;
- 17/3;
- (AEVAL (LIST 'QUOTIENT 17 3))
- df(sin(x),x,2);
-
- (AEVAL (LIST 'DF (LIST 'SIN 'X) 'X 2))
- procedure coshval(a);
- begin scalar g;
- g := (exp(a) + exp(-a))/2;
- return g
- end;
-
- (AEVAL
- (PROGN
- (FLAG '(COSHVAL) 'OPFN)
- (DE COSHVAL (A)
- (PROG (G)
- (SETQ G
- (AEVAL
- (LIST
- 'QUOTIENT
- (LIST
- 'PLUS
- (LIST 'EXP A)
- (LIST 'EXP (LIST 'MINUS A)))
- 2)))
- (RETURN G)))) )
- coshval(1);
- (AEVAL (LIST 'COSHVAL 1))
- off defn;
- coshval(1);
- Declare COSHVAL operator? (Y or N)
- n
- procedure coshval(a);
- begin scalar g;
- g := (exp(a) + exp(-a))/2;
- return g
- end;
-
- COSHVAL
- on rounded;
- coshval(1);
- 1.54308063482
- </tt></pre><p>The above function <em>coshval</em> finds the hyperbolic cosine (c
- osh) of its
- argument. When <em>defn</em> is on, you can see the Standard Lisp equivalent
- of the function, but it is not entered into the system as shown by the
- message <em>Declare COSHVAL operator?</em>. It must be reentered with
- <em>defn</em> off to be recognized. This procedure is used as an example; a
- more efficient procedure would eliminate the unnecessary local variable
- with
- <p><pre><tt>
- procedure coshval(a);
- (exp(a) + exp(-a))/2;
- </tt></pre><p><P>
- <P>
- <P>
- <P>
- <a name=r38_0278>
- <title>DEMO</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>DEMO</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
- <P>
-
- <P>
- <P>
- The <em>demo</em> switch is used for interactive files, causing the system
- to pause after each command in the file until you type a <em>Return</em>.
- Default is <em>off</em>.
- <P>
- <P>
- The switch <em>demo</em> has no effect on top level interactive
- statements. Use it when you want to slow down operations in a file so
- you can see what is happening.
- <P>
- <P>
- You can either include the <em>on demo</em> command in the file, or enter
- it from the top level before bringing in any file. Unlike the
- <a href=r38_0100.html#r38_0128>pause</a> command, <em>on demo</em> does not perm
- it you to interrupt
- the file for questions of your own.
- <P>
- <P>
- <P>
- <P>
- <a name=r38_0279>
- <title>DFPRINT</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>DFPRINT</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
- <P>
-
- <P>
- <P>
- When <em>dfprint</em> is on, expressions in the differentiation operator
- <a href=r38_0100.html#r38_0148>df</a> are printed in a more ``natural'' notation
- , with the
- differentiation variables appearing as subscripts. In addition, if the
- switch
- <a href=r38_0300.html#r38_0310>noarg</a> is on (the default), the arguments of t
- he
- differentiated operator are suppressed.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- operator f;
- df(f x,x);
- DF(F(X),X);
- on dfprint;
- ws;
- F
- X
- df(f(x,y),x,y);
- F
- Y
- off noarg;
- ws;
- F(X,Y)
- X
- </tt></pre><p>
- <a name=r38_0280>
- <title>DIV</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>DIV</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
- <P>
-
- <P>
- <P>
- When <em>div</em> is on, the system divides any simple factors found in
- the denominator of an expression into the numerator. Default is <em>off</em>.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- on div;
- a := x**2/y**2;
- 2 -2
- A := X *Y
- b := a/(3*z);
- 1 2 -2 -1
- B := -*X *Y *Z
- 3
- off div;
- a;
- 2
- X
- ---
- 2
- Y
- b;
- 2
- X
- -------
- 2
- 3*Y *Z
- </tt></pre><p>The <em>div</em> switch only has effect when the
- <a href=r38_0300.html#r38_0319>pri</a> switch is on.
- When <em>pri</em> is off, regardless of the setting of <em>div</em>, the
- printing behavior is as if <em>div</em> were off.
- <P>
- <P>
- <P>
- <a name=r38_0281>
- <title>ECHO</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>ECHO</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
- <P>
-
- <P>
- <P>
- The <em>echo</em> switch is normally off for top-level entry, and on when files
- are brought in. If <em>echo</em> is turned on at the top level, your input
- statements are echoed to the screen (thus appearing twice). Default
- <em>off</em> (but note default <em>on</em> for files).
- <P>
- <P>
- If you want to display certain portions of a file and not others, use the
- commands <em>off echo</em> and <em>on echo</em> inside the file. If you want
- no display of the file, use the input command
- <P>
- <P>
- <em>in</em> filename<em>$</em>
- <P>
- <P>
- rather than using the semicolon delimiter.
- <P>
- <P>
- Be careful when you use commands within a file to generate another file.
- Since <em>echo</em> is on for files, the output file echoes input statements
- (unlike its behavior from the top level). You should explicitly turn off
- <em>echo</em> when writing output, and turn it back on when you're done.
- <P>
- <P>
- <P>
- <a name=r38_0282>
- <title>ERRCONT</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>ERRCONT</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
- <P>
-
- <P>
- <P>
- When the <em>errcont</em> switch is on, error conditions do not stop file
- execution. Error messages will be printed whether <em>errcont</em> is on or
- off.
- <P>
- <P>
- Default is <em>off</em>.
- <P>
- <P>
- The following describes what happens when an error occurs in a file under
- each setting of <em>errcont</em> and <em>int</em>:
- <P>
- <P>
- Both off: Message is printed and parsing continues, but no further
- statements are executed; no commands from keyboard accepted except bye or
- end;
- <P>
- <P>
- <em>errcont</em>off, <em>int</em> on: Message is printed, and you are asked
- if you wish to continue. (This is the default behavior);
- <P>
- <P>
- <em>errcont</em>on, <em>int</em> off: Message is printed, and file continues
- to execute without pause;
- <P>
- <P>
- Both on: Message is printed, and file continues to execute without pause.
- <P>
- <P>
- <P>
- <P>
- <a name=r38_0283>
- <title>EVALLHSEQP</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>EVALLHSEQP</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
- <P>
-
- <P>
- <P>
- Under normal circumstances, the right-hand-side of an
- <a href=r38_0001.html#r38_0045>equation</a>
- is evaluated but not the left-hand-side. This also applies to any
- substitutions made by the
- <a href=r38_0150.html#r38_0182>sub</a> operator. If both sides are to be
- evaluated, the switch <em>evallhseqp</em> should be turned on.
- <P>
- <P>
- <a name=r38_0284>
- <title>EXP_switch</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>EXP</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
- <P>
-
- <P>
- <P>
- When the <em>exp</em> switch is on, powers and products of expressions are
- expanded. Default is <em>on</em>.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- (x+1)**3;
- 3 2
- X + 3*X + 3*X + 1
- (a + b*i)*(c + d*i);
- A*C + A*D*I + B*C*I - B*D
- off exp;
- (x+1)**3;
- 3
- (X + 1)
- (a + b*i)*(c + d*i);
- (A + B*I)*(C + D*I)
- length((x+1)**2/(y+1));
- 2
- </tt></pre><p>Note that REDUCE knows that i^2 = -1.
- When <em>exp</em> is off, equivalent expressions may not simplify to the same
- form, although zero expressions still simplify to zero. Several operators
- that expect a polynomial argument behave differently when <em>exp</em> is
- off, such as
- <a href=r38_0150.html#r38_0157>length</a>. Be cautious about leaving <em>exp
- </em> off.
- <P>
- <P>
- <P>
- <a name=r38_0285>
- <title>EXPANDLOGS</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>EXPANDLOGS</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
- <P>
-
- <P>
- <P>
- In many cases it is desirable to expand product arguments of logarithms,
- or collect a sum of logarithms into a single logarithm. Since these are
- inverse operations, it is not possible to provide rules for doing both at
- the same time and preserve the REDUCE concept of idempotent evaluation.
- As an alternative, REDUCE provides two switches <em>expandlogs</em> and
- <a href=r38_0250.html#r38_0272>combinelogs</a> to carry out these operations. Bo
- th are off by default.
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- on expandlogs;
- log(x*y);
- LOG(X) + LOG(Y)
- on combinelogs;
- ws;
- LOG(X*Y)
- </tt></pre><p><P>
- <P>
- At the present time, it is possible to have both switches on at once,
- which could lead to infinite recursion. However, an expression is
- switched from one form to the other in this case. Users should not rely
- on this behavior, since it may change in the next release.
- <P>
- <P>
- <P>
- <a name=r38_0286>
- <title>EZGCD</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>EZGCD</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
- <P>
-
- <P>
- <P>
- When <em>ezgcd</em> and
- <a href=r38_0050.html#r38_0086>gcd</a> are on, greatest common divisors are
- computed using the EZ GCD algorithm that uses modular arithmetic (and is
- usually faster). Default is <em>off</em>.
- <P>
- <P>
- As a side effect of the gcd calculation, the expressions involved are
- factored, though not the heavy-duty factoring of
- <a href=r38_0150.html#r38_0151>factorize</a>. The
- EZ GCD algorithm was introduced in a paper by J. Moses and D.Y.Y. Yun in
- <Proceedings of the ACM>, 1973, pp. 159-166.
- <P>
- <P>
- Note that the
- <a href=r38_0050.html#r38_0086>gcd</a> switch must also be on for <em>ezgcd</em>
- to have
- effect.
- <P>
- <P>
- <P>
- <a name=r38_0287>
- <title>FACTOR</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>FACTOR</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
- <P>
-
- <P>
- <P>
- When the <em>factor</em> switch is on, input expressions and results are
- automatically factored.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- on factor;
- aa := 3*x**3*a + 6*x**2*y*a + 3*x**3*b + 6*x**2*y*b
- + x*y*a + 2*y**2*a + x*y*b + 2*y**2*b;
-
- 2
- AA := (A + B)*(3*X + Y)*(X + 2*Y)
- off factor;
- aa;
- 3 2 2 3 2
- 3*A*X + 6*A*X *Y + A*X*Y + 2*A*Y + 3*B*X + 6*B*X *Y
- + B*X*Y + 2*B*Y^{2}
- on factor;
- ab := x**2 - 2;
- 2
- AB := X - 2
- </tt></pre><p>REDUCE factors univariate and multivariate polynomials with
- integer coefficients, finding any factors that also have integer coefficients.
- The factoring is done by reducing multivariate problems to univariate
- ones with symbolic coefficients, and then solving the univariate ones modulo
- small primes. The results of these calculations are merged to
- determine the factors of the original polynomial. The factorizer normally
- selects evaluation points and primes using a random number generator.
- Thus, the detailed factoring behavior may be different each time any
- particular problem is tackled.
- <P>
- <P>
- When the <em>factor</em> switch is turned on, the
- <a href=r38_0250.html#r38_0256>exp</a> switch is
- turned off, and when the <em>factor</em> switch is turned off, the
- <a href=r38_0250.html#r38_0256>exp</a> switch is turned on, whether it was on pr
- eviously or not.
- <P>
- <P>
- When the switch
- <a href=r38_0300.html#r38_0335>trfac</a> is on, informative messages are generat
- ed at
- each call to the factorizer. The
- <a href=r38_0300.html#r38_0334>trallfac</a> switch causes the
- production of a more verbose trace message. It takes precedence over
- <em>trfac</em> if they are both on.
- <P>
- <P>
- To factor a polynomial explicitly and store the results, use the operator
- <a href=r38_0150.html#r38_0151>factorize</a>.
- <P>
- <P>
- <P>
- <a name=r38_0288>
- <title>FAILHARD</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>FAILHARD</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
- <P>
-
- <P>
- <P>
- When the <em>failhard</em> switch is on, the integration operator
- <a href=r38_0150.html#r38_0154>int</a>
- terminates with an error message if the integral cannot be done in closed
- terms.
- Default is off.
- <P>
- <P>
- Use the <em>failhard</em> switch when you are dealing with complicated integrals
-
- and want to know immediately if REDUCE was unable to handle them. The
- integration operator sometimes returns a formal integration form that is
- more complicated than the original expression, when it is unable to
- complete the integration.
- <P>
- <P>
- <P>
- <a name=r38_0289>
- <title>FORT</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>FORT</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
- <P>
-
- <P>
- <P>
- When <em>fort</em> is on, output is given Fortran-compatible syntax. Default
- is <em>off</em>.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- on fort;
- df(sin(7*x + y),x);
- ANS=7.*COS(7*X+Y)
- on rounded;
- b := log(sin(pi/5 + n*pi));
- B=LOG(SIN(3.14159265359*N+0.628318530718))
- </tt></pre><p>REDUCE results can be written to a file (using
- <a href=r38_0200.html#r38_0233>out</a>) and used as data
- by Fortran programs when <em>fort</em> is in effect. <em>fort</em> knows about
- correct statement length, continuation characters, defining a symbol when
- it is first used, and other Fortran details.
- <P>
- <P>
- The
- <a href=r38_0650.html#r38_0652>GENTRAN</a> package offers many more possibilitie
- s than the
- <em>fort</em> switch. It produces Fortran (or C or Ratfor) code from REDUCE
- procedures or structured specifications, including facilities for producing
- double precision output.
- <P>
- <P>
- <P>
- <a name=r38_0290>
- <title>FORTUPPER</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>FORTUPPER</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
- <P>
-
- <P>
- <P>
- When <em>fortupper</em> is on, any Fortran-style output appears in upper case.
- Default is <em>off</em>.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- on fort;
- df(sin(7*x + y),x);
- ans=7.*cos(7*x+y)
- on fortupper;
- df(sin(7*x + y),x);
- ANS=7.*COS(7*X+Y)
- </tt></pre><p>
- <a name=r38_0291>
- <title>FULLPREC</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>FULLPREC</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
- <P>
-
- <P>
- <P>
- Trailing zeroes of rounded numbers to the full system precision are
- normally not printed. If this information is needed, for example to get a
- more understandable indication of the accuracy of certain data, the switch
- <em>fullprec</em> can be turned on.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- on rounded;
- 1/2;
- 0.5
- on fullprec;
- ws;
- 0.500000000000
- </tt></pre><p>This is just an output options which neither influences
- the accuracy of the computation nor does it give additional
- information about the precision of the results.
- See also
- <a href=r38_0200.html#r38_0219>scientific_notation</a>.
- <P>
- <P>
- <P>
- <a name=r38_0292>
- <title>FULLROOTS</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>FULLROOTS</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
- <P>
-
- <P>
- <P>
- Since roots of cubic and quartic polynomials can often be very
- messy, a switch <em>fullroots</em> controls the production
- of results in closed form.
- <a href=r38_0150.html#r38_0179>solve</a> will apply the
- formulas for explicit forms for degrees 3 and 4 only if
- <em>fullroots</em> is <em>on</em>. Otherwise the result forms
- are built using
- <a href=r38_0150.html#r38_0176>root_of</a>. Default is <em>off</em>.
- <P>
- <P>
- <a name=r38_0293>
- <title>GC</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>GC</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
- <P>
-
- <P>
- <P>
- With the <em>gc</em> switch, you can turn the garbage collection messages on
- or off. The form of the message depends on the particular Lisp used for
- the REDUCE implementation.
- <P>
- <P>
- See
- <a href=r38_0100.html#r38_0130>reclaim</a> for an explanation of garbage collect
- ion. REDUCE does
- garbage collection when needed even if you have turned the notices off.
- <P>
- <P>
- <P>
- <a name=r38_0294>
- <title>GCD_switch</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>GCD</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
- <P>
-
- <P>
- <P>
- When <em>gcd</em> is on, common factors in numerators and denominators of
- expressions are canceled. Default is <em>off</em>.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- (2*(f*h)**2 - f**2*g*h - (f*g)**2 - f*h**3 + f*h*g**2
- - h**4 + g*h**3)/(f**2*h - f**2*g - f*h**2 + 2*f*g*h
- - f*g**2 - g*h**2 + g**2*h);
-
- 2 2 2 2 2 2 3 3 4
- F *G + F *G*H - 2*F *H - F*G *H + F*H - G*H + H
- ----------------------------------------------------
- 2 2 2 2 2 2
- F *G - F *H + F*G - 2*F*G*H + F*H - G *H + G*H
- on gcd;
- ws;
- 2
- F*G + 2*F*H + H
- ----------------
- F + G
- e2 := a*c + a*d + b*c + b*d;
- E2 := A*C + A*D + B*C + B*D
- off exp;
- e2;
- (A + B)*(C + D)
- </tt></pre><p>Even with <em>gcd</em> off, a check is automatically made for comm
- on variable
- and numerical products in the numerators and denominators of expression,
- and the appropriate cancellations made. Thus the example demonstrating the
- use of <em>gcd</em> is somewhat complicated. Note when
- <a href=r38_0250.html#r38_0256>exp</a> is off,
- <em>gcd</em> has the side effect of factoring the expression.
- <P>
- <P>
- <P>
- <a name=r38_0295>
- <title>HORNER</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>HORNER</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
- <P>
-
- <P>
- <P>
- When the <em>horner</em> switch is on, polynomial expressions are printed
- in Horner's form for faster and safer numerical evaluation. Default
- is <em>off</em>. The leading variable of the expression is selected as
- Horner variable. To select the Horner variable explicitly use the
- <a href=r38_0150.html#r38_0198>korder</a> declaration.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- on horner;
- (13p-4q)^3;
- 3 2
- ( - 64)*q + p*(624*q + p*(( - 2028)*q + p*2197))
- korder q;
- ws;
- 3 2
- 2197*p + q*(( - 2028)*p + q*(624*p + q*(-64)))
- </tt></pre><p>
- <a name=r38_0296>
- <title>IFACTOR</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>IFACTOR</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
- <P>
-
- <P>
- <P>
- When the <em>ifactor</em> switch is on, any integer terms appearing as a result
- of the
- <a href=r38_0150.html#r38_0151>factorize</a> command are factored themselves int
- o primes. Default
- is <em>off</em>. If the argument of <em>factorize</em> is an integer,
- <em>ifactor</em> has no effect, since the integer is always factored.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- factorize(4*x**2 + 28*x + 48);
- {{4,1},{X + 4,1},{X + 3,1}}
- factorize(22587);
- {{3,1},{7529,1}}
- on ifactor;
- factorize(4*x**2 + 28*x + 48);
- {{2,2},{X + 4,1},{X + 3,1}}
- factorize(22587);
- {{3,1},{7529,1}}
- </tt></pre><p>Constant terms that appear within nonconstant
- polynomial factors are not factored.
- <P>
- <P>
- The <em>ifactor</em> switch affects only factoring done specifically
- with
- <a href=r38_0150.html#r38_0151>factorize</a>, not on factoring done automaticall
- y when the
- <a href=r38_0250.html#r38_0287>factor</a> switch is on.
- <P>
- <P>
- <P>
- <a name=r38_0297>
- <title>INT_switch</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>INT</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
- <P>
-
- <P>
- <P>
- The <em>int</em> switch specifies an interactive mode of operation. Default
- <em>on</em>.
- <P>
- <P>
- There is no reason to turn <em>int</em> off during interactive calculations,
- since there are no benefits to be gained. If you do have <em>int</em> off
- while inputting a file, and REDUCE finds an error, it prints the message
- ``Continuing with parsing only." In this state, REDUCE accepts only
- <a href=r38_0001.html#r38_0044>end</a><em>;</em> or
- <a href=r38_0100.html#r38_0124>bye</a><em>;</em> from the keyboard;
- everything else is ignored, even the command <em>on int</em>.
- <P>
- <P>
- <P>
- <a name=r38_0298>
- <title>INTSTR</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>INTSTR</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
- <P>
-
- <P>
- <P>
- If <em>intstr</em> (for ``internal structure'') is on, arguments of an
- operator are printed in a more structured form.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- operator f;
- f(2x+2y);
- F(2*X + 2*Y)
- on intstr;
- ws;
- F(2*(X + Y))
- </tt></pre><p>
- <a name=r38_0299>
- <title>LCM</title></a>
- <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
- E"></p>
- <b><a href=r38_idx.html>INDEX</a></b><p><p>
- <b>LCM</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
- <P>
-
- <P>
- <P>
- The <em>lcm</em> switch instructs REDUCE to compute the least common multiple
- of denominators whenever rational expressions occur. Default is <em>on</em>.
- <P>
- <P>
- <P> <H3>
- examples: </H3>
- <p><pre><tt>
- off lcm;
- z := 1/(x**2 - y**2) + 1/(x-y)**2;
-
- 2*X*(X - Y)
- Z := -------------------------
- 4 3 3 4
- X - 2*X *Y + 2*X*Y - Y
- on lcm;
- z;
- 2*X*(X - Y)
- -------------------------
- 4 3 3 4
- X - 2*X *Y + 2*X*Y - Y
- zz := 1/(x**2 - y**2) + 1/(x-y)**2;
-
- 2*X
- ZZ := ---------------------
- 3 2 2 3
- X - X *Y - X*Y + Y
- on gcd;
- z;
- 2*X
- ----------------------
- 3 2 2 3
- X - X *Y - X*Y + Y
- </tt></pre><p>Note that <em>lcm</em> has effect only when rational expressions a
- re first
- combined. It does not examine existing structures for simplifications on
- display. That is shown above when z is entered with
- <em>lcm</em> off. It remains unsimplified even after <em>lcm</em> is turned
- back on. However, a new variable containing the same expression is
- simplified on entry. The switch
- <a href=r38_0050.html#r38_0086>gcd</a> does examine existing
- structures, as shown in the last example line above.
- <P>
- <P>
- Full greatest common divisor calculations become expensive if work with
- large rational expressions is required. A considerable savings of time
- can be had if a full gcd check is made only when denominators are combined,
- and only a partial check for numerators. This is the effect of the <em>lcm</em>
- switch.
- <P>
- <P>
- <P>
|