diff --git a/changelog b/changelog index 652e829..684be9c 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,18 @@ +20071215 tpd src/interp/bookvol5 browse and top-level command handling +20071215 tpd src/interp/setq.lisp move command initialization to bookvol5 +20071215 tpd src/interp/nci.lisp move ncloopInclude to bookvol5 +20071215 tpd src/interp/intint.lisp move setCurrentLine to bookvol5 +20071215 tpd src/interp/int-top.boot move ncloopCommand, etc. to bookvol5 +20071215 tpd src/interp/incl.boot move incBiteOff to bookvol5 +20071215 tpd src/interp/i-syscmd.boot move $SYSCOMMANDS to bookvol5 +20071215 tpd src/interp/bootfuns.lisp move $systemCommands to bookvol5 +20071215 tpd src/hyper/Makefile expand bookvol11 for the browser +20071215 tpd src/algebra/axserver.spad algebra code to support AJAX +20071215 tpd src/hyper/axbook.tgz add book pages for browser +20071215 tpd src/hyper/bigbayou.png add browse rootpage background +20071215 tpd src/hyper/bookvol11 add the pages for the browser +20071215 tpd src/hyper/doctitle.png add headline for browser pages +20071214 tpd faq FAQ 44: I don't have the math fonts 20071208 tpd src/algebra/axserver.spad add makeDBPage, getShow 20071208 tpd src/interp/http.lisp add replace-entities 20071206 tpd src/interp/daase.lisp find the right sourcefile (bug 7020) diff --git a/faq b/faq index 2083417..0465fd7 100644 --- a/faq +++ b/faq @@ -42,6 +42,7 @@ FAQ 40: Text entry fails in the hypertex browser window FAQ 41: How can I work in lisp from Axiom? FAQ 42: How can I output equations as lisp s-expressions? FAQ 43: Is Axiom's License compatible with the GPL? +FAQ 44: I don't have the math fonts =================================================================== FAQ 0: How do I use Axiom? @@ -1590,3 +1591,17 @@ which we quote here: Please note that all legal discussions should occur ONLY on the axiom-legal@nongnu.org mailing list and not copied to the other developer mailing lists. + +=================================================================== +FAQ 44: I don't have the math fonts +=================================================================== +View the file zips/mathops.html to see if you have all the symbols. +See http://www.unicode.org/charts/PDF/U2200.pdf + +There is a file zips/axiomfonts.tgz which contains some of the fonts +(mostly the Stix fonts which recently became available). Other +missing fonts can be found at: + +http://www.stixfonts.org +http://www.alanwood.net/unicode +http://support.wolfram.com/mathematica/systems/windows/general/latestfonts.html diff --git a/src/algebra/axserver.spad.pamphlet b/src/algebra/axserver.spad.pamphlet index 57ab398..77910f1 100644 --- a/src/algebra/axserver.spad.pamphlet +++ b/src/algebra/axserver.spad.pamphlet @@ -28,8 +28,9 @@ AxiomServer: public == private where getFile: (SExpression,String) -> Void getCommand: (SExpression,String) -> Void getDescription: String -> String - getLisp: (SExpression,String) -> Void - getShow: (SExpression,String) -> Void + getInterp: (SExpression,String) -> Void + getLisp: (SExpression,String) -> Void + getShow: (SExpression,String) -> Void lastStep: () -> String lastType: () -> String formatMessages: String -> String @@ -42,7 +43,7 @@ AxiomServer: public == private where getDatabase(constructor:String, key:String):String == answer:=string GETDATABASE(INTERN$Lisp constructor,INTERN$Lisp key)$Lisp - WriteLine$Lisp concat ["getDatabase: ",constructor," ",key," ",answer] +-- WriteLine$Lisp concat ["getDatabase: ",constructor," ",key," ",answer] answer @ @@ -51,7 +52,7 @@ When it gets a input on the socket it calls the server function on the socket input. <>= axServer(port:Integer,serverfunc:SExpression->Void):Void == - WriteLine("socketServer")$Lisp + WriteLine$Lisp "listening on port 8085" s := SiSock(port,serverfunc)$Lisp -- To listen for just one connection and then close the socket -- uncomment i := 0. @@ -77,7 +78,7 @@ A POST request starts with <>= multiServ(s:SExpression):Void == - WriteLine("multiServ begin")$Lisp +-- WriteLine("multiServ begin")$Lisp headers:String := "" char:String -- read in the http headers @@ -85,13 +86,13 @@ A POST request starts with STRING(READ_-CHAR_-NO_-HANG(s,NIL$Lisp,'EOF)$Lisp)$Lisp) ^= "EOF"_ repeat headers := concat [headers,char] - sayTeX$Lisp headers +-- sayTeX$Lisp headers StringMatch("([^ ]*)", headers)$Lisp u:UniversalSegment(Integer) u := segment(MatchBeginning(1)$Lisp+1,_ MatchEnd(1)$Lisp)$UniversalSegment(Integer) reqtype:String := headers.u - sayTeX$Lisp concat ["request type: ",reqtype] +-- sayTeX$Lisp concat ["request type: ",reqtype] if reqtype = "GET" then StringMatch("GET ([^ ]*)",headers)$Lisp u:UniversalSegment(Integer) @@ -104,6 +105,12 @@ A POST request starts with u := segment(MatchBeginning(1)$Lisp+1,_ MatchEnd(1)$Lisp)$UniversalSegment(Integer) getCommand(s,headers.u) + if reqtype = "POST" and StringMatch("interpcall=(.*)$",headers)$Lisp > 0 + then + u:UniversalSegment(Integer) + u := segment(MatchBeginning(1)$Lisp+1,_ + MatchEnd(1)$Lisp)$UniversalSegment(Integer) + getInterp(s,headers.u) if reqtype = "POST" and StringMatch("lispcall=(.*)$",headers)$Lisp > 0 then u:UniversalSegment(Integer) @@ -116,8 +123,8 @@ A POST request starts with u := segment(MatchBeginning(1)$Lisp+1,_ MatchEnd(1)$Lisp)$UniversalSegment(Integer) getShow(s,headers.u) - WriteLine("multiServ end")$Lisp - WriteLine("")$Lisp +-- WriteLine("multiServ end")$Lisp +-- WriteLine("")$Lisp @ \subsection{getFile} @@ -127,7 +134,7 @@ then we need to parse the parameters and dynamically construct the file contents. <>= getFile(s:SExpression,pathvar:String):Void == - WriteLine("")$Lisp +-- WriteLine("")$Lisp WriteLine$Lisp concat ["getFile: ",pathvar] params:=split(pathvar,char "?") if #params = 1 @@ -155,7 +162,7 @@ file contents. page:=page "_"http://www.w3.org/TR/xthml1/DTD/xhtml1-strict.dtd_">" page:=page "" page:=page "Error" msg "" - WriteLine(page)$Lisp +-- WriteLine(page)$Lisp page @ \subsection{getDescription} @@ -180,7 +187,7 @@ and do a lookup for the source file. abbreviation:String,_ dom:String):String == sourcekey:="@<<" constructorkind " " abbreviation " " dom ">>" - WriteLine(sourcekey)$Lisp +-- WriteLine(sourcekey)$Lisp sourcefile:=lowerCase last split(getDatabase(dom,"SOURCEFILE"),char "/") sourcefile:=sourcefile ".pamphlet" @@ -262,13 +269,13 @@ We have q which is a stream which contains the file. We read the file into a string-stream to get it all into one string. We return the string. <>= readTheFile(q:SExpression):String == - WriteLine("begin reading file")$Lisp +-- WriteLine("begin reading file")$Lisp r := MAKE_-STRING_-OUTPUT_-STREAM()$Lisp SiCopyStream(q,r)$Lisp filestream:String := GET_-OUTPUT_-STREAM_-STRING(r)$Lisp CLOSE(r)$Lisp CLOSE(q)$Lisp - WriteLine("end reading file")$Lisp +-- WriteLine("end reading file")$Lisp filestream @ @@ -287,7 +294,7 @@ prepend it to the file. The resulting string is output to the socket. file := concat ["Content-Type: ",contentType,nl,file] file := concat ["HTTP/1.1 200 OK",nl,file] file := concat [file,filestream] - WriteLine(file)$Lisp +-- WriteLine(file)$Lisp f:=MAKE_-STRING_-INPUT_-STREAM(file)$Lisp SiCopyStream(f,s)$Lisp CLOSE(f)$Lisp @@ -345,15 +352,75 @@ corresponding functions in the browser HTML.
",algebra,"
_
",mathml,"
_
",lastType(),"
"] - WriteLine$Lisp concat ["mathml answer: ",mathml] - WriteLine$Lisp concat ["algebra answer: ",algebra] +-- WriteLine$Lisp concat ["mathml answer: ",mathml] +-- WriteLine$Lisp concat ["algebra answer: ",algebra] q:=MAKE_-STRING_-INPUT_-STREAM(axans)$Lisp SiCopyStream(q,s)$Lisp CLOSE(q)$Lisp CLOSE(s)$Lisp +@ + +\subsection{getInterp} +The getInterp function is invoked when the HTTP request is a POST +and contains the string "command". Essentially the game here is +to rebind the various output streams used by Axiom so we can +capture the normal output. This function returns a set of HTML 5 div +blocks: +\begin{enumerate} +\item stepnum, the value of lastStep() +\item command, the value of the command variable +\item algebra, the value of the algebra variable +\item mathml, the value of the mathml variable +\item type, the value of lastType() +\end{enumerate} +The HTML functions in the hyperdoc browser depend on the order +of these variables so do not change this without changing the +corresponding functions in the browser HTML. +<>= + getInterp(s:SExpression,command:String):Void == + WriteLine$Lisp concat ["getInterp: ",command] + SETQ(tmpmathml$Lisp, MAKE_-STRING_-OUTPUT_-STREAM()$Lisp)$Lisp + SETQ(tmpalgebra$Lisp, MAKE_-STRING_-OUTPUT_-STREAM()$Lisp)$Lisp + SETQ(savemathml$Lisp, _$texOutputStream$Lisp)$Lisp + SETQ(savealgebra$Lisp, _$algebraOutputStream$Lisp)$Lisp + SETQ(_$texOutputStream$Lisp,tmpmathml$Lisp)$Lisp + SETQ(_$algebraOutputStream$Lisp,tmpalgebra$Lisp)$Lisp + ans := string parseAndEvalToStringEqNum$Lisp command + SETQ(resultmathml$Lisp,_ + GET_-OUTPUT_-STREAM_-STRING(_$texOutputStream$Lisp)$Lisp)$Lisp + SETQ(resultalgebra$Lisp,_ + GET_-OUTPUT_-STREAM_-STRING(_$algebraOutputStream$Lisp)$Lisp)$Lisp + SETQ(_$texOutputStream$Lisp,savemathml$Lisp)$Lisp + SETQ(_$algebraOutputStream$Lisp,savealgebra$Lisp)$Lisp + CLOSE(tmpmathml$Lisp)$Lisp + CLOSE(tmpalgebra$Lisp)$Lisp + -- Since strings returned from axiom are going to be displayed in html I + -- should really check for the characters &,<,> and replace them with + -- &,<,>. + -- At present I only check for ampersands in formatMessages. + mathml:String := string(resultmathml$Lisp) + algebra:String := string(resultalgebra$Lisp) + algebra := formatMessages(algebra) + -- At this point mathml contains the mathml for the output but does not + -- include step number or type information. + -- We should also save the command. + -- I get the type and step number from the $internalHistoryTable + axans:String := _ + concat ["
", lastStep(), "
_ +
", command, "
_ +
",algebra,"
_ +
",mathml,"
_ +
",lastType(),"
"] +-- WriteLine$Lisp concat ["mathml answer: ",mathml] +-- WriteLine$Lisp concat ["algebra answer: ",algebra] + q:=MAKE_-STRING_-INPUT_-STREAM(axans)$Lisp + SiCopyStream(q,s)$Lisp + CLOSE(q)$Lisp + CLOSE(s)$Lisp @ + \subsection{getLisp} The getLisp function is invoked when the HTTP request is a POST and contains the string "lispcall". @@ -362,8 +429,8 @@ and contains the string "lispcall". WriteLine$Lisp concat ["getLisp: ",command] evalresult:=EVAL(READ_-FROM_-STRING(command)$Lisp)$Lisp mathml:String:=string(evalresult) - WriteLine$Lisp concat ["getLisp: after ",mathml] - WriteLine$Lisp concat ["getLisp output: ",mathml] +-- WriteLine$Lisp concat ["getLisp: after ",mathml] +-- WriteLine$Lisp concat ["getLisp output: ",mathml] SETQ(tmpalgebra$Lisp, MAKE_-STRING_-OUTPUT_-STREAM()$Lisp)$Lisp SETQ(savemathml$Lisp, _$texOutputStream$Lisp)$Lisp SETQ(savealgebra$Lisp, _$algebraOutputStream$Lisp)$Lisp @@ -390,8 +457,8 @@ and contains the string "lispcall".
",algebra,"
_
",mathml,"
_
",lastType(),"
"] - WriteLine$Lisp concat ["mathml answer: ",mathml] - WriteLine$Lisp concat ["algebra answer: ",algebra] +-- WriteLine$Lisp concat ["mathml answer: ",mathml] +-- WriteLine$Lisp concat ["algebra answer: ",algebra] q:=MAKE_-STRING_-INPUT_-STREAM(axans)$Lisp SiCopyStream(q,s)$Lisp CLOSE(q)$Lisp @@ -410,7 +477,7 @@ This is done in the call to replace-entitites (see http.lisp) realarg:=SUBSEQ(showarg,6)$Lisp show:=_ "(progn (setq |$options| '((|operations|))) (|show| '|" realarg "|))" - WriteLine$Lisp concat ["getShow: ",show] +-- WriteLine$Lisp concat ["getShow: ",show] SETQ(SAVESTREAM$Lisp,_*STANDARD_-OUTPUT_*$Lisp)$Lisp SETQ(_*STANDARD_-OUTPUT_*$Lisp,_ MAKE_-STRING_-OUTPUT_-STREAM()$Lisp)$Lisp @@ -445,7 +512,7 @@ This is done in the call to replace-entitites (see http.lisp)
",algebra,"
_
",mathml,"
_
",lastType(),"
"] - WriteLine$Lisp concat ["mathml answer: ",mathml] +-- WriteLine$Lisp concat ["mathml answer: ",mathml] q:=MAKE_-STRING_-INPUT_-STREAM(axans)$Lisp SiCopyStream(q,s)$Lisp CLOSE(q)$Lisp @@ -468,11 +535,11 @@ This is done in the call to replace-entitites (see http.lisp) string car(car(_$internalHistoryTable$Lisp)$Lisp)$Lisp formatMessages(str:String):String == - WriteLine("formatMessages")$Lisp +-- WriteLine("formatMessages")$Lisp -- I need to replace any ampersands with & and may also need to -- replace < and > with < and > strlist:List String - WriteLine(str)$Lisp +-- WriteLine(str)$Lisp strlist := split(str,char "&") str := "" -- oops, if & is the last character in the string this method @@ -481,19 +548,19 @@ This is done in the call to replace-entitites (see http.lisp) str := concat [str,s,"&"] strlen:Integer := #str str := str.(1..(#str - 5)) - WriteLine(str)$Lisp +-- WriteLine(str)$Lisp -- Here I split the string into lines and put each line in a "div". strlist := split(str, char string NewlineChar$Lisp) str := "" - WriteLine("formatMessages1")$Lisp - WriteLine(concat strlist)$Lisp +-- WriteLine("formatMessages1")$Lisp +-- WriteLine(concat strlist)$Lisp for s in strlist repeat - WriteLine(s)$Lisp +-- WriteLine(s)$Lisp str := concat [str,"
",s,"
"] str getContentType(pathvar:String):String == - WriteLine("getContentType begin")$Lisp +-- WriteLine("getContentType begin")$Lisp -- set default content type contentType:String := "text/plain" -- need to test for successful match? @@ -502,7 +569,7 @@ This is done in the call to replace-entitites (see http.lisp) u := segment(MatchBeginning(1)$Lisp+1,_ MatchEnd(1)$Lisp)$UniversalSegment(Integer) extension:String := pathvar.u - WriteLine$Lisp concat ["file extension: ",extension] +-- WriteLine$Lisp concat ["file extension: ",extension] -- test for extensions: html, htm, xml, xhtml, js, css if extension = "html" then contentType:String := "text/html" @@ -522,8 +589,8 @@ This is done in the call to replace-entitites (see http.lisp) contentType:String := "image/jpeg" else if extension = "jpeg" then contentType:String := "image/jpeg" - WriteLine$Lisp concat ["Content-Type: ",contentType] - WriteLine("getContentType end")$Lisp +-- WriteLine$Lisp concat ["Content-Type: ",contentType] +-- WriteLine("getContentType end")$Lisp contentType @ diff --git a/src/hyper/Makefile.pamphlet b/src/hyper/Makefile.pamphlet index cae708f..7d43f87 100644 --- a/src/hyper/Makefile.pamphlet +++ b/src/hyper/Makefile.pamphlet @@ -162,11 +162,11 @@ ${MID}/sup.bitmap: ${IN}/bitmaps.pamphlet @${TANGLE} -R"sup.bitmap" ${IN}/bitmaps.pamphlet >${MID}/sup.bitmap ${MID}/ht-icon: ${IN}/bitmaps.pamphlet - @echo 12 making ${OUT}/ht-icon from ${IN}/bitmaps.pamphlet + @echo 13 making ${OUT}/ht-icon from ${IN}/bitmaps.pamphlet @${TANGLE} -R"hticon" ${IN}/bitmaps.pamphlet >${MID}/ht-icon ${DOC}/bitmaps.dvi: ${IN}/bitmaps.pamphlet - @ echo 4 making ${DOC}/bitmaps.dvi from ${IN}/bitmaps.pamphlet + @ echo 14 making ${DOC}/bitmaps.dvi from ${IN}/bitmaps.pamphlet @ (cd ${DOC} ; \ cp ${IN}/bitmaps.pamphlet ${DOC} ; \ ${DOCUMENT} ${NOISE} bitmaps ; \ @@ -178,20 +178,20 @@ ${DOC}/bitmaps.dvi: ${IN}/bitmaps.pamphlet \section{cond} <>= ${MID}/cond.h: ${IN}/cond.pamphlet - @ echo 13 making ${MID}/cond.h from ${IN}/cond.pamphlet + @ echo 15 making ${MID}/cond.h from ${IN}/cond.pamphlet @ (cd ${MID} ; ${TANGLE} -R"cond.h" ${IN}/cond.pamphlet >cond.h ) ${MID}/cond.c: ${IN}/cond.pamphlet - @ echo 14 making ${MID}/cond.c from ${IN}/cond.pamphlet + @ echo 16 making ${MID}/cond.c from ${IN}/cond.pamphlet @ (cd ${MID} ; ${TANGLE} ${IN}/cond.pamphlet >cond.c ) ${MIDOBJ}/cond.o: ${MID}/cond.c - @ echo 15 making ${MIDOBJ}/cond.o from ${MID}/cond.c + @ echo 17 making ${MIDOBJ}/cond.o from ${MID}/cond.c @ ( cd ${MIDOBJ} ; \ ${CC} -I${INC} -I${MID} -c ${CFLAGS} ${MID}/cond.c ) ${DOC}/cond.dvi: ${IN}/cond.pamphlet - @ echo 16 making ${DOC}/cond.dvi from ${IN}/cond.pamphlet + @ echo 18 making ${DOC}/cond.dvi from ${IN}/cond.pamphlet @ (cd ${DOC} ; \ cp ${IN}/cond.pamphlet ${DOC} ; \ ${DOCUMENT} ${NOISE} cond ; \ @@ -203,16 +203,16 @@ ${DOC}/cond.dvi: ${IN}/cond.pamphlet \section{debug} <>= ${MID}/debug.c: ${IN}/debug.pamphlet - @ echo 17 making ${MID}/debug.c from ${IN}/debug.pamphlet + @ echo 19 making ${MID}/debug.c from ${IN}/debug.pamphlet @ (cd ${MID} ; ${TANGLE} ${IN}/debug.pamphlet >debug.c ) ${MIDOBJ}/debug.o: ${MID}/debug.c - @ echo 18 making ${MIDOBJ}/debug.o from ${MID}/debug.c + @ echo 20 making ${MIDOBJ}/debug.o from ${MID}/debug.c @ ( cd ${MIDOBJ} ; \ ${CC} -I${INC} -I${MID} -c ${CFLAGS} ${MID}/debug.c ) ${DOC}/debug.dvi: ${IN}/debug.pamphlet - @ echo 19 making ${DOC}/debug.dvi from ${IN}/debug.pamphlet + @ echo 21 making ${DOC}/debug.dvi from ${IN}/debug.pamphlet @ (cd ${DOC} ; \ cp ${IN}/debug.pamphlet ${DOC} ; \ ${DOCUMENT} ${NOISE} debug ; \ @@ -224,20 +224,20 @@ ${DOC}/debug.dvi: ${IN}/debug.pamphlet \section{dialog} <>= ${MID}/dialog.h: ${IN}/dialog.pamphlet - @ echo 20 making ${MID}/dialog.h from ${IN}/dialog.pamphlet + @ echo 22 making ${MID}/dialog.h from ${IN}/dialog.pamphlet @ (cd ${MID} ; ${TANGLE} -R"dialog.h" ${IN}/dialog.pamphlet >dialog.h ) ${MID}/dialog.c: ${IN}/dialog.pamphlet - @ echo 21 making ${MID}/dialog.c from ${IN}/dialog.pamphlet + @ echo 23 making ${MID}/dialog.c from ${IN}/dialog.pamphlet @ (cd ${MID} ; ${TANGLE} ${IN}/dialog.pamphlet >dialog.c ) ${MIDOBJ}/dialog.o: ${MID}/dialog.c - @ echo 22 making ${MIDOBJ}/dialog.o from ${MID}/dialog.c + @ echo 24 making ${MIDOBJ}/dialog.o from ${MID}/dialog.c @ ( cd ${MIDOBJ} ; \ ${CC} -I${INC} -I${MID} -c ${CFLAGS} ${MID}/dialog.c ) ${DOC}/dialog.dvi: ${IN}/dialog.pamphlet - @ echo 23 making ${DOC}/dialog.dvi from ${IN}/dialog.pamphlet + @ echo 25 making ${DOC}/dialog.dvi from ${IN}/dialog.pamphlet @ (cd ${DOC} ; \ cp ${IN}/dialog.pamphlet ${DOC} ; \ ${DOCUMENT} ${NOISE} dialog ; \ @@ -249,20 +249,20 @@ ${DOC}/dialog.dvi: ${IN}/dialog.pamphlet \section{display} <>= ${MID}/display.h: ${IN}/display.pamphlet - @ echo 24 making ${MID}/display.h from ${IN}/display.pamphlet + @ echo 26 making ${MID}/display.h from ${IN}/display.pamphlet @ (cd ${MID} ; ${TANGLE} -R"display.h" ${IN}/display.pamphlet >display.h ) ${MID}/display.c: ${IN}/display.pamphlet - @ echo 25 making ${MID}/display.c from ${IN}/display.pamphlet + @ echo 27 making ${MID}/display.c from ${IN}/display.pamphlet @ (cd ${MID} ; ${TANGLE} ${IN}/display.pamphlet >display.c ) ${MIDOBJ}/display.o: ${MID}/display.c - @ echo 26 making ${MIDOBJ}/display.o from ${MID}/display.c + @ echo 28 making ${MIDOBJ}/display.o from ${MID}/display.c @ ( cd ${MIDOBJ} ; \ ${CC} -I${INC} -I${MID} -c ${CFLAGS} ${MID}/display.c ) ${DOC}/display.dvi: ${IN}/display.pamphlet - @ echo 27 making ${DOC}/display.dvi from ${IN}/display.pamphlet + @ echo 29 making ${DOC}/display.dvi from ${IN}/display.pamphlet @ (cd ${DOC} ; \ cp ${IN}/display.pamphlet ${DOC} ; \ ${DOCUMENT} ${NOISE} display ; \ @@ -274,20 +274,20 @@ ${DOC}/display.dvi: ${IN}/display.pamphlet \section{event} <>= ${MID}/event.h: ${IN}/event.pamphlet - @ echo 28 making ${MID}/event.h from ${IN}/event.pamphlet + @ echo 30 making ${MID}/event.h from ${IN}/event.pamphlet @ (cd ${MID} ; ${TANGLE} -R"event.h" ${IN}/event.pamphlet >event.h ) ${MID}/event.c: ${IN}/event.pamphlet - @ echo 29 making ${MID}/event.c from ${IN}/event.pamphlet + @ echo 31 making ${MID}/event.c from ${IN}/event.pamphlet @ (cd ${MID} ; ${TANGLE} ${IN}/event.pamphlet >event.c ) ${MIDOBJ}/event.o: ${MID}/event.c - @ echo 30 making ${MIDOBJ}/event.o from ${MID}/event.c + @ echo 32 making ${MIDOBJ}/event.o from ${MID}/event.c @ ( cd ${MIDOBJ} ; \ ${CC} -I${INC} -I${MID} -c ${CFLAGS} ${MID}/event.c ) ${DOC}/event.dvi: ${IN}/event.pamphlet - @ echo 31 making ${DOC}/event.dvi from ${IN}/event.pamphlet + @ echo 33 making ${DOC}/event.dvi from ${IN}/event.pamphlet @ (cd ${DOC} ; \ cp ${IN}/event.pamphlet ${DOC} ; \ ${DOCUMENT} ${NOISE} event ; \ @@ -299,16 +299,16 @@ ${DOC}/event.dvi: ${IN}/event.pamphlet \section{ex2ht} <>= ${MID}/ex2ht.c: ${IN}/ex2ht.pamphlet - @ echo 32 making ${MID}/ex2ht.c from ${IN}/ex2ht.pamphlet + @ echo 34 making ${MID}/ex2ht.c from ${IN}/ex2ht.pamphlet @ (cd ${MID} ; ${TANGLE} ${IN}/ex2ht.pamphlet >ex2ht.c ) ${MIDOBJ}/ex2ht.o: ${MID}/ex2ht.c - @ echo 33 making ${MIDOBJ}/ex2ht.o from ${MID}/ex2ht.c + @ echo 35 making ${MIDOBJ}/ex2ht.o from ${MID}/ex2ht.c @ ( cd ${MIDOBJ} ; \ ${CC} -I${INC} -I${MID} -c ${CFLAGS} ${MID}/ex2ht.c ) ${DOC}/ex2ht.dvi: ${IN}/ex2ht.pamphlet - @ echo 34 making ${DOC}/ex2ht.dvi from ${IN}/ex2ht.pamphlet + @ echo 36 making ${DOC}/ex2ht.dvi from ${IN}/ex2ht.pamphlet @ (cd ${DOC} ; \ cp ${IN}/ex2ht.pamphlet ${DOC} ; \ ${DOCUMENT} ${NOISE} ex2ht ; \ @@ -320,23 +320,23 @@ ${DOC}/ex2ht.dvi: ${IN}/ex2ht.pamphlet \section{extent} <>= ${MID}/extent.h: ${IN}/extent.pamphlet - @ echo 35 making ${MID}/extent.h from ${IN}/extent.pamphlet + @ echo 37 making ${MID}/extent.h from ${IN}/extent.pamphlet @ (cd ${MID} ; ${TANGLE} -R"extent.h" ${IN}/extent.pamphlet >extent.h ) @ \section{extent1} <>= ${MID}/extent1.c: ${IN}/extent1.pamphlet - @ echo 36 making ${MID}/extent1.c from ${IN}/extent1.pamphlet + @ echo 38 making ${MID}/extent1.c from ${IN}/extent1.pamphlet @ (cd ${MID} ; ${TANGLE} ${IN}/extent1.pamphlet >extent1.c ) ${MIDOBJ}/extent1.o: ${MID}/extent1.c - @ echo 37 making ${MIDOBJ}/extent1.o from ${MID}/extent1.c + @ echo 39 making ${MIDOBJ}/extent1.o from ${MID}/extent1.c @ ( cd ${MIDOBJ} ; \ ${CC} -I${INC} -I${MID} -c ${CFLAGS} ${MID}/extent1.c ) ${DOC}/extent1.dvi: ${IN}/extent1.pamphlet - @ echo 38 making ${DOC}/extent1.dvi from ${IN}/extent1.pamphlet + @ echo 40 making ${DOC}/extent1.dvi from ${IN}/extent1.pamphlet @ (cd ${DOC} ; \ cp ${IN}/extent1.pamphlet ${DOC} ; \ ${DOCUMENT} ${NOISE} extent1 ; \ @@ -348,16 +348,16 @@ ${DOC}/extent1.dvi: ${IN}/extent1.pamphlet \section{extent2} <>= ${MID}/extent2.c: ${IN}/extent2.pamphlet - @ echo 39 making ${MID}/extent2.c from ${IN}/extent2.pamphlet + @ echo 41 making ${MID}/extent2.c from ${IN}/extent2.pamphlet @ (cd ${MID} ; ${TANGLE} ${IN}/extent2.pamphlet >extent2.c ) ${MIDOBJ}/extent2.o: ${MID}/extent2.c - @ echo 40 making ${MIDOBJ}/extent2.o from ${MID}/extent2.c + @ echo 42 making ${MIDOBJ}/extent2.o from ${MID}/extent2.c @ ( cd ${MIDOBJ} ; \ ${CC} -I${INC} -I${MID} -c ${CFLAGS} ${MID}/extent2.c ) ${DOC}/extent2.dvi: ${IN}/extent2.pamphlet - @ echo 41 making ${DOC}/extent2.dvi from ${IN}/extent2.pamphlet + @ echo 43 making ${DOC}/extent2.dvi from ${IN}/extent2.pamphlet @ (cd ${DOC} ; \ cp ${IN}/extent2.pamphlet ${DOC} ; \ ${DOCUMENT} ${NOISE} extent2 ; \ @@ -369,16 +369,16 @@ ${DOC}/extent2.dvi: ${IN}/extent2.pamphlet \section{form-ext} <>= ${MID}/form-ext.c: ${IN}/form-ext.pamphlet - @ echo 42 making ${MID}/form-ext.c from ${IN}/form-ext.pamphlet + @ echo 44 making ${MID}/form-ext.c from ${IN}/form-ext.pamphlet @ (cd ${MID} ; ${TANGLE} ${IN}/form-ext.pamphlet >form-ext.c ) ${MIDOBJ}/form-ext.o: ${MID}/form-ext.c - @ echo 43 making ${MIDOBJ}/form-ext.o from ${MID}/form-ext.c + @ echo 45 making ${MIDOBJ}/form-ext.o from ${MID}/form-ext.c @ ( cd ${MIDOBJ} ; \ ${CC} -I${INC} -I${MID} -c ${CFLAGS} ${MID}/form-ext.c ) ${DOC}/form-ext.dvi: ${IN}/form-ext.pamphlet - @ echo 44 making ${DOC}/form-ext.dvi from ${IN}/form-ext.pamphlet + @ echo 46 making ${DOC}/form-ext.dvi from ${IN}/form-ext.pamphlet @ (cd ${DOC} ; \ cp ${IN}/form-ext.pamphlet ${DOC} ; \ ${DOCUMENT} ${NOISE} form-ext ; \ @@ -390,20 +390,20 @@ ${DOC}/form-ext.dvi: ${IN}/form-ext.pamphlet \section{group} <>= ${MID}/group.h: ${IN}/group.pamphlet - @ echo 45 making ${MID}/group.h from ${IN}/group.pamphlet + @ echo 47 making ${MID}/group.h from ${IN}/group.pamphlet @ (cd ${MID} ; ${TANGLE} -R"group.h" ${IN}/group.pamphlet >group.h ) ${MID}/group.c: ${IN}/group.pamphlet - @ echo 46 making ${MID}/group.c from ${IN}/group.pamphlet + @ echo 48 making ${MID}/group.c from ${IN}/group.pamphlet @ (cd ${MID} ; ${TANGLE} ${IN}/group.pamphlet >group.c ) ${MIDOBJ}/group.o: ${MID}/group.c - @ echo 47 making ${MIDOBJ}/group.o from ${MID}/group.c + @ echo 49 making ${MIDOBJ}/group.o from ${MID}/group.c @ ( cd ${MIDOBJ} ; \ ${CC} -I${INC} -I${MID} -c ${CFLAGS} ${MID}/group.c ) ${DOC}/group.dvi: ${IN}/group.pamphlet - @ echo 48 making ${DOC}/group.dvi from ${IN}/group.pamphlet + @ echo 50 making ${DOC}/group.dvi from ${IN}/group.pamphlet @ (cd ${DOC} ; \ cp ${IN}/group.pamphlet ${DOC} ; \ ${DOCUMENT} ${NOISE} group ; \ @@ -415,16 +415,16 @@ ${DOC}/group.dvi: ${IN}/group.pamphlet \section{halloc} <>= ${MID}/halloc.c: ${IN}/halloc.pamphlet - @ echo 49 making ${MID}/halloc.c from ${IN}/halloc.pamphlet + @ echo 51 making ${MID}/halloc.c from ${IN}/halloc.pamphlet @ (cd ${MID} ; ${TANGLE} ${IN}/halloc.pamphlet >halloc.c ) ${MIDOBJ}/halloc.o: ${MID}/halloc.c - @ echo 50 making ${MIDOBJ}/halloc.o from ${MID}/halloc.c + @ echo 52 making ${MIDOBJ}/halloc.o from ${MID}/halloc.c @ ( cd ${MIDOBJ} ; \ ${CC} -I${INC} -I${MID} -c ${CFLAGS} ${MID}/halloc.c ) ${DOC}/halloc.dvi: ${IN}/halloc.pamphlet - @ echo 51 making ${DOC}/halloc.dvi from ${IN}/halloc.pamphlet + @ echo 53 making ${DOC}/halloc.dvi from ${IN}/halloc.pamphlet @ (cd ${DOC} ; \ cp ${IN}/halloc.pamphlet ${DOC} ; \ ${DOCUMENT} ${NOISE} halloc ; \ @@ -436,16 +436,16 @@ ${DOC}/halloc.dvi: ${IN}/halloc.pamphlet \section{hash} <>= ${MID}/hash.c: ${IN}/hash.pamphlet - @ echo 52 making ${MID}/hash.c from ${IN}/hash.pamphlet + @ echo 54 making ${MID}/hash.c from ${IN}/hash.pamphlet @ (cd ${MID} ; ${TANGLE} ${IN}/hash.pamphlet >hash.c ) ${MIDOBJ}/hash.o: ${MID}/hash.c - @ echo 53 making ${MIDOBJ}/hash.o from ${MID}/hash.c + @ echo 55 making ${MIDOBJ}/hash.o from ${MID}/hash.c @ ( cd ${MIDOBJ} ; \ ${CC} -I${INC} -I${MID} -c ${CFLAGS} ${MID}/hash.c ) ${DOC}/hash.dvi: ${IN}/hash.pamphlet - @ echo 54 making ${DOC}/hash.dvi from ${IN}/hash.pamphlet + @ echo 56 making ${DOC}/hash.dvi from ${IN}/hash.pamphlet @ (cd ${DOC} ; \ cp ${IN}/hash.pamphlet ${DOC} ; \ ${DOCUMENT} ${NOISE} hash ; \ @@ -457,16 +457,16 @@ ${DOC}/hash.dvi: ${IN}/hash.pamphlet \section{htadd} <>= ${MID}/htadd.c: ${IN}/htadd.pamphlet - @ echo 55 making ${MID}/htadd.c from ${IN}/htadd.pamphlet + @ echo 57 making ${MID}/htadd.c from ${IN}/htadd.pamphlet @ (cd ${MID} ; ${TANGLE} ${IN}/htadd.pamphlet >htadd.c ) ${MIDOBJ}/htadd.o: ${MID}/htadd.c - @ echo 56 making ${MIDOBJ}/htadd.o from ${MID}/htadd.c + @ echo 58 making ${MIDOBJ}/htadd.o from ${MID}/htadd.c @ ( cd ${MIDOBJ} ; \ ${CC} -I${INC} -I${MID} -c ${CFLAGS} ${MID}/htadd.c ) ${DOC}/htadd.dvi: ${IN}/htadd.pamphlet - @ echo 57 making ${DOC}/htadd.dvi from ${IN}/htadd.pamphlet + @ echo 59 making ${DOC}/htadd.dvi from ${IN}/htadd.pamphlet @ (cd ${DOC} ; \ cp ${IN}/htadd.pamphlet ${DOC} ; \ ${DOCUMENT} ${NOISE} htadd ; \ @@ -478,20 +478,20 @@ ${DOC}/htadd.dvi: ${IN}/htadd.pamphlet \section{hterror} <>= ${MID}/hterror.h: ${IN}/hterror.pamphlet - @ echo 58 making ${MID}/hterror.h from ${IN}/hterror.pamphlet + @ echo 60 making ${MID}/hterror.h from ${IN}/hterror.pamphlet @ (cd ${MID} ; ${TANGLE} -R"hterror.h" ${IN}/hterror.pamphlet >hterror.h ) ${MID}/hterror.c: ${IN}/hterror.pamphlet - @ echo 59 making ${MID}/hterror.c from ${IN}/hterror.pamphlet + @ echo 61 making ${MID}/hterror.c from ${IN}/hterror.pamphlet @ (cd ${MID} ; ${TANGLE} ${IN}/hterror.pamphlet >hterror.c ) ${MIDOBJ}/hterror.o: ${MID}/hterror.c - @ echo 60 making ${MIDOBJ}/hterror.o from ${MID}/hterror.c + @ echo 62 making ${MIDOBJ}/hterror.o from ${MID}/hterror.c @ ( cd ${MIDOBJ} ; \ ${CC} -I${INC} -I${MID} -c ${CFLAGS} ${MID}/hterror.c ) ${DOC}/hterror.dvi: ${IN}/hterror.pamphlet - @ echo 61 making ${DOC}/hterror.dvi from ${IN}/hterror.pamphlet + @ echo 63 making ${DOC}/hterror.dvi from ${IN}/hterror.pamphlet @ (cd ${DOC} ; \ cp ${IN}/hterror.pamphlet ${DOC} ; \ ${DOCUMENT} ${NOISE} hterror ; \ @@ -503,16 +503,16 @@ ${DOC}/hterror.dvi: ${IN}/hterror.pamphlet \section{hthits} <>= ${MID}/hthits.c: ${IN}/hthits.pamphlet - @ echo 62 making ${MID}/hthits.c from ${IN}/hthits.pamphlet + @ echo 64 making ${MID}/hthits.c from ${IN}/hthits.pamphlet @ (cd ${MID} ; ${TANGLE} ${IN}/hthits.pamphlet >hthits.c ) ${MIDOBJ}/hthits.o: ${MID}/hthits.c - @ echo 63 making ${MIDOBJ}/hthits.o from ${MID}/hthits.c + @ echo 65 making ${MIDOBJ}/hthits.o from ${MID}/hthits.c @ ( cd ${MIDOBJ} ; \ ${CC} -I${INC} -I${MID} -c ${CFLAGS} ${MID}/hthits.c ) ${DOC}/hthits.dvi: ${IN}/hthits.pamphlet - @ echo 64 making ${DOC}/hthits.dvi from ${IN}/hthits.pamphlet + @ echo 66 making ${DOC}/hthits.dvi from ${IN}/hthits.pamphlet @ (cd ${DOC} ; \ cp ${IN}/hthits.pamphlet ${DOC} ; \ ${DOCUMENT} ${NOISE} hthits ; \ @@ -524,16 +524,16 @@ ${DOC}/hthits.dvi: ${IN}/hthits.pamphlet \section{htinp} <>= ${MID}/htinp.c: ${IN}/htinp.pamphlet - @ echo 65 making ${MID}/htinp.c from ${IN}/htinp.pamphlet + @ echo 67 making ${MID}/htinp.c from ${IN}/htinp.pamphlet @ (cd ${MID} ; ${TANGLE} ${IN}/htinp.pamphlet >htinp.c ) ${MIDOBJ}/htinp.o: ${MID}/htinp.c - @ echo 66 making ${MIDOBJ}/htinp.o from ${MID}/htinp.c + @ echo 68 making ${MIDOBJ}/htinp.o from ${MID}/htinp.c @ ( cd ${MIDOBJ} ; \ ${CC} -I${INC} -I${MID} -c ${CFLAGS} ${MID}/htinp.c ) ${DOC}/htinp.dvi: ${IN}/htinp.pamphlet - @ echo 67 making ${DOC}/htinp.dvi from ${IN}/htinp.pamphlet + @ echo 69 making ${DOC}/htinp.dvi from ${IN}/htinp.pamphlet @ (cd ${DOC} ; \ cp ${IN}/htinp.pamphlet ${DOC} ; \ ${DOCUMENT} ${NOISE} htinp ; \ @@ -545,20 +545,20 @@ ${DOC}/htinp.dvi: ${IN}/htinp.pamphlet \section{hyper} <>= ${MID}/hyper.h: ${IN}/hyper.pamphlet - @ echo 68 making ${MID}/hyper.h from ${IN}/hyper.pamphlet + @ echo 70 making ${MID}/hyper.h from ${IN}/hyper.pamphlet @ (cd ${MID} ; ${TANGLE} -R"hyper.h" ${IN}/hyper.pamphlet >hyper.h ) ${MID}/hyper.c: ${IN}/hyper.pamphlet - @ echo 69 making ${MID}/hyper.c from ${IN}/hyper.pamphlet + @ echo 71 making ${MID}/hyper.c from ${IN}/hyper.pamphlet @ (cd ${MID} ; ${TANGLE} ${IN}/hyper.pamphlet >hyper.c ) ${MIDOBJ}/hyper.o: ${MID}/hyper.c - @ echo 70 making ${MIDOBJ}/hyper.o from ${MID}/hyper.c + @ echo 72 making ${MIDOBJ}/hyper.o from ${MID}/hyper.c @ ( cd ${MIDOBJ} ; \ ${CC} -I${INC} -I${MID} -c ${CFLAGS} ${MID}/hyper.c ) ${DOC}/hyper.dvi: ${IN}/hyper.pamphlet - @ echo 71 making ${DOC}/hyper.dvi from ${IN}/hyper.pamphlet + @ echo 73 making ${DOC}/hyper.dvi from ${IN}/hyper.pamphlet @ (cd ${DOC} ; \ cp ${IN}/hyper.pamphlet ${DOC} ; \ ${DOCUMENT} ${NOISE} hyper ; \ @@ -570,20 +570,20 @@ ${DOC}/hyper.dvi: ${IN}/hyper.pamphlet \section{initx} <>= ${MID}/initx.h: ${IN}/initx.pamphlet - @ echo 72 making ${MID}/initx.h from ${IN}/initx.pamphlet + @ echo 74 making ${MID}/initx.h from ${IN}/initx.pamphlet @ (cd ${MID} ; ${TANGLE} -R"initx.h" ${IN}/initx.pamphlet >initx.h ) ${MID}/initx.c: ${IN}/initx.pamphlet - @ echo 73 making ${MID}/initx.c from ${IN}/initx.pamphlet + @ echo 75 making ${MID}/initx.c from ${IN}/initx.pamphlet @ (cd ${MID} ; ${TANGLE} ${IN}/initx.pamphlet >initx.c ) ${MIDOBJ}/initx.o: ${MID}/initx.c - @ echo 74 making ${MIDOBJ}/initx.o from ${MID}/initx.c + @ echo 76 making ${MIDOBJ}/initx.o from ${MID}/initx.c @ ( cd ${MIDOBJ} ; \ ${CC} -I${INC} -I${MID} -c ${CFLAGS} ${MID}/initx.c ) ${DOC}/initx.dvi: ${IN}/initx.pamphlet - @ echo 75 making ${DOC}/initx.dvi from ${IN}/initx.pamphlet + @ echo 77 making ${DOC}/initx.dvi from ${IN}/initx.pamphlet @ (cd ${DOC} ; \ cp ${IN}/initx.pamphlet ${DOC} ; \ ${DOCUMENT} ${NOISE} initx ; \ @@ -595,16 +595,16 @@ ${DOC}/initx.dvi: ${IN}/initx.pamphlet \section{input} <>= ${MID}/input.c: ${IN}/input.pamphlet - @ echo 76 making ${MID}/input.c from ${IN}/input.pamphlet + @ echo 78 making ${MID}/input.c from ${IN}/input.pamphlet @ (cd ${MID} ; ${TANGLE} ${IN}/input.pamphlet >input.c ) ${MIDOBJ}/input.o: ${MID}/input.c - @ echo 77 making ${MIDOBJ}/input.o from ${MID}/input.c + @ echo 79 making ${MIDOBJ}/input.o from ${MID}/input.c @ ( cd ${MIDOBJ} ; \ ${CC} -I${INC} -I${MID} -c ${CFLAGS} ${MID}/input.c ) ${DOC}/input.dvi: ${IN}/input.pamphlet - @ echo 78 making ${DOC}/input.dvi from ${IN}/input.pamphlet + @ echo 80 making ${DOC}/input.dvi from ${IN}/input.pamphlet @ (cd ${DOC} ; \ cp ${IN}/input.pamphlet ${DOC} ; \ ${DOCUMENT} ${NOISE} input ; \ @@ -616,16 +616,16 @@ ${DOC}/input.dvi: ${IN}/input.pamphlet \section{item} <>= ${MID}/item.c: ${IN}/item.pamphlet - @ echo 79 making ${MID}/item.c from ${IN}/item.pamphlet + @ echo 81 making ${MID}/item.c from ${IN}/item.pamphlet @ (cd ${MID} ; ${TANGLE} ${IN}/item.pamphlet >item.c ) ${MIDOBJ}/item.o: ${MID}/item.c - @ echo 80 making ${MIDOBJ}/item.o from ${MID}/item.c + @ echo 82 making ${MIDOBJ}/item.o from ${MID}/item.c @ ( cd ${MIDOBJ} ; \ ${CC} -I${INC} -I${MID} -c ${CFLAGS} ${MID}/item.c ) ${DOC}/item.dvi: ${IN}/item.pamphlet - @ echo 81 making ${DOC}/item.dvi from ${IN}/item.pamphlet + @ echo 83 making ${DOC}/item.dvi from ${IN}/item.pamphlet @ (cd ${DOC} ; \ cp ${IN}/item.pamphlet ${DOC} ; \ ${DOCUMENT} ${NOISE} item ; \ @@ -637,20 +637,20 @@ ${DOC}/item.dvi: ${IN}/item.pamphlet \section{keyin} <>= ${MID}/keyin.h: ${IN}/keyin.pamphlet - @ echo 82 making ${MID}/keyin.h from ${IN}/keyin.pamphlet + @ echo 84 making ${MID}/keyin.h from ${IN}/keyin.pamphlet @ (cd ${MID} ; ${TANGLE} -R"keyin.h" ${IN}/keyin.pamphlet >keyin.h ) ${MID}/keyin.c: ${IN}/keyin.pamphlet - @ echo 83 making ${MID}/keyin.c from ${IN}/keyin.pamphlet + @ echo 85 making ${MID}/keyin.c from ${IN}/keyin.pamphlet @ (cd ${MID} ; ${TANGLE} ${IN}/keyin.pamphlet >keyin.c ) ${MIDOBJ}/keyin.o: ${MID}/keyin.c - @ echo 84 making ${MIDOBJ}/keyin.o from ${MID}/keyin.c + @ echo 86 making ${MIDOBJ}/keyin.o from ${MID}/keyin.c @ ( cd ${MIDOBJ} ; \ ${CC} -I${INC} -I${MID} -c ${CFLAGS} ${MID}/keyin.c ) ${DOC}/keyin.dvi: ${IN}/keyin.pamphlet - @ echo 85 making ${DOC}/keyin.dvi from ${IN}/keyin.pamphlet + @ echo 87 making ${DOC}/keyin.dvi from ${IN}/keyin.pamphlet @ (cd ${DOC} ; \ cp ${IN}/keyin.pamphlet ${DOC} ; \ ${DOCUMENT} ${NOISE} keyin ; \ @@ -662,20 +662,20 @@ ${DOC}/keyin.dvi: ${IN}/keyin.pamphlet \section{lex} <>= ${MID}/lex.h: ${IN}/lex.pamphlet - @ echo 86 making ${MID}/lex.h from ${IN}/lex.pamphlet + @ echo 88 making ${MID}/lex.h from ${IN}/lex.pamphlet @ (cd ${MID} ; ${TANGLE} -R"lex.h" ${IN}/lex.pamphlet >lex.h ) ${MID}/lex.c: ${IN}/lex.pamphlet - @ echo 87 making ${MID}/lex.c from ${IN}/lex.pamphlet + @ echo 89 making ${MID}/lex.c from ${IN}/lex.pamphlet @ (cd ${MID} ; ${TANGLE} ${IN}/lex.pamphlet >lex.c ) ${MIDOBJ}/lex.o: ${MID}/lex.c - @ echo 88 making ${MIDOBJ}/lex.o from ${MID}/lex.c + @ echo 90 making ${MIDOBJ}/lex.o from ${MID}/lex.c @ ( cd ${MIDOBJ} ; \ ${CC} -I${INC} -I${MID} -c ${CFLAGS} ${MID}/lex.c ) ${DOC}/lex.dvi: ${IN}/lex.pamphlet - @ echo 89 making ${DOC}/lex.dvi from ${IN}/lex.pamphlet + @ echo 91 making ${DOC}/lex.dvi from ${IN}/lex.pamphlet @ (cd ${DOC} ; \ cp ${IN}/lex.pamphlet ${DOC} ; \ ${DOCUMENT} ${NOISE} lex ; \ @@ -687,16 +687,16 @@ ${DOC}/lex.dvi: ${IN}/lex.pamphlet \section{macro} <>= ${MID}/macro.c: ${IN}/macro.pamphlet - @ echo 90 making ${MID}/macro.c from ${IN}/macro.pamphlet + @ echo 92 making ${MID}/macro.c from ${IN}/macro.pamphlet @ (cd ${MID} ; ${TANGLE} ${IN}/macro.pamphlet >macro.c ) ${MIDOBJ}/macro.o: ${MID}/macro.c - @ echo 91 making ${MIDOBJ}/macro.o from ${MID}/macro.c + @ echo 93 making ${MIDOBJ}/macro.o from ${MID}/macro.c @ ( cd ${MIDOBJ} ; \ ${CC} -I${INC} -I${MID} -c ${CFLAGS} ${MID}/macro.c ) ${DOC}/macro.dvi: ${IN}/macro.pamphlet - @ echo 92 making ${DOC}/macro.dvi from ${IN}/macro.pamphlet + @ echo 94 making ${DOC}/macro.dvi from ${IN}/macro.pamphlet @ (cd ${DOC} ; \ cp ${IN}/macro.pamphlet ${DOC} ; \ ${DOCUMENT} ${NOISE} macro ; \ @@ -708,20 +708,20 @@ ${DOC}/macro.dvi: ${IN}/macro.pamphlet \section{mem} <>= ${MID}/mem.h: ${IN}/mem.pamphlet - @ echo 93 making ${MID}/mem.h from ${IN}/mem.pamphlet + @ echo 95 making ${MID}/mem.h from ${IN}/mem.pamphlet @ (cd ${MID} ; ${TANGLE} -R"mem.h" ${IN}/mem.pamphlet >mem.h ) ${MID}/mem.c: ${IN}/mem.pamphlet - @ echo 94 making ${MID}/mem.c from ${IN}/mem.pamphlet + @ echo 96 making ${MID}/mem.c from ${IN}/mem.pamphlet @ (cd ${MID} ; ${TANGLE} ${IN}/mem.pamphlet >mem.c ) ${MIDOBJ}/mem.o: ${MID}/mem.c - @ echo 95 making ${MIDOBJ}/mem.o from ${MID}/mem.c + @ echo 97 making ${MIDOBJ}/mem.o from ${MID}/mem.c @ ( cd ${MIDOBJ} ; \ ${CC} -I${INC} -I${MID} -c ${CFLAGS} ${MID}/mem.c ) ${DOC}/mem.dvi: ${IN}/mem.pamphlet - @ echo 96 making ${DOC}/mem.dvi from ${IN}/mem.pamphlet + @ echo 98 making ${DOC}/mem.dvi from ${IN}/mem.pamphlet @ (cd ${DOC} ; \ cp ${IN}/mem.pamphlet ${DOC} ; \ ${DOCUMENT} ${NOISE} mem ; \ @@ -733,20 +733,20 @@ ${DOC}/mem.dvi: ${IN}/mem.pamphlet \section{parse} <>= ${MID}/parse.h: ${IN}/parse.pamphlet - @ echo 97 making ${MID}/parse.h from ${IN}/parse.pamphlet + @ echo 99 making ${MID}/parse.h from ${IN}/parse.pamphlet @ (cd ${MID} ; ${TANGLE} -R"parse.h" ${IN}/parse.pamphlet >parse.h ) ${MID}/parse.c: ${IN}/parse.pamphlet - @ echo 98 making ${MID}/parse.c from ${IN}/parse.pamphlet + @ echo 100 making ${MID}/parse.c from ${IN}/parse.pamphlet @ (cd ${MID} ; ${TANGLE} ${IN}/parse.pamphlet >parse.c ) ${MIDOBJ}/parse.o: ${MID}/parse.c - @ echo 99 making ${MIDOBJ}/parse.o from ${MID}/parse.c + @ echo 101 making ${MIDOBJ}/parse.o from ${MID}/parse.c @ ( cd ${MIDOBJ} ; \ ${CC} -I${INC} -I${MID} -c ${CFLAGS} ${MID}/parse.c ) ${DOC}/parse.dvi: ${IN}/parse.pamphlet - @ echo 100 making ${DOC}/parse.dvi from ${IN}/parse.pamphlet + @ echo 102 making ${DOC}/parse.dvi from ${IN}/parse.pamphlet @ (cd ${DOC} ; \ cp ${IN}/parse.pamphlet ${DOC} ; \ ${DOCUMENT} ${NOISE} parse ; \ @@ -758,20 +758,20 @@ ${DOC}/parse.dvi: ${IN}/parse.pamphlet \section{parse-aux} <>= ${MID}/parse-aux.h: ${IN}/parse-aux.pamphlet - @ echo 101 making ${MID}/parse-aux.h from ${IN}/parse-aux.pamphlet + @ echo 103 making ${MID}/parse-aux.h from ${IN}/parse-aux.pamphlet @ (cd ${MID} ; ${TANGLE} -R"parseaux.h" ${IN}/parse-aux.pamphlet >parse-aux.h ) ${MID}/parse-aux.c: ${IN}/parse-aux.pamphlet - @ echo 102 making ${MID}/parse-aux.c from ${IN}/parse-aux.pamphlet + @ echo 104 making ${MID}/parse-aux.c from ${IN}/parse-aux.pamphlet @ (cd ${MID} ; ${TANGLE} ${IN}/parse-aux.pamphlet >parse-aux.c ) ${MIDOBJ}/parse-aux.o: ${MID}/parse-aux.c - @ echo 103 making ${MIDOBJ}/parse-aux.o from ${MID}/parse-aux.c + @ echo 105 making ${MIDOBJ}/parse-aux.o from ${MID}/parse-aux.c @ ( cd ${MIDOBJ} ; \ ${CC} -I${INC} -I${MID} -c ${CFLAGS} ${MID}/parse-aux.c ) ${DOC}/parse-aux.dvi: ${IN}/parse-aux.pamphlet - @ echo 104 making ${DOC}/parse-aux.dvi from ${IN}/parse-aux.pamphlet + @ echo 106 making ${DOC}/parse-aux.dvi from ${IN}/parse-aux.pamphlet @ (cd ${DOC} ; \ cp ${IN}/parse-aux.pamphlet ${DOC} ; \ ${DOCUMENT} ${NOISE} parse-aux ; \ @@ -783,16 +783,17 @@ ${DOC}/parse-aux.dvi: ${IN}/parse-aux.pamphlet \section{parse-input} <>= ${MID}/parse-input.c: ${IN}/parse-input.pamphlet - @ echo 105 making ${MID}/parse-input.c from ${IN}/parse-input.pamphlet + @ echo 107 making ${MID}/parse-input.c from ${IN}/parse-input.pamphlet @ (cd ${MID} ; ${TANGLE} ${IN}/parse-input.pamphlet >parse-input.c ) ${MIDOBJ}/parse-input.o: ${MID}/parse-input.c - @ echo 106 making ${MIDOBJ}/parse-input.o from ${MID}/parse-input.c + @ echo 108 making ${MIDOBJ}/parse-input.o from ${MID}/parse-input.c @ ( cd ${MIDOBJ} ; \ ${CC} -I${INC} -I${MID} -c ${CFLAGS} ${MID}/parse-input.c ) ${DOC}/parse-input.dvi: ${IN}/parse-input.pamphlet - @ echo 107 making ${DOC}/parse-input.dvi from ${IN}/parse-input.pamphlet + @ echo 109 making ${DOC}/parse-input.dvi \ + from ${IN}/parse-input.pamphlet @ (cd ${DOC} ; \ cp ${IN}/parse-input.pamphlet ${DOC} ; \ ${DOCUMENT} ${NOISE} parse-input ; \ @@ -804,20 +805,21 @@ ${DOC}/parse-input.dvi: ${IN}/parse-input.pamphlet \section{parse-paste} <>= ${MID}/parse-paste.h: ${IN}/parse-paste.pamphlet - @ echo 108 making ${MID}/parse-paste.h from ${IN}/parse-paste.pamphlet + @ echo 110 making ${MID}/parse-paste.h from ${IN}/parse-paste.pamphlet @ (cd ${MID} ; ${TANGLE} -R"parsepaste.h" ${IN}/parse-paste.pamphlet >parse-paste.h ) ${MID}/parse-paste.c: ${IN}/parse-paste.pamphlet - @ echo 109 making ${MID}/parse-paste.c from ${IN}/parse-paste.pamphlet + @ echo 111 making ${MID}/parse-paste.c from ${IN}/parse-paste.pamphlet @ (cd ${MID} ; ${TANGLE} ${IN}/parse-paste.pamphlet >parse-paste.c ) ${MIDOBJ}/parse-paste.o: ${MID}/parse-paste.c - @ echo 110 making ${MIDOBJ}/parse-paste.o from ${MID}/parse-paste.c + @ echo 112 making ${MIDOBJ}/parse-paste.o from ${MID}/parse-paste.c @ ( cd ${MIDOBJ} ; \ ${CC} -I${INC} -I${MID} -c ${CFLAGS} ${MID}/parse-paste.c ) ${DOC}/parse-paste.dvi: ${IN}/parse-paste.pamphlet - @ echo 111 making ${DOC}/parse-paste.dvi from ${IN}/parse-paste.pamphlet + @ echo 113 making ${DOC}/parse-paste.dvi \ + from ${IN}/parse-paste.pamphlet @ (cd ${DOC} ; \ cp ${IN}/parse-paste.pamphlet ${DOC} ; \ ${DOCUMENT} ${NOISE} parse-paste ; \ @@ -829,20 +831,21 @@ ${DOC}/parse-paste.dvi: ${IN}/parse-paste.pamphlet \section{parse-types} <>= ${MID}/parse-types.h: ${MID}/hterror.h ${IN}/parse-types.pamphlet - @ echo 112 making ${MID}/parse-types.h from ${IN}/parse-types.pamphlet + @ echo 114 making ${MID}/parse-types.h from ${IN}/parse-types.pamphlet @ (cd ${MID} ; ${TANGLE} -R"parsetypes.h" ${IN}/parse-types.pamphlet >parse-types.h ) ${MID}/parse-types.c: ${IN}/parse-types.pamphlet - @ echo 113 making ${MID}/parse-types.c from ${IN}/parse-types.pamphlet + @ echo 115 making ${MID}/parse-types.c from ${IN}/parse-types.pamphlet @ (cd ${MID} ; ${TANGLE} ${IN}/parse-types.pamphlet >parse-types.c ) ${MIDOBJ}/parse-types.o: ${MID}/parse-types.c - @ echo 114 making ${MIDOBJ}/parse-types.o from ${MID}/parse-types.c + @ echo 116 making ${MIDOBJ}/parse-types.o from ${MID}/parse-types.c @ ( cd ${MIDOBJ} ; \ ${CC} -I${INC} -I${MID} -c ${CFLAGS} ${MID}/parse-types.c ) ${DOC}/parse-types.dvi: ${IN}/parse-types.pamphlet - @ echo 115 making ${DOC}/parse-types.dvi from ${IN}/parse-types.pamphlet + @ echo 117 making ${DOC}/parse-types.dvi \ + from ${IN}/parse-types.pamphlet @ (cd ${DOC} ; \ cp ${IN}/parse-types.pamphlet ${DOC} ; \ ${DOCUMENT} ${NOISE} parse-types ; \ @@ -854,16 +857,16 @@ ${DOC}/parse-types.dvi: ${IN}/parse-types.pamphlet \section{readbitmap} <>= ${MID}/readbitmap.c: ${IN}/readbitmap.pamphlet - @ echo 116 making ${MID}/readbitmap.c from ${IN}/readbitmap.pamphlet + @ echo 118 making ${MID}/readbitmap.c from ${IN}/readbitmap.pamphlet @ (cd ${MID} ; ${TANGLE} ${IN}/readbitmap.pamphlet >readbitmap.c ) ${MIDOBJ}/readbitmap.o: ${MID}/readbitmap.c - @ echo 117 making ${MIDOBJ}/readbitmap.o from ${MID}/readbitmap.c + @ echo 119 making ${MIDOBJ}/readbitmap.o from ${MID}/readbitmap.c @ ( cd ${MIDOBJ} ; \ ${CC} -I${INC} -I${MID} -c ${CFLAGS} ${MID}/readbitmap.c ) ${DOC}/readbitmap.dvi: ${IN}/readbitmap.pamphlet - @ echo 118 making ${DOC}/readbitmap.dvi from ${IN}/readbitmap.pamphlet + @ echo 120 making ${DOC}/readbitmap.dvi from ${IN}/readbitmap.pamphlet @ (cd ${DOC} ; \ cp ${IN}/readbitmap.pamphlet ${DOC} ; \ ${DOCUMENT} ${NOISE} readbitmap ; \ @@ -875,20 +878,20 @@ ${DOC}/readbitmap.dvi: ${IN}/readbitmap.pamphlet \section{scrollbar} <>= ${MID}/scrollbar.h: ${IN}/scrollbar.pamphlet - @ echo 119 making ${MID}/scrollbar.h from ${IN}/scrollbar.pamphlet + @ echo 121 making ${MID}/scrollbar.h from ${IN}/scrollbar.pamphlet @ (cd ${MID} ; ${TANGLE} -R"scrollbar.h" ${IN}/scrollbar.pamphlet >scrollbar.h ) ${MID}/scrollbar.c: ${IN}/scrollbar.pamphlet - @ echo 120 making ${MID}/scrollbar.c from ${IN}/scrollbar.pamphlet + @ echo 122 making ${MID}/scrollbar.c from ${IN}/scrollbar.pamphlet @ (cd ${MID} ; ${TANGLE} ${IN}/scrollbar.pamphlet >scrollbar.c ) ${MIDOBJ}/scrollbar.o: ${MID}/scrollbar.c - @ echo 121 making ${MIDOBJ}/scrollbar.o from ${MID}/scrollbar.c + @ echo 123 making ${MIDOBJ}/scrollbar.o from ${MID}/scrollbar.c @ ( cd ${MIDOBJ} ; \ ${CC} -I${INC} -I${MID} -c ${CFLAGS} ${MID}/scrollbar.c ) ${DOC}/scrollbar.dvi: ${IN}/scrollbar.pamphlet - @ echo 122 making ${DOC}/scrollbar.dvi from ${IN}/scrollbar.pamphlet + @ echo 124 making ${DOC}/scrollbar.dvi from ${IN}/scrollbar.pamphlet @ (cd ${DOC} ; \ cp ${IN}/scrollbar.pamphlet ${DOC} ; \ ${DOCUMENT} ${NOISE} scrollbar ; \ @@ -900,17 +903,17 @@ ${DOC}/scrollbar.dvi: ${IN}/scrollbar.pamphlet \section{search} <>= ${OUTLIB}/htsearch: ${IN}/search.pamphlet - @echo 123 making ${OUTLIB}/htsearch from ${IN}/search.pamphlet + @echo 125 making ${OUTLIB}/htsearch from ${IN}/search.pamphlet @${TANGLE} -R"htsearch" ${IN}/search.pamphlet >${OUTLIB}/htsearch @chmod a+x ${OUTLIB}/htsearch ${OUTLIB}/presea: ${IN}/search.pamphlet - @echo 124 making ${OUTLIB}/presea from ${IN}/search.pamphlet + @echo 126 making ${OUTLIB}/presea from ${IN}/search.pamphlet @${TANGLE} -R"presea" ${IN}/search.pamphlet >${OUTLIB}/presea @chmod a+x ${OUTLIB}/presea ${DOC}/search.dvi: ${IN}/search.pamphlet - @ echo 122 making ${DOC}/search.dvi from ${IN}/search.pamphlet + @ echo 127 making ${DOC}/search.dvi from ${IN}/search.pamphlet @ (cd ${DOC} ; \ cp ${IN}/search.pamphlet ${DOC} ; \ ${DOCUMENT} ${NOISE} search ; \ @@ -922,20 +925,20 @@ ${DOC}/search.dvi: ${IN}/search.pamphlet \section{show-types} <>= ${MID}/show-types.h: ${IN}/show-types.pamphlet - @ echo 125 making ${MID}/show-types.h from ${IN}/show-types.pamphlet + @ echo 128 making ${MID}/show-types.h from ${IN}/show-types.pamphlet @ (cd ${MID} ; ${TANGLE} -R"showtypes.h" ${IN}/show-types.pamphlet >show-types.h ) ${MID}/show-types.c: ${IN}/show-types.pamphlet - @ echo 126 making ${MID}/show-types.c from ${IN}/show-types.pamphlet + @ echo 129 making ${MID}/show-types.c from ${IN}/show-types.pamphlet @ (cd ${MID} ; ${TANGLE} ${IN}/show-types.pamphlet >show-types.c ) ${MIDOBJ}/show-types.o: ${MID}/show-types.c - @ echo 127 making ${MIDOBJ}/show-types.o from ${MID}/show-types.c + @ echo 130 making ${MIDOBJ}/show-types.o from ${MID}/show-types.c @ ( cd ${MIDOBJ} ; \ ${CC} -I${INC} -I${MID} -c ${CFLAGS} ${MID}/show-types.c ) ${DOC}/show-types.dvi: ${IN}/show-types.pamphlet - @ echo 128 making ${DOC}/show-types.dvi from ${IN}/show-types.pamphlet + @ echo 131 making ${DOC}/show-types.dvi from ${IN}/show-types.pamphlet @ (cd ${DOC} ; \ cp ${IN}/show-types.pamphlet ${DOC} ; \ ${DOCUMENT} ${NOISE} show-types ; \ @@ -947,16 +950,16 @@ ${DOC}/show-types.dvi: ${IN}/show-types.pamphlet \section{spadbuf} <>= ${MID}/spadbuf.c: ${IN}/spadbuf.pamphlet - @ echo 129 making ${MID}/spadbuf.c from ${IN}/spadbuf.pamphlet + @ echo 132 making ${MID}/spadbuf.c from ${IN}/spadbuf.pamphlet @ (cd ${MID} ; ${TANGLE} ${IN}/spadbuf.pamphlet >spadbuf.c ) ${MIDOBJ}/spadbuf.o: ${MID}/spadbuf.c - @ echo 130 making ${MIDOBJ}/spadbuf.o from ${MID}/spadbuf.c + @ echo 133 making ${MIDOBJ}/spadbuf.o from ${MID}/spadbuf.c @ ( cd ${MIDOBJ} ; \ ${CC} -I${INC} -I${MID} -c ${CFLAGS} ${MID}/spadbuf.c ) ${DOC}/spadbuf.dvi: ${IN}/spadbuf.pamphlet - @ echo 131 making ${DOC}/spadbuf.dvi from ${IN}/spadbuf.pamphlet + @ echo 134 making ${DOC}/spadbuf.dvi from ${IN}/spadbuf.pamphlet @ (cd ${DOC} ; \ cp ${IN}/spadbuf.pamphlet ${DOC} ; \ ${DOCUMENT} ${NOISE} spadbuf ; \ @@ -968,16 +971,16 @@ ${DOC}/spadbuf.dvi: ${IN}/spadbuf.pamphlet \section{spadint} <>= ${MID}/spadint.c: ${IN}/spadint.pamphlet - @ echo 132 making ${MID}/spadint.c from ${IN}/spadint.pamphlet + @ echo 135 making ${MID}/spadint.c from ${IN}/spadint.pamphlet @ (cd ${MID} ; ${TANGLE} ${IN}/spadint.pamphlet >spadint.c ) ${MIDOBJ}/spadint.o: ${MID}/spadint.c - @ echo 133 making ${MIDOBJ}/spadint.o from ${MID}/spadint.c + @ echo 136 making ${MIDOBJ}/spadint.o from ${MID}/spadint.c @ ( cd ${MIDOBJ} ; \ ${CC} -I${INC} -I${MID} -c ${CFLAGS} ${MID}/spadint.c ) ${DOC}/spadint.dvi: ${IN}/spadint.pamphlet - @ echo 134 making ${DOC}/spadint.dvi from ${IN}/spadint.pamphlet + @ echo 137 making ${DOC}/spadint.dvi from ${IN}/spadint.pamphlet @ (cd ${DOC} ; \ cp ${IN}/spadint.pamphlet ${DOC} ; \ ${DOCUMENT} ${NOISE} spadint ; \ @@ -989,20 +992,20 @@ ${DOC}/spadint.dvi: ${IN}/spadint.pamphlet \section{titlebar} <>= ${MID}/titlebar.h: ${IN}/titlebar.pamphlet - @ echo 135 making ${MID}/titlebar.h from ${IN}/titlebar.pamphlet + @ echo 138 making ${MID}/titlebar.h from ${IN}/titlebar.pamphlet @ (cd ${MID} ; ${TANGLE} -R"titlebar.h" ${IN}/titlebar.pamphlet >titlebar.h ) ${MID}/titlebar.c: ${IN}/titlebar.pamphlet - @ echo 136 making ${MID}/titlebar.c from ${IN}/titlebar.pamphlet + @ echo 139 making ${MID}/titlebar.c from ${IN}/titlebar.pamphlet @ (cd ${MID} ; ${TANGLE} ${IN}/titlebar.pamphlet >titlebar.c ) ${MIDOBJ}/titlebar.o: ${MID}/titlebar.c - @ echo 137 making ${MIDOBJ}/titlebar.o from ${MID}/titlebar.c + @ echo 140 making ${MIDOBJ}/titlebar.o from ${MID}/titlebar.c @ ( cd ${MIDOBJ} ; \ ${CC} -I${INC} -I${MID} -c ${CFLAGS} ${MID}/titlebar.c ) ${DOC}/titlebar.dvi: ${IN}/titlebar.pamphlet - @ echo 138 making ${DOC}/titlebar.dvi from ${IN}/titlebar.pamphlet + @ echo 141 making ${DOC}/titlebar.dvi from ${IN}/titlebar.pamphlet @ (cd ${DOC} ; \ cp ${IN}/titlebar.pamphlet ${DOC} ; \ ${DOCUMENT} ${NOISE} titlebar ; \ @@ -1014,21 +1017,21 @@ ${DOC}/titlebar.dvi: ${IN}/titlebar.pamphlet \section{token} <>= ${MID}/token.h: ${IN}/token.pamphlet - @ echo 139 making ${MID}/token.h from ${IN}/token.pamphlet + @ echo 142 making ${MID}/token.h from ${IN}/token.pamphlet @ (cd ${MID} ; ${TANGLE} -R"token.h" ${IN}/token.pamphlet >token.h ) @ \section{ex2ht binary} <>= ${OUTLIB}/ex2ht: ${EX2HT_OBJS} - @ echo linking ${OUTLIB}/ex2ht + @ echo 143 linking ${OUTLIB}/ex2ht @ ${CC} ${EX2HT_OBJS} -o ${OUTLIB}/ex2ht ${LDFLAGS} @ \section{htadd binary} <>= ${OUT}/htadd: ${HTADD_OBJS} ${LIB}/sockio-c.o ${LIB}/bsdsignal.o - @ echo linking ${OUT}/htadd + @ echo 144 linking ${OUT}/htadd @ ${CC} ${HTADD_OBJS} -o ${OUT}/htadd ${LIB}/sockio-c.o \ ${LIB}/bsdsignal.o ${LDFLAGS} @@ -1036,7 +1039,7 @@ ${OUT}/htadd: ${HTADD_OBJS} ${LIB}/sockio-c.o ${LIB}/bsdsignal.o \section{hthits binary} <>= ${OUTLIB}/hthits: ${HTHITS_OBJS} - @ echo linking ${OUTLIB}/hthits + @ echo 145 linking ${OUTLIB}/hthits @ ${CC} ${HTHITS_OBJS} -o ${OUTLIB}/hthits ${LDFLAGS} @ @@ -1044,7 +1047,7 @@ ${OUTLIB}/hthits: ${HTHITS_OBJS} <>= ${OUT}/hypertex: ${HYPER_OBJS} ${LIB}/sockio-c.o ${LIB}/pixmap.o \ ${LIB}/spadcolors.o ${LIB}/util.o ${LIB}/bsdsignal.o - @ echo 139 linking ${OUT}/hypertex + @ echo 146 linking ${OUT}/hypertex (cd ${OUT} ; \ ${CC} -g ${HYPER_OBJS} -o ${OUT}/hypertex ${LIB}/sockio-c.o \ ${LIB}/pixmap.o ${LIB}/spadcolors.o ${LIB}/util.o \ @@ -1054,7 +1057,7 @@ ${OUT}/hypertex: ${HYPER_OBJS} ${LIB}/sockio-c.o ${LIB}/pixmap.o \ \section{htsearch binary} <>= ${OUT}/htsearch: ${OUTLIB}/htsearch ${OUTLIB}/presea - @ echo making ${OUT}/htsearch + @ echo 147 making ${OUT}/htsearch @ cp -p ${OUTLIB}/htsearch ${OUT}/htsearch @ cp -p ${OUTLIB}/presea ${OUT}/presea @@ -1064,7 +1067,7 @@ ${OUT}/htsearch: ${OUTLIB}/htsearch ${OUTLIB}/presea ${OUTLIB}/spadbuf: ${SPADBUF_OBJS} ${LIB}/sockio-c.o ${LIB}/bsdsignal.o \ ${LIB}/wct.o ${LIB}/edin.o ${LIB}/prt.o ${LIB}/cursor.o \ ${LIB}/fnct-key.o - @ echo making ${OUTLIB}/spadbuf + @ echo 148 making ${OUTLIB}/spadbuf @ (cd ${OUTLIB} ; \ ${CC} ${SPADBUF_OBJS} -o ${OUTLIB}/spadbuf ${LIB}/sockio-c.o \ ${LIB}/bsdsignal.o ${LIB}/wct.o ${LIB}/edin.o ${LIB}/prt.o \ @@ -1078,7 +1081,7 @@ is up to date. The file contains absolute offsets into the various order to do this we run [[htadd]] in the [[${HYPER}/pages]] directory. <>= ${HYPER}/pages/ht.db: ${IN}/pages/*.ht ${IN}/pages/*.pht - @echo making ${HYPER}/pages from ${SRC}/pages directory + @echo 149 making ${HYPER}/pages from ${SRC}/pages directory @ mkdir -p ${HYPER}/pages @ cp -pr pages/*.ht ${HYPER}/pages @ cp -pr pages/*.pht ${HYPER}/pages @@ -1090,14 +1093,55 @@ ${HYPER}/pages/ht.db: ${IN}/pages/*.ht ${IN}/pages/*.pht @ cp -pr viewports ${MNT}/${SYS}/doc @ +<>= +${HYPER}/rootpage.xhtml: ${IN}/bookvol11.pamphlet + @ echo 150 making ${HYPER}/xhtml from ${IN}/bookvol11.pamphlet + ( cd ${HYPER} ; \ + cp ${IN}/bookvol11.pamphlet . ; \ + ${TANGLE} -t8 bookvol11.pamphlet >Makefile.pages ; \ + make -j 10 -f Makefile.pages ; \ + rm -f Makefile.pages ; \ + rm -f bookvol11.pamphlet ) + +${HYPER}/bigbayou.png: ${IN}/bigbayou.png + @ echo 151 making ${HYPER}/bigbayou.png from ${IN}/bigbayou.png + @ cp ${IN}/bigbayou.png ${HYPER}/bigbayou.png + +${HYPER}/doctitle.png: ${IN}/doctitle.png + @ echo 152 making ${HYPER}/doctitle.png from ${IN}/doctitle.png + @ cp ${IN}/doctitle.png ${HYPER}/doctitle.png + +${MNT}/${SYS}/doc/bookvol11.dvi: ${IN}/bookvol11.pamphlet + @ echo 153 making ${MNT}/${SYS}/doc/bookvol11.dvi \ + from ${IN}/bookvol11.pamphlet + @ ( cd ${MNT}/${SYS} ; \ + cp ${IN}/bookvol11.pamphlet . ; \ + ${DOCUMENT} ${NOISE} bookvol11 ; \ + rm -f bookvol11.pamphlet ; \ + rm -f bookvol11.tex ; \ + rm -f bookvol11.idx ; \ + rm -f bookvol11 ) + +@ +<>= +${HYPER}/axbook/book-index.xhtml: ${IN}/axbook.tgz + @ echo 154 making ${HYPER}/axbook/*.xhtml from ${IN}/axbook.tgz + @( cd ${HYPER} ; tar -zxf ${IN}/axbook.tgz ) + +@ <<*>>= <> all: ${INCLUDES} ${BITMAPS} ${OBJS} ${SCRIPTS} ${BINFILES} \ - ${HYPER}/pages/ht.db ${DOCFILES} - @ echo 141 finished ${IN} + ${HYPER}/pages/ht.db ${DOCFILES} ${HYPER}/rootpage.xhtml \ + ${HYPER}/axbook/book-index.xhtml ${MNT}/${SYS}/doc/bookvol11.dvi \ + ${HYPER}/bigbayou.png ${HYPER}/doctitle.png + @ echo 155 finished ${IN} clean: - @echo 142 cleaning ${SRC}/hyper + @echo 156 cleaning ${SRC}/hyper + +<> +<> <> <> @@ -1145,6 +1189,7 @@ clean: <> <> <> + <> <> diff --git a/src/hyper/axbook.tgz b/src/hyper/axbook.tgz new file mode 100644 index 0000000..2baf4bb Binary files /dev/null and b/src/hyper/axbook.tgz differ diff --git a/src/hyper/bigbayou.png b/src/hyper/bigbayou.png new file mode 100644 index 0000000..14a7e2a Binary files /dev/null and b/src/hyper/bigbayou.png differ diff --git a/src/hyper/bookvol11.pamphlet b/src/hyper/bookvol11.pamphlet new file mode 100644 index 0000000..295ffe0 --- /dev/null +++ b/src/hyper/bookvol11.pamphlet @@ -0,0 +1,22191 @@ +\documentclass{book} +\usepackage{axiom} +\usepackage{makeidx} +\makeindex +\usepackage{graphicx} +\begin{document} +\begin{titlepage} +\center{\includegraphics{ps/axiomfront.ps}} +\vskip 0.1in +\includegraphics{ps/bluebayou.ps}\\ +\vskip 0.1in +{\Huge{The 30 Year Horizon}} +\vskip 0.1in +$$ +\begin{array}{lll} +Manuel\ Bronstein & William\ Burge & Timothy\ Daly \\ +James\ Davenport & Michael\ Dewar & Martin\ Dunstan \\ +Albrecht\ Fortenbacher & Patrizia\ Gianni & Johannes\ Grabmeier \\ +Jocelyn\ Guidry & Richard\ Jenks & Larry\ Lambe \\ +Michael\ Monagan & Scott\ Morrison & William\ Sit \\ +Jonathan\ Steinbach & Robert\ Sutor & Barry\ Trager \\ +Stephen\ Watt & Jim\ Wen & Clifton\ Williamson +\end{array} +$$ +\center{\large{VOLUME 11: BROWSER}} +\end{titlepage} +\pagenumbering{roman} +\begin{verbatim} +Portions Copyright (c) 2007 Timothy Daly +Portions Copyright (c) 2007 Alfredo Portes +Portions Copyright (c) 2007 Arthur Ralfs + +The Blue Bayou image Copyright (c) 2004 Jocelyn Guidry + +This book is licensed as follows: + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +\end{verbatim} + +Inclusion of names in the list of credits is based on historical +information and is as accurate as possible. Inclusion of names +does not in any way imply an endorsement but represents historical +influence on Axiom development. +\vfill +\eject +\begin{tabular}{lll} +Cyril Alberga & Roy Adler & Richard Anderson\\ +George Andrews & Henry Baker & Stephen Balzac\\ +Yurij Baransky & David R. Barton & Gerald Baumgartner\\ +Gilbert Baumslag & Fred Blair & Vladimir Bondarenko\\ +Mark Botch & Alexandre Bouyer & Peter A. Broadbery\\ +Martin Brock & Manuel Bronstein & Florian Bundschuh\\ +William Burge & Quentin Carpent & Bob Caviness\\ +Bruce Char & Cheekai Chin & David V. Chudnovsky\\ +Gregory V. Chudnovsky & Josh Cohen & Christophe Conil\\ +Don Coppersmith & George Corliss & Robert Corless\\ +Gary Cornell & Meino Cramer & Claire Di Crescenzo\\ +Timothy Daly Sr. & Timothy Daly Jr. & James H. Davenport\\ +Jean Della Dora & Gabriel Dos Reis & Michael Dewar\\ +Claire DiCrescendo & Sam Dooley & Lionel Ducos\\ +Martin Dunstan & Brian Dupee & Dominique Duval\\ +Robert Edwards & Heow Eide-Goodman & Lars Erickson\\ +Richard Fateman & Bertfried Fauser & Stuart Feldman\\ +Brian Ford & Albrecht Fortenbacher & George Frances\\ +Constantine Frangos & Timothy Freeman & Korrinn Fu\\ +Marc Gaetano & Rudiger Gebauer & Kathy Gerber\\ +Patricia Gianni & Holger Gollan & Teresa Gomez-Diaz\\ +Laureano Gonzalez-Vega& Stephen Gortler & Johannes Grabmeier\\ +Matt Grayson & James Griesmer & Vladimir Grinberg\\ +Oswald Gschnitzer & Jocelyn Guidry & Steve Hague\\ +Vilya Harvey & Satoshi Hamaguchi & Martin Hassner\\ +Ralf Hemmecke & Henderson & Antoine Hersen\\ +Pietro Iglio & Richard Jenks & Kai Kaminski\\ +Grant Keady & Tony Kennedy & Paul Kosinski\\ +Klaus Kusche & Bernhard Kutzler & Larry Lambe\\ +Frederic Lehobey & Michel Levaud & Howard Levy\\ +Rudiger Loos & Michael Lucks & Richard Luczak\\ +Camm Maguire & Bob McElrath & Michael McGettrick\\ +Ian Meikle & David Mentre & Victor S. Miller\\ +Gerard Milmeister & Mohammed Mobarak & H. Michael Moeller\\ +Michael Monagan & Marc Moreno-Maza & Scott Morrison\\ +Mark Murray & William Naylor & C. Andrew Neff\\ +John Nelder & Godfrey Nolan & Arthur Norman\\ +Jinzhong Niu & Michael O'Connor & Kostas Oikonomou\\ +Julian A. Padget & Bill Page & Jaap Weel\\ +Susan Pelzel & Michel Petitot & Didier Pinchon\\ +Claude Quitte & Norman Ramsey & Michael Richardson\\ +Renaud Rioboo & Jean Rivlin & Nicolas Robidoux\\ +Simon Robinson & Michael Rothstein & Martin Rubey\\ +Philip Santas & Alfred Scheerhorn & William Schelter\\ +Gerhard Schneider & Martin Schoenert & Marshall Schor\\ +Fritz Schwarz & Nick Simicich & William Sit\\ +Elena Smirnova & Jonathan Steinbach & Christine Sundaresan\\ +Robert Sutor & Moss E. Sweedler & Eugene Surowitz\\ +James Thatcher & Baldir Thomas & Mike Thomas\\ +Dylan Thurston & Barry Trager & Themos T. Tsikas\\ +Gregory Vanuxem & Bernhard Wall & Stephen Watt\\ +Juergen Weiss & M. Weller & Mark Wegman\\ +James Wen & Thorsten Werther & Michael Wester\\ +John M. Wiley & Berhard Will & Clifton J. Williamson\\ +Stephen Wilson & Shmuel Winograd & Robert Wisbauer\\ +Sandra Wityak & Waldemar Wiwianka & Knut Wolf\\ +Clifford Yapp & David Yun & Richard Zippel\\ +Evelyn Zoernack & Bruno Zuercher & Dan Zwillinger +\end{tabular} +\eject +\tableofcontents +\vfill +\eject +\setlength{\parindent}{0em} +\setlength{\parskip}{1ex} +{\Large{\bf New Foreword}} +\vskip .25in + +On October 1, 2001 Axiom was withdrawn from the market and ended +life as a commercial product. +On September 3, 2002 Axiom was released under the Modified BSD +license, including this document. +On August 27, 2003 Axiom was released as free and open source +software available for download from the Free Software Foundation's +website, Savannah. + +Work on Axiom has had the generous support of the Center for +Algorithms and Interactive Scientific Computation (CAISS) at +City College of New York. Special thanks go to Dr. Gilbert +Baumslag for his support of the long term goal. + +The online version of this documentation is roughly 1000 pages. +In order to make printed versions we've broken it up into three +volumes. The first volume is tutorial in nature. The second volume +is for programmers. The third volume is reference material. We've +also added a fourth volume for developers. All of these changes +represent an experiment in print-on-demand delivery of documentation. +Time will tell whether the experiment succeeded. + +Axiom has been in existence for over thirty years. It is estimated to +contain about three hundred man-years of research and has, as of +September 3, 2003, 143 people listed in the credits. All of these +people have contributed directly or indirectly to making Axiom +available. Axiom is being passed to the next generation. I'm looking +forward to future milestones. + +With that in mind I've introduced the theme of the ``30 year horizon''. +We must invent the tools that support the Computational Mathematician +working 30 years from now. How will research be done when every bit of +mathematical knowledge is online and instantly available? What happens +when we scale Axiom by a factor of 100, giving us 1.1 million domains? +How can we integrate theory with code? How will we integrate theorems +and proofs of the mathematics with space-time complexity proofs and +running code? What visualization tools are needed? How do we support +the conceptual structures and semantics of mathematics in effective +ways? How do we support results from the sciences? How do we teach +the next generation to be effective Computational Mathematicians? + +The ``30 year horizon'' is much nearer than it appears. + +\vskip .25in +%\noindent +Tim Daly\\ +CAISS, City College of New York\\ +November 10, 2003 ((iHy)) +\vfill +\eject +\pagenumbering{arabic} +\setcounter{chapter}{0} % Chapter 1 +\chapter{Overview} +This book contains the Firefox browser AJAX routines. + +\section{Build Instructions} +\begin{verbatim} + mkdir -p /home/silver/bitmaps + cp bookvol11.pamphlet /home/silver + cd /home/silver + export AXIOM=(where) + export PATH=$AXIOM/bin/lib:$AXIOM/bin:$PATH + notangle -t8 bookvol11.pamphlet > Makefile + make -j 10 + axiom -nox + -> )set mes auto off + -> )set out mathml on + -> axServer(8085,multiServ)$AXSERV + + Now start your browser and go to: + file:///home/silver/rootpage.xhtml + and then do: + Basic Commands -> Calculus -> Differentiate -> Continue + Basic Commands -> Matrix -> Continue + + You should see the result of the differentiate appear inline in the + page. You can change the values in the text areas, click continue, + and see the new result. +\end{verbatim} + +\section{The Makefile} +<<*>>= +TANGLE=${AXIOM}/bin/lib/notangle + +%.xhtml: bookvol11.pamphlet + @ echo making $*.xhtml + @ ${TANGLE} -R"$*.xhtml" bookvol11.pamphlet > $*.xhtml + +<> + +all: ${PAGES} + @ mkdir -p bitmaps + @ ${TANGLE} -R"axiom1.bitmap" bookvol11.pamphlet >bitmaps/axiom1.bitmap + @ ${TANGLE} -R"rcm3720.input" bookvol11.pamphlet >rcm3720.input + @ ${TANGLE} -R"strang.input" bookvol11.pamphlet >strang.input + @ ${TANGLE} -R"signatures.txt" bookvol11.pamphlet >signatures.txt + +clean: + @ rm -rf bitmaps + @ rm -f *.xhtml + @ rm -f rcm3720.input + @ rm -f signatures.txt +@ + +\section{Building new pages} +To add a new page you need to create a page with the default layout below +and add the name of the page to the PAGES variable below. + +Most of the pages have a default layout of the form: +\begin{verbatim} +\subsection{pagename.xhtml} +<>= +<> + + +<> +
Page subtitle goes here
+
+your basic page text goes here. +<> +@ +\end{verbatim} +There are several things to observe here: +
    +
  1. Each page lives in its own subsection and its own chunk.
  2. +
  3. The pagename and the chunkname are the same
  4. +
  5. The chunk includes the @<>
  6. +
  7. The chunk includes the @<>
  8. +
  9. The chunk includes the @<>
  10. +
+The default page layout cannot communicate with Axiom. + +\subsection{Communicating with Axiom} +If your page needs to communicate with Axiom you need to add some +information in the header of the page. +The default page that talks to Axiom has the form: +\begin{verbatim} +\subsection{pagename.xhtml} +@<>= +@<> + + + +@<> +
Page subtitle goes here
+
+your text goes here +your communication blocks go here +@<> +\end{verbatim} + +\subsection{Handling statements with no free variables} +Use a makeRequest call with a parameter of the id. +Note that the div with id of ``ansXX'' will get replaced +automatically and the ``ans'' prefix is required. +\begin{verbatim} +
  • + +
    +
  • +\end{verbatim} + +\subsection{Handling statements with free variables} +Free variables exist are used in statements but they are defined in +other statements. To make sure the free variables have the correct +values you need to include an explicit list of the other ids that +need to be executed {\sl before} this statement. You do this with +a call to ``handleFree''. It expects a list, enclosed in brackets, +of the ids to execute in order. Be certain that the current id is +at the end of the list. +\begin{verbatim} +
  • + +
    +
  • +\end{verbatim} + +\subsection{Handling domain database lookups} +Use an anchor tag of the form: +\begin{verbatim} +Vector +\end{verbatim} +This will be interpreted by Axiom to mean that you want to do a +lookup on a domain, category, or package whose name follows the +question mark. Note that the domain name should NOT be an abbreviation. + +\subsection{Handling )show domain} +Use a block containing a showcall of the form: +\begin{verbatim} +
  • + +
    +
  • +\end{verbatim} +Note that the ``)show'' must be at the beginning of the line +and that there can only be one space between the word show and +the following argument. + +\subsection{Handling lisp expressions} +Use a block containing a lispcall of the form: +
  • + +
    +
  • +Note that this works but you can easily blow away your Axiom +session with random statements. Let the coder beware. + +\subsection{Handling expressions that have no output} +Use the CSS class=``noresult'' tag on the input form. +This causes the item to show up in black text. It is +still executable and is generally executed by handleFree +calls because it contains definitions. However, things like +function definitions in Axiom return no interesting output +so there is no point in clicking on them. +\begin{verbatim} +
  • + +
    +
  • +\end{verbatim} + + +\section{Defined Pages} +Every page in this file is extracted by the Makefile. This is the list +of pages that will be extracted. It is organized roughly in the hierarchy +that you see in the browser pages. This is convention and is not required. + +The page hierarchy (used by the Makefile) is: +<>= +PAGES=rootpage.xhtml \ + commandline.xhtml \ + basiccommand.xhtml \ + tutorial.xhtml \ + jenks.xhtml \ + calculus.xhtml \ + differentiate.xhtml \ + indefiniteintegral.xhtml \ + definiteintegral.xhtml \ + basiclimit.xhtml \ + reallimit.xhtml \ + complexlimit.xhtml \ + summation.xhtml \ + bcmatrix.xhtml \ + bcexpand.xhtml \ + draw.xhtml \ + draw2donevariable.xhtml \ + draw2ddefinedcurve.xhtml \ + draw2dpolynomialequation.xhtml \ + draw3dtwovariable.xhtml \ + draw3ddefinedtube.xhtml \ + draw3ddefinedsurface.xhtml \ + series.xhtml \ + seriesexpand.xhtml \ + taylorseries.xhtml \ + laurentseries.xhtml \ + puiseuxseries.xhtml \ + solve.xhtml \ + solvelinearequations.xhtml \ + solvelinearmatrix.xhtml \ + solvesystempolynomials.xhtml \ + solvesinglepolynomial.xhtml \ + topreferencepage.xhtml \ + releasenotes.xhtml \ + usersguidepage.xhtml \ + aldorusersguidepage.xhtml \ + foundationlibrarydocpage.xhtml \ + topicspage.xhtml \ + uglangpage.xhtml \ + examplesexposedpage.xhtml \ + ugsyscmdpage.xhtml \ + operations.xhtml \ + dblookup.xhtml \ + dbcharacteristic.xhtml \ + dbcomplexcomplex.xhtml \ + dbcomplexconjugate.xhtml \ + dbcomplexfactor.xhtml \ + dbcompleximag.xhtml \ + dbcomplexnorm.xhtml \ + dbcomplexreal.xhtml \ + dbcomplexdoublefloat.xhtml \ + dbcomplexfloat.xhtml \ + dbcomplexinteger.xhtml \ + dbexpressioninteger.xhtml \ + dbfractioninteger.xhtml \ + dbfractionpolynomialinteger.xhtml \ + dbopbinary.xhtml \ + dbopacos.xhtml \ + dbopacosh.xhtml \ + dbopacot.xhtml \ + dbopacoth.xhtml \ + dbopacsc.xhtml \ + dbopacsch.xhtml \ + dbopaddmod.xhtml \ + dbopairyai.xhtml \ + dbopairybi.xhtml \ + dbopapproximants.xhtml \ + dbopasin.xhtml \ + dbopasinh.xhtml \ + dbopasec.xhtml \ + dbopasech.xhtml \ + dbopatan.xhtml \ + dbopatanh.xhtml \ + dbopbesseli.xhtml \ + dbopbesselj.xhtml \ + dbopbesselk.xhtml \ + dbopbessely.xhtml \ + dbopbeta.xhtml \ + dbopcardinalnumber.xhtml \ + dbopcoefficient.xhtml \ + dbopcoefficients.xhtml \ + dbopcoerce.xhtml \ + dbopcolumn.xhtml \ + dbopcompactfraction.xhtml \ + dbopcomplexeigenvectors.xhtml \ + dbopcomplexelementary.xhtml \ + dbopcomplexintegrate.xhtml \ + dbopcomplexlimit.xhtml \ + dbopcomplexsolve.xhtml \ + dbopcontent.xhtml \ + dbopcontinuedfraction.xhtml \ + dbopconvergents.xhtml \ + dbopcopy.xhtml \ + dbopcos.xhtml \ + dbopcosh.xhtml \ + dbopcot.xhtml \ + dbopcoth.xhtml \ + dbopcount.xhtml \ + dbopcountableq.xhtml \ + dbopcsc.xhtml \ + dbopcsch.xhtml \ + dbopcycleragits.xhtml \ + dbopd.xhtml \ + dbopdecimal.xhtml \ + dbopdefiningpolynomial.xhtml \ + dbopdegree.xhtml \ + dbopdenom.xhtml \ + dbopdeterminant.xhtml \ + dbopdiagonalmatrix.xhtml \ + dbopdigamma.xhtml \ + dbopdigits.xhtml \ + dbopdimension.xhtml \ + dbopdivide.xhtml \ + dbopeigenmatrix.xhtml \ + dbopeigenvalues.xhtml \ + dbopeigenvector.xhtml \ + dbopeigenvectors.xhtml \ + dbopelt.xhtml \ + dbopeval.xhtml \ + dbopevenq.xhtml \ + dbopexp.xhtml \ + dbopfactor.xhtml \ + dbopfactorfraction.xhtml \ + dbopfiniteq.xhtml \ + dbopfirstdenom.xhtml \ + dbopfirstnumer.xhtml \ + dbopfractragits.xhtml \ + dbopgamma.xhtml \ + dbopgcd.xhtml \ + dbophex.xhtml \ + dbophorizconcat.xhtml \ + dbophtrigs.xhtml \ + dbophypergeometric0f1.xhtml \ + dbopinteger.xhtml \ + dbopintegrate.xhtml \ + dbopinverse.xhtml \ + dbopinvmod.xhtml \ + dboplaurent.xhtml \ + dboplcm.xhtml \ + dbopleadingcoefficient.xhtml \ + dbopleadingmonomial.xhtml \ + dboplength.xhtml \ + dboplimit.xhtml \ + dboplog.xhtml \ + dboploggamma.xhtml \ + dbopmainvariable.xhtml \ + dbopmap.xhtml \ + dbopmapbang.xhtml \ + dbopmatrix.xhtml \ + dbopmax.xhtml \ + dbopmemberq.xhtml \ + dbopmin.xhtml \ + dbopminimumdegree.xhtml \ + dbopminus.xhtml \ + dbopmonicdivide.xhtml \ + dbopmulmod.xhtml \ + dbopncols.xhtml \ + dbopnew.xhtml \ + dbopnorm.xhtml \ + dbopnrows.xhtml \ + dbopnthfractionalterm.xhtml \ + dbopnthroot.xhtml \ + dbopnullity.xhtml \ + dbopnullspace.xhtml \ + dbopnumberoffractionalterms.xhtml \ + dbopnumer.xhtml \ + dbopnumeric.xhtml \ + dbopoperator.xhtml \ + dboporthonormalbasis.xhtml \ + dboppadicfraction.xhtml \ + dboppartialfraction.xhtml \ + dboppartialquotients.xhtml \ + dboppattern.xhtml \ + dboppermanent.xhtml \ + dboppi.xhtml \ + dbopplus.xhtml \ + dboppolygamma.xhtml \ + dboppositiveremainder.xhtml \ + dbopprefixragits.xhtml \ + dbopprimefactor.xhtml \ + dboppuiseux.xhtml \ + dbopqelt.xhtml \ + dbopqseteltbang.xhtml \ + dbopquatern.xhtml \ + dbopquo.xhtml \ + dbopradicaleigenvectors.xhtml \ + dbopradicalsolve.xhtml \ + dboprank.xhtml \ + dbopratdenom.xhtml \ + dboprealeigenvectors.xhtml \ + dboprealelementary.xhtml \ + dbopreduce.xhtml \ + dbopreductum.xhtml \ + dboprem.xhtml \ + dbopresetvariableorder.xhtml \ + dbopresultant.xhtml \ + dboprootof.xhtml \ + dboprootsimp.xhtml \ + dboprootsof.xhtml \ + dboprow.xhtml \ + dboprowechelon.xhtml \ + dbopsetcolumnbang.xhtml \ + dbopsetelt.xhtml \ + dbopseteltbang.xhtml \ + dbopsetrowbang.xhtml \ + dbopsetsubmatrixbang.xhtml \ + dbopsimplify.xhtml\ + dbopsec.xhtml \ + dbopsech.xhtml \ + dbopseries.xhtml \ + dbopseriessolve.xhtml \ + dbopsin.xhtml \ + dbopsingleintegerand.xhtml \ + dbopsingleintegernot.xhtml \ + dbopsingleintegeror.xhtml \ + dbopsingleintegerxor.xhtml \ + dbopsinh.xhtml \ + dbopsetvariableorder.xhtml \ + dbopsolve.xhtml \ + dbopsqrt.xhtml \ + dbopstar.xhtml \ + dbopstarstar.xhtml \ + dbopsubmatrix.xhtml \ + dbopsubmatrix.xhtml \ + dbopsubmod.xhtml \ + dboptan.xhtml \ + dboptanh.xhtml \ + dboptaylor.xhtml \ + dboptimes.xhtml \ + dboptotaldegree.xhtml \ + dboptrace.xhtml \ + dboptranspose.xhtml \ + dboptrigs.xhtml \ + dbopvariables.xhtml \ + dbopvectorise.xhtml \ + dbopvectorspace.xhtml \ + dbopvertconcat.xhtml \ + dbopwholepart.xhtml \ + dbopwholeragits.xhtml \ + dbopzeroof.xhtml \ + dbopzerosof.xhtml \ + dbpolynomialinteger.xhtml \ + dbpolynomialfractioninteger.xhtml \ + systemvariables.xhtml \ + glossarypage.xhtml \ + htxtoppage.xhtml \ + refsearchpage.xhtml \ + topicspage.xhtml \ + numberspage.xhtml \ + numintegers.xhtml \ + numgeneralinfo.xhtml \ + numfactorization.xhtml \ + numfunctions.xhtml \ + numexamples.xhtml \ + numproblems.xhtml \ + numfractions.xhtml \ + numrationalnumbers.xhtml \ + numquotientfields.xhtml \ + nummachinefloats.xhtml \ + numfloat.xhtml \ + numcomplexnumbers.xhtml \ + numfinitefields.xhtml \ + numnumericfunctions.xhtml \ + numcardinalnumbers.xhtml \ + nummachinesizedintegers.xhtml \ + numromannumerals.xhtml \ + numcontinuedfractions.xhtml \ + numpartialfractions.xhtml \ + numquaternions.xhtml \ + numoctonions.xhtml \ + numrepeatingdecimals.xhtml \ + numrepeatingbinaryexpansions.xhtml \ + numrepeatinghexexpansions.xhtml \ + numotherbases.xhtml \ + polynomialpage.xhtml \ + polybasicfunctions.xhtml \ + polysubstitutions.xhtml \ + polyfactorization.xhtml \ + polyfactorization1.xhtml \ + polyfactorization2.xhtml \ + polyfactorization3.xhtml \ + polyfactorization4.xhtml \ + polygcdandfriends.xhtml \ + polyroots.xhtml \ + polyroots1.xhtml \ + polyroots2.xhtml \ + polyroots3.xhtml \ + polyroots4.xhtml \ + polyspecifictypes.xhtml \ + polyspecifictypes1.xhtml \ + factored.xhtml \ + polyspecifictypes2.xhtml \ + polyspecifictypes3.xhtml \ + polyspecifictypes4.xhtml \ + functionpage.xhtml \ + funrationalfunctions.xhtml \ + funalgebraicfunctions.xhtml \ + funelementaryfunctions.xhtml \ + funsimplification.xhtml \ + funpatternmatching.xhtml \ + funoperatoralgebra.xhtml \ + equationpage.xhtml \ + equsystemlinear.xhtml \ + equdifferential.xhtml \ + equdifferentiallinear.xhtml \ + equdifferentialnonlinear.xhtml \ + equdifferentialpowerseries.xhtml \ + calculuspage.xhtml \ + callimits.xhtml \ + calderivatives.xhtml \ + calintegrals.xhtml \ + calmoreintegrals.xhtml \ + callaplace.xhtml \ + calseries.xhtml \ + calseries1.xhtml \ + calseries2.xhtml \ + calseries3.xhtml \ + calseries4.xhtml \ + calseries5.xhtml \ + calseries6.xhtml \ + calseries7.xhtml \ + calseries8.xhtml \ + linalgpage.xhtml \ + linintro.xhtml \ + lincreate.xhtml \ + linoperations.xhtml \ + lineigen.xhtml \ + linhilbert.xhtml \ + linpermaent.xhtml \ + linvectors.xhtml \ + linsquarematrices.xhtml \ + lin1darrays.xhtml \ + lin2darrays.xhtml \ + linconversion.xhtml \ + graphicspage.xhtml \ + graphexamples.xhtml \ + graph2d.xhtml \ + graph3d.xhtml \ + graphviewports.xhtml \ + algebrapage.xhtml \ + algnumbertheory.xhtml \ + alggrouptheory.xhtml \ + cryptopage.xhtml \ + cryptoclass1.xhtml \ + cryptoclass2.xhtml \ + cryptoclass3.xhtml \ + cryptoclass4.xhtml \ + cryptoclass5.xhtml \ + cryptoclass6.xhtml \ + cryptoclass7.xhtml \ + cryptoclass8.xhtml \ + cryptoclass9.xhtml \ + cryptoclass10.xhtml \ + cryptoclass11.xhtml \ + ocwmit18085.xhtml \ + ocwmit18085lecture1.xhtml \ + ocwmit18085lecture2.xhtml \ + man0page.xhtml \ + topexamplepage.xhtml \ + topsettingspage.xhtml \ + axiomfonts.xhtml \ + pagelist.xhtml \ + pagematrix.xhtml \ + pageonedimensionalarray.xhtml \ + pagepermanent.xhtml \ + pageset.xhtml \ + pagesquarematrix.xhtml \ + pagetable.xhtml \ + pagetwodimensionalarray.xhtml \ + pagevector.xhtml + +@ + +\section{The Standard Layout} +Generally a page has a standard layout using a couple of chunks +to minimize the typing. The defined chunks are: +\begin{itemize} +\item ``standard head'' which includes the head element, xmlns, meta, and +title element. It also contains the ``style'' element for CSS information. +\item ``page head'' contains the banner information +\item ``page foot'' contains the trailing page information and the +body-end and html-end tags +\end{itemize} +So the basic layout looks like +\begin{verbatim} +@<> + (local and general javascript goes here) + + +@<> + (local page definition goes here) +@<> +\end{verbatim} +So all you need to worry about are the actual page forms and the +javascript to fetch those forms. + +For ``active pages'', that is those that communicate with Axiom +they generally define a javascript function called ``commandline'' +which formats the request to be sent to the host. You also need to +include the ``axiom talker'' chunk. Note that ``axiom talker'' +expects the ``commandline'' function to exist and calls it. Thus, +for the page that handles differentiation calls to Axiom we add +the local javascript: +\begin{verbatim} + + + +\end{verbatim} +This defined the ``commandline'' function and embeds the ``axiom talker''. +The ``commandline'' function knows how to fetch fields from the rest of +the page and format them into a single Axiom string. This is page +specific code. For example, this shows a single input line which +will be sent to the host when the ``Continue'' is pressed: +\begin{verbatim} +
    +

    + Type an input command line to Axiom:
    + + @<> +

    +
    + @<> +\end{verbatim} + +Note that the commandline function takes an argument which it gets +from the caller, makeRequest. This argument can be used to distinguish +which button was pressed. + +The {\bf div} section with {\bf id=``mathAns''} is replaced by the +result sent from the server. + +\section{Cascading Style Sheet} +This is the standard CSS style section that gets included with every +page. We do this here but it could be a separate style sheet. It +hardly matters either way as the style sheet is trivial. +\begin{verbatim} +\end{verbatim} +< +@ + +\section{standard head} +This is the standard head section. It is used on pages that do not +include javascript. Note that it does NOT include the so +the javascript can be added easily. +<>= + + + + + Axiom Documentation +< + + +<> + +<> +@ + +\subsection{graphexamples.xhtml} +<>= +<> + + +<> + graphexamples not implemented +<> +@ + +\subsection{graphicspage.xhtml} +<>= +<> + + +<> +Axiom can plot curves and surfaces of various types, as well as +lists of points in the plane. + + + + + + + + + + + + + + + + + +
    + Examples + + See examples of Axiom graphics +
    + 2D Graphics + + Graphics in the real and complex plane +
    + 3D Graphics + + Plot surfaces, curves, or tubes around curves +
    + Viewports + + Customize graphics using Viewports +
    +<> +@ + +\subsection{graphviewports.xhtml} +<>= +<> + + +<> + graphviewports not implemented +<> +@ + +\subsection{graph2d.xhtml} +<>= +<> + + +<> + graph2d not implemented +<> +@ + +\subsection{graph3d.xhtml} +<>= +<> + + +<> + graph3d not implemented +<> +@ + +%%H +\subsection{htxtoppage.xhtml} +<>= +<> + + +<> + htxtoppage not implemented +<> +@ + + +%%I +\subsection{indefiniteintegral.xhtml} +<>= +<> + + + +<> +
    + Enter the function you want to integrate:
    +
    + Enter the variable of integration: +
    +
    +<> +<> +<> +@ + +%%J +\subsection{jenks.xhtml} +<>= +<> + + +<> +
    + + + +
    +
    +

    + + AXIOM -- Richard D. Jenks and Robert S. Sutor + +

    +
    +
    +

    + + The Scientific Computation System + +

    +
    +
    +

    + + Volume 0 -- The Textbook + +

    +
    + + Chapter 0: Introduction to Axiom +
    + + Chapter 1: An Overview of Axiom +
    + + Chapter 2: Using Types and Modes +
    + + Chapter 3: Using HyperDoc +
    + + Chapter 4: Input Files and Output Styles +
    + + Chapter 5: Overview of Interactive Language +
    + + Chapter 6: User-Defined Functions, Macros and Rules +
    + + Chapter 7: Graphics +
    + + Chapter 8: Advanced Problem Solving +
    + + Chapter 9: Some Examples of Domains and Packages +
    + + Chapter 10: Interactive Programming +
    + + Chapter 11: Packages +
    + + Chapter 12: Categories +
    + + Chapter 13: Domains +
    + + Chapter 14: Browse +
    + + Chapter 15: What's New in Axiom Version 2.0 +
    + + Chapter 17: Categories +
    + + Chapter 18: Domains +
    + + Chapter 19: Packages +
    + + Chapter 21: Programs for AXIOM Images +
    +<> +@ + +%%K +%%L + +\subsection{laurentseries.xhtml} +<>= +<> + + + +<> + + + + + + + + + + + + + + + + +
    + Enter the formula for the general coefficient of the series: +
    + +
    + Enter the index variable for your formula: + +
    + Enter the power series variable: + +
    + Enter the point about which to expand: + +
    +For Laurent Series, the exponent of the power series variable ranges +from an initial value, an arbitrary integer value, to plus +infinity; the step size is any positive integer. + + + + + + + +
    + Enter the initial value of the index (an integer): + +
    + Enter the step size (a positive integer): + +
    +<> +<> +<> + +@ + +\subsection{linalgpage.xhtml} +<>= +<> + + +<> + + + + + + + + + + + + + + + + + + + + + + + + + +
    + Introduction +
    + Create and manipulate matrices. Work with the entries of a + matrix. Perform matrix arithmetic. +
    + Creating Matrices +
    + Create matrices from scratch and from other matrices +
    + Operations on Matrices +
    + Algebraic manipulations with matrices. Compute the inverse, + determinant, and trace of a matrix. Find the rank, nullspace, + and row echelon form of a matrix. +
    + Eigenvalues and Eigenvectors +
    + How to compute eigenvalues and eigenvectors +
    +
    + +<> +@ + +\subsection{linconversion.xhtml} +<>= +<> + + +<> + linconversion not implemented +<> +@ + +\subsection{lincreate.xhtml} +<>= +<> + + + +<> +
    Creating Matrices
    +
    +There are many ways to create a matrix from a collection of values or +from existing matrices. + +If the matrix has almost all items equal to the same value, use +new to create a matrix filled with that value +and then reset the entries that are different. +
      +
    • + +
      +
    • +
    +To change the entry in the second row, third column to 5, use +setelt. +
      +
    • + +
      +
    • +
    +An alternative syntax is to use assignment. +
      +
    • + +
      +
    • +
    +The matrix was destructively modified. +
      +
    • + +
      +
    • +
    +If you already have the matrix entries as a list of lists, use +matrix. +
      +
    • + +
      +
    • +
    +If the matrix is diagonal, use +diagonalMatrix +
      +
    • + +
      +
    • +
    +Use setRow! and +setColumn! +to change a row or column of a matrix. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    +Use copy to make a copy of a matrix. +
      +
    • + +
      +
    • +
    +This is useful if you intend to modify a matrix destructively but want a +copy of the original. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    +Use subMatrix(dm,2,3,2,4) to extract +part of an existing matrix. The syntax is +
    +  subMatrix(m,firstrow,lastrow,firstcol,lastcol)
    +
    +
      +
    • + +
      +
    • +
    +To change a submatrix, use +setsubMatrix!. +
      +
    • + +
      +
    • +
    +If e is too big to fit where you specify, an error message is displayed. Use +subMatrix. +
      +
    • + +
      +
    • +
    +This changes the submatrix of d whose upper left corner is at the first row +and second column and whose size is that of e. +
      +
    • + +
      +
    • +
    +
      +
    • + +
      +
    • +
    +Matrices can be joined either horizontally or vertically to make new +matrices. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    +Use horizConcat to append them side to +side. The two matrices must have the same number of rows. +
      +
    • + +
      +
    • +
    +Use vertConcat to stack one upon the +other. The two matrices must have the same number of columns. +
      +
    • + +
      +
    • +
    +The operation transpose is used to create +a new matrix by reflection across the main diagonal. +
      +
    • + +
      +
    • +
    +<> +@ + +\subsection{lineigen.xhtml} +<>= +<> + + + +<> +
    Computation of Eigenvalues and Eigenvectors
    +
    +In this section we show you some of Axiom's facilities for computing and +manipulating eigenvalues and eigenvectors, also called characteristic +values and characteristic vectors, respectively. + +Let's first create a matrix with integer entries. +
      +
    • + +
      +
    • +
    +To get a list of the rational eigenvalues, use the operation +eigenvalues. +
      +
    • + +
      +
    • +
    +Given an explicit eigenvalue, +eigenvector computes the eigenvectors +corresponding to it. +
      +
    • + +
      +
    • +
    +The operation eigenvectors returns a +list of pairs of values and vectors. When an eigenvalue is rational, Axiom +gives you the value explicitly; otherwise, its minimal polynomial is given, +(the polynomial of lowest degree with the eigenvalues as roots), together +with a parametric representation of the eigenvector using the eigenvalue. +This means that if you ask Axiom to solve +the minimal polynomial, then you can substitute these roots into the +parametric form of the corresponding eigenvectors. + +You must be aware that unless an exact eigenvalue has been computed, +the eigenvector may be badly in error. +
      +
    • + +
      +
    • +
    +Another possibility is to use the operation +radicalEigenvectors tries to +compute explicitly the eignevectors in terms of radicals. +
      +
    • + +
      +
    • +
    +Alternatively, Axiom can compute real or complex approximations to the +eigenvectors and eigenvalues using the operations +realEigenvectors or +complexEigenvectors. They +each take an additional argument epsilon to specify the "precision" +required. In the real case, this means that each approximation will be +within plus or minus epsilon of the actual result. In the complex case, this +means that each approximation will be within plus or minus epsilon of the +actual result in each of the real and imaginary parts. + +The precision can be specified as a Float if +the results are desired in floating-point notation, or as +Fraction Integer if the results are +to be expressed using rational (or complex rational) numbers. +
      +
    • + +
      +
    • +
    +If an n by n matrix has n distinct eigenvalues (and therefore n eigenvectors) +the operation eigenMatrix gives you a +matrix of the eigenvectors. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    +If a symmetric matrix has a basis of orthonormal eigenvectors, then +orthonormalBasis computes a list +of these vectors. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    +<> +@ + +\subsection{linhilbert.xhtml} +<>= +<> + + + +<> +
    An Example: Determinant of a Hilbert Matrix
    +
    +Consider the problem of computing the determinant of a 10 by 10 Hilbert +matrix. The (i,j)-th entry of a Hilbert matrix is given by 1/(i+j+1). + +First do the computation using rational numbers to obtain the exact result. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    +The result given by hardware floats is correct only to four significant digits +of precision. In the jargon of numerical analysis, the Hilbert matrix is said +to be "ill-conditioned". +
      +
    • + +
      +
    • +
    +Now repeat the computation at a higher precision using Float. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    +Reset digits to its default value. +
      +
    • + +
      +
    • +
    +<> +@ + +\subsection{linintro.xhtml} +<>= +<> + + + +<> +
    Expanding to Higher Dimensions
    +
    +To get higher dimensional aggregates, you can create one-dimensional +aggregates with elements that are themselves aggregates, for example, +lists of list, one-dimensional arrays of list of multisets, and so on. For +applications requiring two-dimensional homogeneous aggregates, you will +likely find two-dimensional arrays and matrices useful. + +The entries in TwoDimensionalArray +and Matrix objects are all the same type, +except that those for Matrix must belong to a +Ring. You create and access elements in roughly +the same way. Since matrices have an understood algebraic structure, certain +algebraic operations are available for matrices but not for arrays. Because +of this, we limit our discussion here to Matrix, +that can be regarded as an extension of +TwoDimensionalArray. See +TwoDimensionalArray +For more +information about Axiom's linear algebra facilities see +Matrix, +Permanent, +SquareMatrix, +Vector, + +Computation of Eigenvalues and Eigenvectors, and + +Solution of Linear and Polynomial Equations. + +You can create a matrix from a list of lists, where each of the inner +lists represents a row of the matrix. +
      +
    • + +
      +
    • +
    +The "collections" construct (see + +Creating Lists and Streams with Iterators) +is useful for creating matrices whose entries are given by formulas. +
      +
    • + +
      +
    • +
    +Let vm denote the three by three Vandermonde matrix. +
      +
    • + +
      +
    • +
    +Use this syntax to extract an entry in the matrix. +
      +
    • + +
      +
    • +
    +You can also pull out a row or a column. +
      +
    • + +
      +
    • +
    +You can do arithmetic. +
      +
    • + +
      +
    • +
    +You can perform operations such as +transpose, +trace, and +determinant +
      +
    • + +
      +
    • +
    +<> +@ + +\subsection{linoperations.xhtml} +<>= +<> + + + +<> +
    Operations on Matrices
    +
    +Axiom provides both left and right scalar multiplication. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    +You can add, subtract, and multiply matrices provided, of course, that the +matrices have compatible dimensions. If not, an error message is displayed. +
      +
    • + +
      +
    • +
    +This following product is defined but n*m is not. +
      +
    • + +
      +
    • +
    +The operations nrows and +ncols return the number of rows and +columns of a matrix. You can extract a row or a column of a matrix using +the operations row and +column. The object returned ia a +Vector. Here is the third column of the matrix n. +
      +
    • + +
      +
    • +
    +You can multiply a matrix on the left by a "row vector" and on the right by +a "column vector". +
      +
    • + +
      +
    • +
    +The operation inverse computes the inverse +of a matrix if the matrix is invertible, and returns "failed" if not. This +Hilbert matrix invertible. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    +This matrix is not invertible. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    +The operation determinant computes the +determinant of a matrix provided that the entries of the matrix belong to a +CommutativeRing. The above matrix mm +is not invertible and, hence, must have determinant 0. +
      +
    • + +
      +
    • +
    +The operation trace computes the trace of a +square matrix. +
      +
    • + +
      +
    • +
    +The operation rank computes the rank of a matrix: +the maximal number of linearly independent rows or columns. +
      +
    • + +
      +
    • +
    +The operation nullity computes the nullity +of a matrix: the dimension of its null space. +
      +
    • + +
      +
    • +
    +The operation nullSpace returns a list +containing a basis for the null space of a matrix. Note that the nullity is +the number of elements in a basis for the null space. +
      +
    • + +
      +
    • +
    +The operation rowEchelon returns the row +echelon form of a matrix. It is easy to see that the rank of this matrix is +two and that its nullity is also two. +
      +
    • + +
      +
    • +
    +For more information see +Expanding to Higher Dimensions, + +Computation of Eigenvalues and Eigenvectors, and + +An Example: Determinant of a Hilbert Matrix. Also see +Permanent, +Vector, +OneDimensionalArray, and +TwoDimensionalArray. Issue the +system command +
      +
    • + +
      +
    • +
    +to display the full ist of operations defined by +Matrix. +<> +@ + +\subsection{linpermaent.xhtml} +<>= +<> + + + +<> +
    Permanent
    +
    +The package Permanent provides the function +permanent for square matrices. The +permanent of a square matrix can be +computed in the same way as the determinant by expansion of minors except +that for the permanent the sign for each element is 1, rather than being 1 +if the row plus column indices is positive and -1 otherwise. This function +is much more difficult to compute efficiently than the +determinant. An example of the use of +permanent is the calculation of the nth +derangement number, defined to be the number of different possibilities +for n couples to dance but never with their own spouse. Consider an n by x +matrix with entries 0 on the diagonal and 1 elsewhere. Think of the rows as +one-half of each couple (for example, the males) and the columns the other +half. The permanent of such a matrix gives the desired derangement number. +
      +
    • + +
      +
    • +
    +Here are some derangement numbers, which you see grow quite fast. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    +<> +@ + +\subsection{linsquarematrices.xhtml} +<>= +<> + + + +<> +
    SquareMatrix
    +
    +The top level matrix type in Axiom is +Matrix, see +(Matrix), which provides basic arithmetic +and linear algebra functions. However, since the matrices can be of any +size it is not true that any pair can be added or multiplied. Thus +Matrix has little algebraic structure. + +Sometimes you want to use matrices as coefficients for polynomials or in +other algebraic contexts. In this case, +SquareMatrix should be used. The +domain SquareMatrix(n,R) gives the +ring of n by n square matrices over R. +
      +
    • + +
      +
    • +
    +The usual arithmetic operations are available. +
      +
    • + +
      +
    • +
    +Square matrices can be used where ring elements are required. For example, +here is a matrix with matrix entries. +
      +
    • + +
      +
    • +
    +Or you can construct a polynomial with square matrix coefficients. +
      +
    • + +
      +
    • +
    +This value can be converted to a square matrix with polynomial coefficients. +
      +
    • + +
      +
    • +
    +For more information on related topics see +Modes and +Matrix. Issue the system command +
      +
    • + +
      +
    • +
    +to display the full list of operations defined by +SquareMatrix. +<> +@ + +\subsection{linvectors.xhtml} +<>= +<> + + + +<> +
    Vector
    +
    +The Vector domain is used for storing +data in a one-dimensonal indexed data structure. A vector is a +homogeneous data structure in that all the components of the vector +must belong to the same Axiom domain. Each vector has a fixed length +specified by the user; vectors are not extensible. This domain is +similar to the +OneDimensionalArray domain, +except that when the components of a +Vector belong to a +Ring, arithmetic operations are provided. +For more examples of operations that are defined for both +Vector and +OneDimensionalArray, see +OneDimensionalArray. + +As with the OneDimensionalArray +domain, a +Vector can be created by calling the operation +new, its components can be accessed by calling +the operations elt and +qelt, and its components can be reset by +calling the operations +setelt and +setelt!. This creates a vector of +integers of length 5 all of whose components are 12. +
      +
    • + +
      +
    • +
    +This is how you create a vector from a list of its components. +
      +
    • + +
      +
    • +
    +Indexing for vectors begins at 1. The last element has index equal to +the length of the vector, which is computed by +#. +
      +
    • + +
      +
    • +
    +This is the standard way to use elt to extract +an element. +
      +
    • + +
      +
    • +
    +This is the standard way to use setelt to change an element. It is the +same as if you had typed setelt(v,3,99). +
      +
    • + +
      +
    • +
    +Now look at v to see the change. You can use +qelt and +qsetelt! (instead of +elt and +setelt, respectively) but only when you +know that the indexis within the valid range. +
      +
    • + +
      +
    • +
    +When the components belong to a +Ring, +Axiom provides arithmetic operations for +Vector. These include left and right +scalar multiplication. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    +Addition and subtraction are also available +
      +
    • + +
      +
    • +
    +Of course, when adding or subtracting, the two vectors must have the +same length or an error message is displayed. +
      +
    • + +
      +
    • +
    +For more information about other aggregate domains, see +List, +Matrix, +OneDimensionalArray. +Set, +Table, and +TwoDimensionalArray. +Issue the system command +
      +
    • + +
      +
    • +
    +to display the full list of operations defined by +Vector. +<> +@ + +\subsection{lin1darrays.xhtml} +<>= +<> + + +<> + lin1darrays not implemented +<> +@ + +\subsection{lin2darrays.xhtml} +<>= +<> + + +<> + lin2darrays not implemented +<> +@ + +%%M +\subsection{man0page.xhtml} +<>= +<> + + +<> +Enter search string (use * for wild card unless counter-indicated): +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + +
    + + Constructors + + + Search for + + categories + , + + domains + , + or + + packages + +
    + + Operations + + Search for operations.
    + + Attributes + + Search for attributes.
    + + General + + Search for all three of the above.
    + + Documentation + + Search library documentation. +
    + + Complete + + All of the above. +
    + + Selectable + + Detailed search with selectable options. +
    + + Reference + + Search Reference documentation (* wild card is not accepted). +
    + + Commands + + View system command documentation. +
    +<> +@ + +%%N +\subsection{numberspage.xhtml} +<>= +<> + + +<> +The following types of numbers are among those available in Axiom + + + + + + + + + + + + + + + + + + + + + + + + + +
    + Integers + + Arithmetic with arbitrarily large integers +
    + Fractions + + Rational numbers and general fractions +
    + Machine Floats + + Fixed precision machine floating point +
    + Real Numbers + + Arbitrary precision decimal arithmetic +
    + Complex Numbers + + Complex numbers in general +
    + Finite Fields + + Arithmetic in characteristic p +
    +
    +Addtional topics + +<> +@ + +\subsection{numcardinalnumbers.xhtml} +<>= +<> + + + +<> +
    Cardinal Numbers
    +
    +The CardinalNumber can be used for +values indicating the cardinality of sets, both finite and infinite. For +example, the dimension operation in the +category VectorSpace returns a cardinal +number. + +The non-negative integers have a natural construction as cardinals +
    +0=#{ }, 1={0}, 2={0,1}, ..., n={i | 0 <= i < n}
    +
    +The fact that 0 acts as a zero for the multiplication of cardinals is +equivalent to the axiom of choice. + +Cardinal numbers can be created by conversion from non-negative integers. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    +The can also be obtained as the named cardinal Aleph(n) +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    +The finite? operation tests whether a value +is a finite cardinal, that is, a non-negative integer. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    +Similarly, the countable? operation +determines whether a value is a countable cardinal, that is, finite or +Aleph(0). +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    +Arithmetic operations are defined on cardinal numbers as follows: + + + + + + + + + + + + + + + + + +
    + x+y = #(X+Y) + + cardinality of the disjoint union +
    + x-y = #(X-Y) + + cardinality of the relative complement +
    + x*y = #(X*Y) + + cardinality of the Cartesian product +
    + x+*y = #(X**Y) + + cardinality of the set of maps from Y to X +
    +Here are some arithmetic examples: +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    +Subtraction is a partial operation; it is not defined when subtracting +a larger cardinal from a smaller one, nor when subtracting two equal +infinite cardinals. +
      +
    • + +
      +
    • +
    +The generalized continuum hypothesis asserts that +
    + 2**Aleph i = Aleph(i+1)
    +
    +and is independent of the axioms of set theory. (Goedel, The consistency +of the continuum hypothesis, Ann. Math. Studies, Princeton Univ. Press, +1940) The CardinalNumber domain +provides an operation to assert whether the hypothesis is to be assumed. +
      +
    • + +
      +
    • +
    +When the generalized continuum hypothesis is assumed, exponentiation to +a transfinite power is allowed. +
      +
    • + +
      +
    • +
    +Three commonly encountered cardinal numbers are +
    +  a = #Z                 countable infinity
    +  c = #R                 the continuum
    +  f = #{g|g: [0,1]->R}
    +
    +In this domain, these values are obtained under the generalized continuum +hypothesis in this way: +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    +<> +@ + +\subsection{numcomplexnumbers.xhtml} +<>= +<> + + + +<> +
    Complex Numbers
    +
    +The Complex constructor implements +complex objects over a commutative ring R. Typically, the ring R is +Integer, +Fraction Integer, +Float, +DoubleFloat, +R can also be a symbolic type, like +Polynomial Integer. +For more information about the numerical and graphical aspects of +complex numbers, see +Numeric Functions +in section 8.1. + +Complex objects are created by the +complex operation +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    +The standard arithmetic operations are available. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    +If R is a field, you can also divide the complex objects. +
      +
    • + +
      +
    • +
    +Use a conversion +(see Conversion in +section 2.7) to view the last object as a fraction of complex +integers. +
      +
    • + +
      +
    • +
    +The predefined macro %i is defined to be complex(0,1). +
      +
    • + +
      +
    • +
    +You can also compute the +conjugate and +norm of a complex number. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    +The real and +imag operations are provided to +extract the real and imaginary parts, respectively. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    +The domain +Complex Integer +is also called the Gaussian integers. If R is the integers (or, more +generally, a +Euclidean Domain), +you can compute greatest common divisors. +
      +
    • + +
      +
    • +
    +You can also compute least common multiples +
      +
    • + +
      +
    • +
    +You can factor Gaussian integers. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    +<> +@ + +\subsection{numcontinuedfractions.xhtml} +<>= +<> + + + +<> +
    Continued Fractions
    +
    +Continued fractions have been a fascinating and useful tool in mathematics +for well over three hundred years. Axiom implements continued fractions +for fractions of any Euclidean domain. In practice, this usually means +rational numbers. In this section we demonstrate some of the operations +available for manipulating both finite and infinite continued fractions. +It may be helpful if you review +Stream to remind yourself of some of the +operations with streams. + +The ContinuedFraction domain is a +field and therefore you can add, subtract, multiply, and divide the +fractions. The +continuedFraction operation +converts its fractional argument to a continued fraction. +
      +
    • + +
      +
    • +
    +This display is the compact form of the bulkier +
    +  3 +             1
    +     ---------------------------
    +     7 +            1
    +         -----------------------
    +         15 +         1
    +              ------------------
    +              1 +        1
    +                  --------------
    +                  25 +     1
    +                       ---------
    +                       1 +   1
    +                           -----
    +                           7 + 1
    +                               -
    +                               4
    +
    +You can write any rational number in a similar form. The fraction will +be finite and you can always take the "numerators" to be 1. That is, any +rational number can be written as a simple, finite continued fraction of +the form +
    +a(1) +            1
    +     ---------------------------
    +  a(2) +            1
    +         -----------------------
    +       a(3) +         1
    +                        .
    +                         .
    +                          .
    +                           1
    +
    +              -----------------
    +              a(n-1) +     1
    +                       ---------
    +                          a(n)
    +
    +The a(i) are called partial quotients and the operation +partialQuotients creates a +stream of them. +
      +
    • + +
      +
    • +
    +By considering more and more of the fraction, you get the +convergents. For example, the +first convergent is a(1), the second is a(1)+1/a(2) and so on. +
      +
    • + +
      +
    • +
    +Since this ia a finite continued fraction, the last convergent is the +original rational number, in reduced form. The result of +approximants is always an infinite +stream, though it may just repeat the "last" value. +
      +
    • + +
      +
    • +
    +Inverting c only changes the partial quotients of its fraction by +inserting a 0 at the beginning of the list. +
      +
    • + +
      +
    • +
    +Do this to recover the original continued fraction from this list of +partial quotients. The three argument form of the +continuedFraction operation takes +an element which is the whole part of the fraction, a stream of elements +which are the denominators of the fraction. +
      +
    • + +
      +
    • +
    +The streams need not be finite for +continuedFraction. Can you guess +which irrational number has the following continued fraction? See the end +of this section for the answer. +
      +
    • + +
      +
    • +
    +In 1737 Euler discovered the infinite continued fraction expansion +
    + e - 1                 1
    + ----- =  ---------------------------
    +p          2 +            1
    +              -----------------------
    +              6  +         1
    +                   ------------------
    +                  10 +        1
    +                       --------------
    +                       14 +  ... 
    +
    +We use this expansion to compute rational and floating point +approximations of e. (For this and other interesting expansions, +see C. D. Olds, Continued Fractions, New Mathematical Library, +Random House, New York, 1963 pp.134-139). + +By looking at the above expansion, we see that the whole part is 0 +and the numerators are all equal to 1. This constructs the stream of +denominators. +
      +
    • + +
      +
    • +
    +Therefore this is the continued fraction expansion for (e-1)/2. +
      +
    • + +
      +
    • +
    +These are the rational number convergents. +
      +
    • + +
      +
    • +
    +You can get rational convergents for e by multiplying by 2 and adding 1. +
      +
    • + +
      +
    • +
    +You can also compute the floating point approximations to these convergents. +
      +
    • + +
      +
    • +
    +Compare this to the value of e computed by the +exp operation in +Float. +
      +
    • + +
      +
    • +
    +In about 1658, Lord Brouncker established the following expansion for 4/pi. +
    +  1 +             1
    +     ---------------------------
    +     2 +            9
    +         -----------------------
    +         2  +         25
    +              ------------------
    +              2 +        49
    +                  --------------
    +                  2  +     81
    +                       ---------
    +                       2 +   ...
    +
    +Let's use this expansion to compute rational and floating point +approximations for pi. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    +As you can see, the values are converging to +
    +  pi = 3.14159265358979323846..., but not very quickly.
    +
    +
      +
    • + +
      +
    • +
    +You need not restrict yourself to continued fractions of integers. Here is +an expansion for a quotient of Gaussian integers. +
      +
    • + +
      +
    • +
    +This is an expansion for a quotient of polynomials in one variable with +rational number coefficients. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    +To conclude this section, we give you evidence that +
    +  z =  3 +             1
    +          ---------------------------
    +          3 +            1
    +              -----------------------
    +              6 +          1
    +                  -------------------
    +                   3 +        1
    +                       --------------
    +                       6  +     1
    +                            ---------
    +                            3 + ...
    +
    +is the expansion of the square root of 11. +
      +
    • + +
      +
    • +
    +<> +@ + +\subsection{numexamples.xhtml} +<>= +<> + + +<> + numexamples not implemented +<> +@ + +\subsection{numfactorization.xhtml} +<>= +<> + + +<> + numfactorization not implemented +<> +@ + +\subsection{numfinitefields.xhtml} +<>= +<> + + +<> +
    Finite Fields
    +
    +A finite field (also called a Galois field) is a finite +algebraic structure where on can add, multiply, and divide under the same +laws (for example, commutativity, associativity, or distributivity) as +apply to the rational, real, or complex numbers. Unlike those three fields, +for any finite field there exists a positive prime integer p, called the +characteristic, such that p*x=0 for +any element x in the finite field. In fact, the number of elements in a +finite filed is a power of the characteristic and for each prime p and +positive integer n there exists exactly one finite field with p**n elements, +up to an isomorphism. (For more information about the algebraic structure and +properties of finite fields, see for example, S. Lang Algebr, +Second Edition, New York, Addison-Wesley Publishing Company, Inc. 1984, +ISBN 0 201 05476 6; or R. Lidl, H. Niederreiter, Finite Fields, +Encyclopedia of Mathematics and Its Applications, Vol. 20, Cambridge. +Cambridge Univ. Press, 1983, ISBN 0 521 30240 4) + +When n=1, the field has p elements and is called a prime field, +discussed in + +Modular Arithmetic and Prime Fields +in section 8.11.1. There are several ways of implementing extensions of +finite fields, and Axiom provides quite a bit of freedom to allow you to +choose the one that is best for your application. Moreover, we provide +operations for converting among the different representations of extensions +and different extensions of a single field. Finally, note that you usually +need to package call operations from finite fields if the operations do not +take as an argument an object of the field. See +Package Calling and Target Types +in section 2.9 for more information on package calling. + +<> +@ + +\subsection{numfloat.xhtml} +<>= +<> + + +<> +
    Real Numbers
    +
    +Axiom provides two kinds of floating point numbers. The domain +Float +(abbreviation FLOAT) +implements a model of arbitrary precisions floating point numbers. The +domain +DoubleFloat +(abbreviation DFLOAT) +is intended to make available hardware floating point arithmetic in Axiom. +The actual model of floating point +DoubleFloat that Axiom +provides is system dependent. For example, on the IBM System 370, Axiom +uses IBM double precision which has fourteen hexadecimal digits of +precision or roughly sixteen decimal digits. Arbitrary precision floats +allow the user to specify the precision at which arithmetic operations +are computed. Although this is an attractive facility, it comes at a cost. +Arbitrary precision floating point arithmetic typically takes twenty to +two hundred times more time than hardware floating point. + +For more information about Axiom's numeric and graphic facilities +see Graphics in section 7, +Numeric Functions +in section 8.1, and DoubleFloat + +<> +@ + +\subsection{numfractions.xhtml} +<>= +<> + + + +<> +
    Fractions
    +
    +Axiom handles fractions in many different contexts and will +automatically simplify fractions whenever possible. Here are +some examples: +
      +
    • +
      +
    • +
    • +
      +
    • +
    • +
      +
    • +
    • +
      +
    • +
    +
    +Additional Topics: + + + + + + + + + +
    + Rational Numbers + + Quotients of integers +
    + Quotient Fields + + Quotients over an arbitrary integral domain +
    +<> +@ + +\subsection{numfunctions.xhtml} +<>= +<> + + +<> + numfunctions not implemented +<> +@ + +\subsection{numgeneralinfo.xhtml} +<>= +<> + + +<> + numgeneralinfo not implemented +<> +@ + +\subsection{numintegers.xhtml} +<>= +<> + + + +<> +
    Integers
    +
    +In Axiom, integers can be as large as you like. Try the following +examples. +
      +
    • +
      +
    • +
    • +
      +
    • +
    +Of course, you can now do arithmetic as usual on these (very) large +integers: +
      +
    • +
      +
    • +
    • +
      +
    • +
    • +
      +
    • +
    +Axiom can factor integers, but numbers with small prime factors +
      +
    • +
      +
    • +
    +will factor more rapidly than numbers with large prime factors. +
      +
    • +
      +
    • +
    +
    +Additional topics + + + + + + + + + + + + + + + + + + + + + +
    + General Info + + General information and examples of integers +
    + Factorization + + Primes and factorization +
    + Functions + + Number theoretic functions +
    + Functions + + Examples from number theory +
    + Problems + + Problems from number theory +
    +<> +@ + +\subsection{nummachinefloats.xhtml} +<>= +<> + + + +<> +
    Machine Floats
    +
    +Axiom provides two kinds of floating point numbers. The domain +Float +(abbreviation FLOAT) +implements a model of arbitrary precisions floating point numbers. The +domain +DoubleFloat +(abbreviation DFLOAT) +is intended to make available hardware floating point arithmetic in Axiom. +The actual model of floating point +DoubleFloat that Axiom +provides is system dependent. For example, on the IBM System 370, Axiom +uses IBM double precision which has fourteen hexadecimal digits of +precision or roughly sixteen decimal digits. Arbitrary precision floats +allow the user to specify the precision at which arithmetic operations +are computed. Although this is an attractive facility, it comes at a cost. +Arbitrary precision floating point arithmetic typically takes twenty to +two hundred times more time than hardware floating point. + +By default, floating point numbers that you enter into Axiom are of type +Float. +
      +
    • + +
      +
    • +
    +You must therefore tell Axiom that you want to use +DoubleFloat values and operations. The +following are some conservative guidelines for getting Axiom to use +DoubleFloat. + +To get a value of type DoubleFloat., +use a target with + "@", ... +
      +
    • + +
      +
    • +
    +a conversion,... +
      +
    • + +
      +
    • +
    +or an assignment to a declared variable. It is more efficient if you +use a target rather than an explicit or implicit conversion. +
      +
    • + +
      +
    • +
    +You also need to declare functions that work with +DoubleFloat. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    +Use package calling for operations from +DoubleFloat +unless the arguments themselves are already of type +DoubleFloat. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    +By far, the most common usage of +DoubleFloat +is for functions to be graphied. For more information about Axiom's +numerical and graphical facilities, see +Graphics +in section 7, +Numeric Functions +in section 8.1, and +Float + +The usual arithmetic and elementary functions are available for +DoubleFloat. Use +
      +
    • + +
      +
    • +
    +to get a list of operations. +<> +@ + +\subsection{nummachinesizedintegers.xhtml} +<>= +<> + + + +<> +
    Machine-sized Integers
    +
    +The SingleInteger is intended to +provide support in Axiom for machine integer arithmetic. It is generally +much faster than (bignum) Integer arithmetic +but suffers from a limited range of values. Since Axiom can be implemented +on top of various dialects of Lisp, the actual representation of small +integers may not correspond exactly to the host machines integer +representation. + +You can discover the minimum and maximum values in your implementation by +using min and max +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    +To avoid confusion with Integer, which is +the default type for integers, you usually need to work with declared +variables (see Declarations). +
      +
    • + +
      +
    • +
    +or use package calling (see +Package Calling and Target Types). +
      +
    • + +
      +
    • +
    +You can add, multiply, and subtract +SingleInteger objects, and ask for the +greatest common divisor +(gcd). +
      +
    • + +
      +
    • +
    +The least common multiple +(lcm) is also available. +
      +
    • + +
      +
    • +
    +Operations +mulmod, +addmod, +submod, and +invmod +are similar -- they provide arithmetic modulo a given small integer. +Here is 5*6 mod 13. +
      +
    • + +
      +
    • +
    +To reduce a small integer modulo a prime, use +positiveRemainder +
      +
    • + +
      +
    • +
    +Operations And, +Or, +xor, +and Not +provide bit level operations on small integers. +
      +
    • + +
      +
    • +
    +Use shift(int,numToShift) to shift bits, where int is shifted left if +numToShift is positive, right if negative. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    +Many other operations are available for small integers, including many of +those provided for Integer. +To see other operations use the system command +
      +
    • + +
      +
    • +
    +<> +@ + +\subsection{numnumericfunctions.xhtml} +<>= +<> + + +<> +
    Numeric Functions
    +
    +Axiom provides two basic floating point types: +Float and +DoubleFloat. This section +describes how to use numerical operations defined on these types and +the related complex types. As we mentioned in +An Overview of Axiom +in chapter 1., the +Float type is a software implementation of +floating point numbers in which the exponent and the significand may have +any number of digits. See +Float for detailed information about this +domain. The +DoubleFloat is usually a hardware +implementation of floating point numbers, corresponding to machine double +precision. The types +Complex Float and +Complex DoubleFloat are the +corresponding software implementations of complex floating point numbers. +In this section the term floating point type means any of these four +types. The floating point types immplement the basic elementary functions. +These include (where $ means +DoubleFloat, +Float, +Complex Float, +Complex DoubleFloat):
    +exp, +log: $ -> $
    +sin, +cos, +tan, +cot, +sec, +csc: $ -> $
    +asin, +acos, +atan, +acot, +asec, +acsc: $ -> $
    +sinh, +cosh, +tanh, +coth, +sech, +csch: $ -> $
    +asinh, +acosh, +atanh, +acoth, +asech, +acsch: $ -> $
    +pi: () -> $
    +sqrt: $ -> $
    +nthRoot: ($,Integer) -> $
    +**: ($,Fraction Integer) -> $
    +**: ($,$) -> $
    +The handling of roots depends on whether the floating point type is +real or complex: for the real floating point types, +DoubleFloat and +Float, if a real root exists the one with +the same sign as the radicand is returned; for the complex floating +point types, the principal value is returned. Also, for real floating +point types the inverse functions produce errors if the results are not +real. This includes cases such as asin(1.2), log(-3.2), sqrt(-1,1). +The default floating point type is Float +or Complex Float, just use normal +decimal notation. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    +To evaluate functions using +DoubleFloat or +Complex DoubleFloat, a +declaration or conversion is required. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    +A number of special functions are provided by the package +DoubleFloatSpecialFunctions +for the machine precision floating point types. The special functions +provided are listed below, where F stands for the types +Float +or Complex Float. The real versions +of the functions yield an error if the result is not real. +
      +
    • + Gamma: F -> F
      + Gamma(z) is the Euler gamma + function, Gamma(Z), defined by
      + Gamma(z) = integrate(t^(z-1)*exp(-t),t=0..%infinity) +
    • +
    • + Beta: F -> F
      + Beta(u,v) is the Euler Beta + function B(u,v), defined by
      + Beta(u,v)=integrate(t^(u-1)*(1-t)^(b-1),t=0..1)
      + This is related to Gamma(z) by
      + Beta(u,v)=Gamma(u)*Gamma(v)/Gamma(u+v) +
    • +
    • + logGamma: F -> F
      + logGamma(z) is the natural logarithm of Gamma(z). This can often be + computed even if Gamma(z) cannot. +
    • +
    • + digamma: F -> F
      + digamma(z), also called psi(z), is the function psi(z), defined by
      + psi(z)=Gamma'(z)/Gamma(z) +
    • +
    • + polygamma: (NonNegativeInteger, F) -> F
      + polygamma(n,z) is the n-th derivative of digamma(z) +
    • +
    • + besselJ: (F, F) -> F
      + besselJ(v,z) is the Bessel function of the first kind, J(v,z). This + function satisfies the differential equation
      + z^(2w)''(z)+zw'(z)+(z^2-v^2)w(z)=0 +
    • +
    • + besselY: (F, F) -> F
      + besselY(v,z) is the Bessel function of the second kind, Y(v,z). This + function satisfies the same differential equation as + besselJ. The implementation simply + uses the relation
      + Y(v,z)=(J(v,z)cos(v*%pi)-J(-v,z))/sin(v*%pi) +
    • +
    • + besselI: (F, F) -> F
      + besselI(v,z) if the modifed Bessel function of the first kind, I(v,z). + This function satisfies the differential equation
      + z^2w''(z)+zw'(z)-(z^2+v^2)w(z)=0 +
    • +
    • + besselK: (F, F) -> F
      + besselK(v,z) is the modifed Bessel function of the second kind, K(v,z). + This function satisfies the same differential equation as + besselI. The implementation simply uses + the relation
      + K(v,z)=%pi*(I(v,z)-I(-v,z))/(2sin(v*%pi)) +
    • +
    • + airyAi: F -> F
      + airyAi(z) is the Airy function Ai(z). This function satisfies the + differential equation
      + w''(z)-zw(z)=0
      + The implementation simply uses the relation
      + Ai(-z)=1/3*sqrt(z)*(J(-1/3,2/3*z^(3/2))+J(1/3,2/3*z^(3/2))) +
    • +
    • + airyBi: F -> F
      + airyBi(z) is the Airy function Bi(z). This function satisfies the + same differential equation as airyAi. + The implementation simply uses the relation
      + Bi(-z)=1/3*sqrt(3*z)*(J(-1/3,2/3*z^(3/2))-J(1/3,2/3*z^(3/2))) +
    • +
    • + hypergeometric0F1: (F, F) -> F
      + hypergeometric0F1(c,z) is the hypergeometric function 0F1(;c;z). The above + special functions are defined only for small floating point types. If you + give Float arguments, they are converted to + DoubleFloat by Axiom. +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    +<> +@ + +\subsection{numoctonions.xhtml} +<>= +<> + + + +<> +
    Octonions
    +
    +The Octonions, also called the Cayley-Dixon algebra, defined over a +commutative ring are an eight-dimensional non-associative algebra. Their +construction from quaternions is similar to the construction of quaternions +from complex numbers (see Quaternion). +As Octonion creates an eight-dimensional +algebra, you have to give eight components to construct an octonion. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    +Or you can use two quaternions to create an octonion. +
      +
    • + +
      +
    • +
    +You can easily demonstrate the non-associativity of multiplication. +
      +
    • + +
      +
    • +
    +As with the quaternions, we have a real part, the imaginary parts i, j, +k, and four additional imaginary parts E, I, J, and K. These parts +correspond to the canonical basis (1,i,j,k,E,I,J,K). For each basis +element there is a component operation to extract the coefficient of +the basis element for a given octonion. +
      +
    • + +
      +
    • +
    +A basis with respect to the quaternions is given by (1,E). However, you +might ask, what then are the commuting rules? To answer this, we create +some generic elements. We do this in Axim by simply changing the ground +ring from +Integer to +Polynomial Integer. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    +Note that quaternions are automatically converted to octonions in the +obvious way. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    +Finally, we check that the norm, defined as +the sum of the squares of the coefficients, is a multiplicative map. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    +Since the result is 0, the norm is multiplicative +
      +
    • + +
      +
    • +
    +Issue the system command +
      +
    • + +
      +
    • +
    +to display the list of operations defined by +Octonion. +<> +@ + +\subsection{numotherbases.xhtml} +<>= +<> + + + +<> +
    Expansions in other Bases
    +
    +It is possible to expand numbers in general bases. Here we expand +111 in base 5. This means +
    +    2   1   0      2    1  -
    +  10 +10 +10  = 4*5 +2*5 +5
    +
    +
      +
    • + +
      +
    • +
    +You can expand fractions to form repeating expansions. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    +For bases from 11 to 36 the letters A through Z are used. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    +For bases greater than 36, the ragits are separated by blanks. +
      +
    • + +
      +
    • +
    +The RadixExpansion type provides +operations to obtain the individual ragits. Here is a rational number +in base 8. +
      +
    • + +
      +
    • +
    +The operation wholeRagits returns +a list of the ragits for the integral part of the number. +
      +
    • + +
      +
    • +
    +The operations prefixRagits and +cycleRagits returns lists of the +initial and repeating ragist in the fractional part of the number. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    +You can construct any radix expansion by giving the whole, prefix, and +cycle parts. The declaration is necessary to let Axiom know the base +of the ragits. +
      +
    • + +
      +
    • +
    +If there is no repeating part, then the list [0] should be used. +
      +
    • + +
      +
    • +
    +If you are not interested in the repeating nature of the expansion, +an infinite stream of ragits can be obtained using +fractRagits +
      +
    • + +
      +
    • +
    +Of course, it's possible to recover the fraction representation:n +
      +
    • + +
      +
    • +
    +Issue the system command +
      +
    • + +
      +
    • +
    +to display the full list of operations defined by +RadixExpansion. More examples of +expansions are available in +DecimalExpansion, +BinaryExpansion, and +HexadecimalExpansion +<> +@ + +\subsection{numpartialfractions.xhtml} +<>= +<> + + + +<> +
    Partial Fractions
    +
    +A partial fraction is a decomposition of a quotient into a sum of quotients +where the denominators of the summand are powers of primes. (Most people +first encounter partial fractions when they are learning integral calculus. +For a technical discussion of partial fractions see, for example, Lang's +Algebra.) For example, the rational number 1/6 is decomposed into 1/2-1/3. +You can compute partial fractions of quotients of objects from domains +belonging to the category +EuclideanDomain. For example, +Integer, +Complex Integer, and + +UnivariatePolynomial(x,Fraction Integer) +all belong to +EuclideanDomain. +In the examples following, we demonstrate how to decompose quotients of +each of these kinds of objects into partial fractions. + +It is necessary that we know how to factor the denominator when we want to +compute a partial fraction. Although the interpreter can often do this +automatically, it may be necessary for you to include a call to +factor. In these examples, it is not +necessary to factor the denominators explicitly. The main operation for +computing partial fractions is called +partialFraction and we use this +to compute a decomposition of 1/10!. The first argument top +partialFraction is the numerator +of the quotient and the second argument is the factored denominator. +
      +
    • + +
      +
    • +
    +Since the denominators are powers of primes, it may be possible to expand +the numerators further with respect to those primes. Use the operation +padicFraction to do this. +
      +
    • + +
      +
    • +
    +The operation compactFraction +returns an expanded fraction into the usual form. The compacted version +is used internally for computational efficiency. +
      +
    • + +
      +
    • +
    +You can add, subtract, multiply, and divide partial fractions. In addition, +you can extract the parts of the decomposition. +numberOfFractionalTerms +computes the number of terms in the fractional part. This does not include +the whole part of the fraction, which you get by calling +wholePart. In this example, the whole part +is 0. +
      +
    • + +
      +
    • +
    +The operation +nthFractionalTerm +returns the individual terms in the decomposition. Notice that the object +returned is a partial fraction itself. +firstNumer and +firstDenom extract the numerator and +denominator of the first term of the fraction. +
      +
    • + +
      +
    • +
    +Given two gaussian integers (see Complex), +you can decompose their quotient into a partial fraction. +
      +
    • + +
      +
    • +
    +To convert back to a quotient, simply use the conversion +
      +
    • + +
      +
    • +
    +To conclude this section, we compute the decomposition of +
    +                   1
    +     -------------------------------
    +                   2       3       4
    +     (x + 1)(x + 2) (a + 3) (x + 4)
    +
    +The polynomials in this object have type + +UnivariatePolynomial(x,Fraction Integer). +We use the primeFactor operation +(see Factored) to create the denominator +in factored form directly. +
      +
    • + +
      +
    • +
    +These are the compact and expanded partial fractions for the quotient. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    +Also see + +FullPartialFractionExpansion for examples of factor-free conversion of +quotients to full partial fractions. + +Issue the system +command +
      +
    • + +
      +
    • +
    +to display the full list of operations defined by +PartialFraction. + +<> +@ + +\subsection{numproblems.xhtml} +<>= +<> + + +<> + numproblems not implemented +<> +@ + +\subsection{numquaternions.xhtml} +<>= +<> + + + +<> +
    Quaternions
    +
    +The domain contructor Quaternion +implements quaternions over commutative rings. + +The basic operation for creating quaternions is +quatern. This is a quaternion +over the rational numbers. +
      +
    • + +
      +
    • +
    +The four arguments are the real part, the i imaginary part, +the j imaginary part, and the k imaginary part, respectively. +
      +
    • + +
      +
    • +
    +Because q is over the rationals (and nonzero), you can invert it. +
      +
    • + +
      +
    • +
    +The usual arithmetic (ring) operations are available. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    +In general, multiplication is not commutative. +
      +
    • + +
      +
    • +
    +There are no predefined constants for the imaginary i, j, and k parts, +but you can easily define them +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    +These satisfy the normal identities. +
      +
    • + +
      +
    • +
    +The norm is the quaternion times its conjugate. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    +For information on +related topics, see Complex and +Octonion. You can also issue the +system command +
      +
    • + +
      +
    • +
    +to display the full list of operations defined by +Quaternion. +<> +@ + +\subsection{numquotientfields.xhtml} +<>= +<> + + +<> + numquotientfields not implemented +<> +@ + +\subsection{numrationalnumbers.xhtml} +<>= +<> + + +<> + numrationalnumbers not implemented +<> +@ + +\subsection{numrepeatingbinaryexpansions.xhtml} +<>= +<> + + + +<> +
    Repeating Binary Expansions
    +
    +All rational numbers have repeating binary expansions. Operations to +access the individual bits of a binary expansion can be obtained by +converting the value to +RadixExpansion(2). More examples +of expansions are available in +DecimalExpansion, +HexadecimalExpansion, and +RadixExpansion. + +The expansion (of type +BinaryExpansion) +of a rational number is returned by the +binary operation. +
      +
    • + +
      +
    • +
    +Arithmetic is exact. +
      +
    • + +
      +
    • +
    +The period of the expansion can be short or long... +
      +
    • + +
      +
    • +
    +or very long +
      +
    • + +
      +
    • +
    +These numbers are bona fide algebraic objects. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    +<> +@ + +\subsection{numrepeatingdecimals.xhtml} +<>= +<> + + + +<> +
    Repeating Decimals
    +
    +All rationals have repeating decimal expansions. Operations to access +the individual digits of a decimal expansion can be obtained by converting +the value to RadixExpansion(10). + +The operation decimal is used to create +this expansion of type +DecimalExpansion. +
      +
    • + +
      +
    • +
    +Arithmetic is exact. +
      +
    • + +
      +
    • +
    +The period of the expansion can be short or long... +
      +
    • + +
      +
    • +
    +or very long +
      +
    • + +
      +
    • +
    +These numbers are bona fide algebraic objects. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    +More examples of expansions are available in +BinaryExpansion, +HexadecimalExpansion, and +RadixExpansion. Issue the system +command +
      +
    • + +
      +
    • +
    +to display the full list of operations defined by +RadixExpansion. +<> +@ + +\subsection{numrepeatinghexexpansions.xhtml} +<>= +<> + + + +<> +
    Repeating Hexadecimal Expansions
    +
    +All rationals have repeating hexadecimals expansions. The operation +hex returns these expansions of type +HexadecimalExpansion. +Operations to access the individual numerals of a hexadecimal expansion +can be obtained by converting the value to +RadixExpansion(16). More examples of +expansions are available in +DecimalExpansion, +BinaryExpansion, and +RadixExpansion. + +This is a hexadecimal expansion of a rational number. +
      +
    • + +
      +
    • +
    +Arithmetic is exact. +
      +
    • + +
      +
    • +
    +The period of the expansion can be short or long... +
      +
    • + +
      +
    • +
    +or very long. +.
      +
    • + +
      +
    • +
    +These numbers are bona fide algebraic objects. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    +Issue the system command +
      +
    • + +
      +
    • +
    +to display the full list of operations defined by +HexadecimalExpansion. + +<> +@ + +\subsection{numromannumerals.xhtml} +<>= +<> + + + +<> +
    Roman Numerals
    +
    +The Roman numeral package was added to Axiom in MCMLXXXVI for use in +denoting higher order derivatives. + +For example, let f be a symbolic operator. +
      +
    • + +
      +
    • +
    +This is the seventh derivative of f with respect to x +
      +
    • + +
      +
    • +
    +You can have integers printed as Roman numerals by declaring variables +to be of type +RomanNumeral +(abbreviation ROMAN). +
      +
    • + +
      +
    • +
    +This package now has a small but devoted group of followers that claim +this domain has shown its efficacy in many other contexts. They claim +that Roman numerals are every bit as useful as ordinary integers. +In a sense, they are correct, because Roman numerals form a ring and +you can therefore construct polynomials with Roman numeral +coefficients, matrices over Roman numerals,etc.. +
      +
    • + +
      +
    • +
    +Was Fibonacci Italian or ROMAN? +
      +
    • + +
      +
    • +
    +You can also construct fractions with Roman numeral numerators and +denominators, as this matrix Hilberticus illustrates. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    +Note that the inverse of the matrix has integral +ROMAN entries. +
      +
    • + +
      +
    • +
    +Unfortunately, the spoil-sports say that the fun stops when the +numbers get big -- mostly because the Romans didn't establish +conventions about representing very large numbers. +
      +
    • + +
      +
    • +
    +You work it out! +
      +
    • + +
      +
    • +
    +Issue the system command +
      +
    • + +
      +
    • +
    +to display the full list of operations defined by +RomanNumeral). +<> +@ + +%%O +\subsection{ocwmit18085.xhtml} +<>= +<> + + +<> +18.085 Mathematical Methods for Engineers I Course Notes +
    +These are course notes based on the + + M.I.T. Open Courseware lectures by Gilbert Strang. + + +<> +@ + +\subsection{ocwmit18085lecture1.xhtml} +<>= +<> + + +<> + Positive Definite Matrices K=A'CA +
    +In applied mathematics we have 2 basic tasks: +
      +
    • Find the equations
    • +
    • Solve the equations
    • +
    +

    Positive Definite Matrices

    +Certain matrices occur frequently in applied math. These three +matrices (K,T,and M) are canonical examples. +We have 3 3x3 matrices, +
    +K:Matrix(Integer):=[[2,-1,0],[-1,2,-1],[0,-1,2]]
    +
    +        + 2   - 1   0 +
    +        |             |
    +        |- 1   2   - 1|
    +        |             |
    +        + 0   - 1   2 +
    +               Type: Matrix Integer
    +T:Matrix(Integer):=[[1,-1,0],[-1,2,-1],[0,-1,2]]
    +
    +        + 1   - 1   0 +
    +        |             |
    +        |- 1   2   - 1|
    +        |             |
    +        + 0   - 1   2 +
    +               Type: Matrix Integer
    +B:Matrix(Integer):=[[1,-1,0],[-1,2,-1],[0,-1,1]]
    +
    +        + 1   - 1   0 +
    +        |             |
    +        |- 1   2   - 1|
    +        |             |
    +        + 0   - 1   1 +
    +               Type: Matrix Integer
    +
    +These matrices are similar and can be generalized to square matrices +of order N, with n x n elements. All of these matrices have the same +element along the diagonal. T (aka Top) differs from K in the first row. +B (aka Both) differs from K in the first and last row. These represent +different boundary conditions in the problem. + +We can create K(n), T(n) and B(n) with the following commands: +
    +k(n) == 
    + M := diagonalMatrix([2 for i in 1..n]) 
    + for i in 1..n-1 repeat M(i,i+1):=-1 
    + for i in 1..n-1 repeat M(i+1,i):=-1 
    + M::SquareMatrix(n,Fraction(Integer))
    +
    +
    +t(n) == 
    + M:=k(n)
    + N:=M::Matrix(Fraction(Integer)) 
    + qsetelt!(N,1,1,1) 
    + N::SquareMatrix(n,Fraction(Integer))
    +
    +
    +b(n) == 
    + M:=k(n)
    + N:=M::Matrix(Fraction(Integer)) 
    + qsetelt!(N,1,1,1) 
    + qsetelt!(N,n,n,1)
    + N::SquareMatrix(n,Fraction(Integer))
    +
    + +K:=k(n) has a few key properties: +
      +
    • K is symmetric, that is K=K^T
    • +
    • K might be nonsingular, that is, it is invertible
    • +
    • K has a non-zero determinant
    • +
    • K is banded (main diagonal and neighbors)
    • +
    • K is tri-diagonal (main diagonal and nearest neighbors
    • +
    • K is extremely sparse
    • +
    • K has constant diagonals, (shift invariant, time invariant)
    • +
    • K is Toeplitz (constant diagonal, shows up in filters)
    • +
    • K is good for Fourier analysis
    • +
    + +
    The inverse of T
    +If we look at the inverse of the T matrix we see: +
    +T^-1
    +
    +        +3  2  1+
    +        |       |
    +        |2  2  1|
    +        |       |
    +        +1  1  1+
    +               Type: Matrix Fraction Integer
    +
    +Notice that these are all integers because the determinant of +this matrix is 1 +
    +determinant T
    +
    +     1
    +               Type: Fraction Integer
    +
    +
    +We can check that this matrix is the inverse of T. + +When computing the inverse the row pattern [-1 2 -1] is a +``second difference''. The first column of the inverse matrix +is [3 2 1] which is linear. When we take the second difference +of a linear object we should get 0. Thus, +
    +[[-1,2,-1]]::MATRIX(INT)*[[3],[2],[1]]
    +
    +     [0]
    +               Type: Matrix Integer
    +
    +
    +The third column of the T matrix is linear and constant. If we +take the second difference of that we also find it is zero: +
    + [[-1,2,-1]]::MATRIX(INT)*[[1],[1],[1]]
    +
    +    [0]
    +               Type: Matrix Integer
    +
    +and the diagonal element of the unit matrix must be one. So +the second difference of the second column is: +
    + [[-1,2,-1]]::MATRIX(INT)*[[2],[2],[1]]
    +
    +    [1]
    +               Type: Matrix Integer
    +
    +So these simple checks show that we're getting the correct +row and column values for the identity matrix by multiplying +T times its inverse. + +
    +
    The inverse of B
    +If we look for the inverse of the B matrix we can observe +that the rows sum to zero which implies that it is not +invertible. Thus it is singular. + +K and T are positive definite. B is only positive semi-definite. + +If we can find a vector that it takes to zero, that is if we can +solve for x,y,z in: +
    +        + 1   - 1   0 + + x +    + 0 +
    +        |             | |   |    |   |
    +        |- 1   2   - 1| | y | =  | 0 |
    +        |             | |   |    |   |
    +        + 0   - 1   1 + + z +    + 0 +
    +
    +
    +The constant vector [1 1 1] solves this equation. When +the rows sum to zero we are adding each row by a constant +and thus we add each row times the constant one and we +get zeros. If the matrix takes some vector to zero it +cannot have an inverse since if +
    +   B x = 0
    +
    +and x is not zero. If B had an inverse only x=0 would +solve the equation. Since x=1 solves the equation B has +no inverse. The vector x is in the nullspace of B. In +fact any constant vector, e.g. [3 3 3] is in the nullspace. +Thus the nullspace of B is cx for any constant c. + +When doing matrix multiplication one way to think about the +work is to consider the problem by columns. Thus in the +multiplication +
    +        + 1   - 1   0 + + x +    + 0 +
    +        |             | |   |    |   |
    +        |- 1   2   - 1| | y | =  | 0 |
    +        |             | |   |    |   |
    +        + 0   - 1   1 + + z +    + 0 +
    +
    +
    +we can think about this as +
    +x*(first column) + y*(second column) + z*(third column).
    +
    +and for the constant vector [1 1 1] this means that we +just need to sum the columns. + +Alternatively this can be computed by thinking of the +multiplication as +
    + (first row)*(vector)
    + (second row)*(vector)
    + (third row)*(vector)
    +
    + +
    +
    The inverse of K
    +Now we consider the K matrix we see the inverse +
    +K
    +
    +         + 2   - 1   0 +
    +         |             |
    +         |- 1   2   - 1|
    +         |             |
    +         + 0   - 1   2 +
    +               Type: SquareMatrix(3,Fraction Integer)
    +kinv:=K^-1
    +
    +         +3  1  1+
    +         |-  -  -|
    +         |4  2  4|
    +         |       |
    +         |1     1|
    +         |-  1  -|
    +         |2     2|
    +         |       |
    +         |1  1  3|
    +         |-  -  -|
    +         +4  2  4+
    +               Type: SquareMatrix(3,Fraction Integer)
    +
    +We can take the determinant of k +
    +determinant K
    +
    +    4
    +               Type: Fraction Integer
    +
    +Thus there is a constant 1/4 which can be factored out +
    +4*kinv
    +
    +         +3  2  1+
    +         |       |
    +         |2  4  2|
    +         |       |
    +         +1  2  3+
    +               Type: SquareMatrix(3,Fraction Integer)
    +
    +Notice that the inverse is a symmetric matrix but not tri-diagonal. +The inverse is not a sparse matrix so much more computation would +be involved when using the inverse. + +In order to solve the system +
    + K u = f
    +
    +by elimination which implies multiplying and subtracting rows. +
    +       K    u  =  f    ==>   U     u  =    f
    +
    +For the 2x2 case we see: +
    +                             +2  -1+        +  f1  +
    +    +2  -1+  +x+   +f1+      |     |  +x+   |      |
    +    |     |  | | = |  |  ==> |    3|  | | = |   1  |
    +    +-1  2+  +y+   +f2+      |0   -|  +y+   |f2+-f1|
    +                             +    2+        +   2  +
    +
    +
    +
    +By multiplying row1 by 1/2 and adding it to row2 we create an +upper triangular matrix U. Since we chose K(1,1), the number 2 +is called the first pivot. K(2,2), the number 3/2, is called +the second pivot. + +For K 2x2 above is symmetric and invertible (since the pivots +are all non-zero). + +For the K 3x3 case the pivots are 2, 3/2, and 4/3. (The next pivots +would be 5/4, 6/5, etc. for larger matrices). + +For the T 3x3 case the pivots are 1, 1, and 1. + +For the B 3x3 case the third pivot would be zero. + +
    +
    Generalizing the matrix pivot operations
    +For the 2x2 case we see contruct an elimination matrix E which we can use +to pre-multipy by K to give us the upper triangular matrix U +
    +      E     K    =   U
    +
    +In detail we see +
    +
    +    +1  0+            +2  -1+
    +    |    |  +2  -1+   |     |
    +    |1   |  |     | = |    3|
    +    |-  1|  +-1  2+   |0   -|
    +    +2   +            +    2+
    +
    +
    +We wish to rewrite this as +
    +       K = L U 
    +
    + +
    +
    The big 4 solve operations in Linear Algebra
    +
      +
    1. Elimination
    2. +
    3. Gram-Schmidt Orthoginalization
    4. +
    5. Eigenvalues
    6. +
    7. Singular Value Decomposition
    8. +
    +Each of these operations is described by a factorization of K. +Elimination is written +
    +  K = L U
    +
    +where L is lower triangular and U is upper triangular. +Thus we need a matrix L which when multiplied by U gives K. +The required matrix is the inverse of the E matrix above since +
    +
    +1)      E K =     U
    +
    +     -1        -1
    +2)  E   E K = E   U
    +
    +               -1
    +3)      I K = E   U
    +
    +               -1
    +4)  but   L = E
    +
    +5)  so    K = L U
    +
    +Given the matrix operations above we had +
    +      E       K   =   U
    +
    +    +1  0+            +2  -1+
    +    |    |  +2  -1+   |     |
    +    |1   |  |     | = |    3|
    +    |-  1|  +-1  2+   |0   -|
    +    +2   +            +    2+
    +
    +
    +and the inverse of E is the same matrix with a minus sign in +the second row, thus: +
    +        +  1  0+ 
    +   -1   |      | 
    +  E   = |  1   | = L 
    +        |- -  1| 
    +        +  2   + 
    +
    +
    + +
    +
    Making the matrices symmetric
    +We would like to preserve the symmetry property which we can +do with a further decomposition of LU as follows: +
    +      L        U     =     L        D       U'
    +
    +  +  1  0+  +2  -1+    +  1  0+  +2  0+  +1   1+
    +  |      |  |     |    |      |  |    |  |  - -|
    +  |  1   |  |    3|  = |  1   |  |   3|  |    2|
    +  |- -  1|  |0   -|    |- -  1|  |0  -|  |     |
    +  +  2   +  +    2+    +  2   +  +   2+  +0   1+
    +
    +
    +So now we have 3 matrices; L is the lower triangular, +D is symmetric and contains the pivots, and U' is upper triangular and +is the transpose of the lower. So the real form we have is +
    +           T
    +    L  D  L
    +
    +This result will always be symmetric. We can check this by taking +its transpose. If we get the same matrix we must have a symmetric +matrix. So the transpose of +
    +            T  T     TT  T   T        T T        T
    +  (  L  D  L  )   = L   D   L   =  L D L  = L D L
    +
    +
    +
    Positive Definite Matrices
    +There are several ways to recognize a positive definite matrix. +First, it must be symmetric. The "positive" aspect comes from +the pivots, all of which must be positive. Note that T is also +positive definite. B is positive semi-definite because one of +the pivots is zero. So +
    +   positive definite      == all pivots >  0
    +   positive semi-definite == all pivots >= 0
    +
    +When all the pivots are positive then all the eigenvalues are positive. + +So a positive definite matrix K and any non-zero vector X +
    +    T
    +   X  K X  > 0
    +
    +X transpose is just a row and X is just a column. + +<> +@ + +\subsection{ocwmit18085lecture2.xhtml} +<>= +<> + + +<> + One-dimensional Applications: A = Difference Matrix +
    +
    Difference Matrices
    +
    +
    Second Differences
    +
    +
    Stiffness Matrix
    +
    +
    Boundary Conditions
    +<> +@ + +\subsection{operations.xhtml} +<>= +<> + + +<> + operations not implemented +<> +@ + + +%%P +\subsection{pagelist.xhtml} +<>= +<> + + +<> + pagelist not implemented +<> +@ + +\subsection{pagematrix.xhtml} +<>= +<> + + +<> + pagematrix not implemented +<> +@ + +\subsection{pageonedimensionalarray.xhtml} +<>= +<> + + +<> + pageonedimensionalarray not implemented +<> +@ + +\subsection{pageset.xhtml} +<>= +<> + + +<> + pageset not implemented +<> +@ + +\subsection{pagetable.xhtml} +<>= +<> + + +<> + pagetable not implemented +<> +@ + +\subsection{pagepermanent.xhtml} +<>= +<> + + +<> + pagepermanent not implemented +<> +@ + +\subsection{pagesquarematrix.xhtml} +<>= +<> + + +<> + pagesquarematrix not implemented +<> +@ + +\subsection{pagetwodimensionalarray.xhtml} +<>= +<> + + + +<> +
    TwoDimensionalArray
    +
    +The TwoDimensionalArray is used for +storing data in a two-dimensional data structure indexed by row and column. +Such an array is a homogeneous data structure in that all the entries of the +array must belong to the same Axiom domain (although see +The Any Domain). Each array has a fixed +number of rows and columns specified by the user and arrays are not +extensible. In Axiom, the indexing of two-dimensional arrays is one-based. +This means that both the "first" row of an array and the "first" column of +an array are given the index 1. Thus, the entry in the upper left corner +of an array is in position (1,1). + +The operation new creates an array with a +specified number of rows and columns and fills the components of that array +with a specified entry. The arguments of this operation specify the number +of rows, the number of columns, and the entry. This creates a five-by-four +array of integers, all of whose entries are zero. +
      +
    • + +
      +
    • +
    +The entries of this array can be set to other integers using the operation +setelt. + +Issue this to set the element in the upper left corner of this array to 17. +
      +
    • + +
      +
    • +
    +Now the first element of the array is 17. +
      +
    • + +
      +
    • +
    +Likewise, elements of an array are extracted using the operation +elt. +
      +
    • + +
      +
    • +
    +Another way to use these two operations is as follows. This sets the +element in position (3,2) of the array to 15. +
      +
    • + +
      +
    • +
    +This extracts the element in position (3,2) of the array. +
      +
    • + +
      +
    • +
    +The operation elt and +setelt come equipped with an error check +which verifies that the indices are in the proper ranges. For example, +the above array has five rows and four columns, so if you ask for the +entry in position (6,2) with arr(6,2) Axiom displays an error message. +If there is no need for an error check, you can call the operations +qelt and +qsetelt! +which provide the same functionality +but without the error check. Typically, these operations are called in +well-tested programs. + +The operations row and +column extract rows and columns, respectively, +and return objects of +OneDimensionalArray with the +same underlying element type. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    +You can determine the dimensions of an array by calling the operations +nrows and +ncols, which return the number of rows +and columns, respectively. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    +To apply an operation to every element of an array, use +map. This creates a new array. This +expression negates every element. +
      +
    • + +
      +
    • +
    +This creates an array where all the elements are doubled. +
      +
    • + +
      +
    • +
    +To change the array destructively, use +map! instead of +map. +If you need to make a copy of an array, +use copy. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    +Use member? to see if a given element is in +an array. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    +To see how many times an element appears in an array, use +count. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    +For more information about the operations available for +TwoDimensionalArray, issue +
      +
    • + +
      +
    • +
    +For more information on related topics, see +Matrix and +OneDimensionalArray. +<> +@ + +\subsection{pagevector.xhtml} +<>= +<> + + +<> + pagevector not implemented +<> +@ + + +\subsection{polybasicfunctions.xhtml} +<>= +<> + + + +<> +
    Basic Operations on Polynomials
    +
    +You create polynomials using the usual operations of ++, +-, +* +(for multiplication), and +** (or +^. Here are two examples: +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    +These operations can also be used to combine polynomials. Try the following: +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    +As you can see from the above examples, the variables are ordered by defaults +
    +  z > y > x > c > b > a
    +
    +That is, z is the main variable, then y and so on in reverse alphabetical +order. You can redefine this ordering (for display purposes) with the +setVariableOrder. For example, the +following makes a the main variable, then b, and so on: +
      +
    • + +
      +
    • +
    +Now compare the way polynomials are displayed: +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    +To return to the system's default ordering, use +resetVariableOrder. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    +Polynomial coefficients can be pulled out using the function +coefficient. For example: +
      +
    • + +
      +
    • +
    +will give you the coefficient of x**2 in the polynomial q. Try these +commands: +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    +Coefficients of monomials can be obtained as follows: +
      +
    • + +
      +
    • +
    +This will return the coefficient of x**2*z in the polynomial q**2. Also, +
      +
    • + +
      +
    • +
    +will return the coefficient of x**2*y**2 in the polynomial r(x,y). +<> +@ + +\subsection{polyfactorization.xhtml} +<>= +<> + + +<> +
    Polynomial Factorization
    +
    +The Axiom polynomial factorization facilities are available for all +polynomial types and a wide variety of coefficient domains. Here are +some examples. + +<> +@ + +\subsection{polyfactorization1.xhtml} +<>= +<> + + + +<> +
    Integer and Rational Number Coefficients
    +
    +Polynomials with integer coefficients can be factored. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    +Also, Axiom can factor polynomials with rational number coefficients +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    +<> +@ + +\subsection{polyfactorization2.xhtml} +<>= +<> + + + +<> +
    Finite Field Coefficients
    +
    +Polynomials with coefficients in a finite filed can also be factored. +
      +
    • + +
      +
    • +
    +These include the integers mod p, where p is prime, and extensions of these +fields. +
      +
    • + +
      +
    • +
    +Convert this to have coefficients in the finite field with +19**3 elements. See +FiniteFields for more information +about finite fields. +
      +
    • + +
      +
    • +
    +<> +@ + +\subsection{polyfactorization3.xhtml} +<>= +<> + + + +<> +
    Simple Algebraic Extension Field Coefficients
    +
    +Polynomials with coefficients in simple algebraic extensions of the +rational numbers can be factored. + +Here, aa and bb are symbolic roots of polynomials. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    +Note that the second argument to factor can be a list of algebraic +extensions to factor over. +
      +
    • + +
      +
    • +
    +This factors x^2+3 over the integers. +
      +
    • + +
      +
    • +
    +Factor the same polynomial over the field obtained by adjoining aa to the +rational numbers. +
      +
    • + +
      +
    • +
    +Factor x^6+108 over the same field. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    +Factor again over the field obtained by adjoining both aa and bb to the +rational numbers. +
      +
    • + +
      +
    • +
    +<> +@ + +\subsection{polyfactorization4.xhtml} +<>= +<> + + + +<> +
    Factoring Rational Functions
    +
    +Since fractions of polynomials form a field, every element (other than zero) +divides any other, so there is no useful notion of irreducible factors. +Thus the factor operation is not very useful +for fractions of polynomials. + +Instead, there is a specific operation +factorFraction that separately +factors the numerator and denominator and returns a fraction of the +factored results. +
      +
    • + +
      +
    • +
    +You can also use map. This expression applies +the factor operation to the numerator and +denominator. +
      +
    • + +
      +
    • +
    +<> +@ + +\subsection{polygcdandfriends.xhtml} +<>= +<> + + + +<> +
    + Greatest Common Divisors, Resultants, and Discriminants +
    +
    +You can compute the greatest common divisor of two polynomials using the +function gcd. Here's an example: +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    +You could also see that p and q have a factor in common by using the +function resultant: +
      +
    • + +
      +
    • +
    +The resultant of two polynomials vanishes precisely when they have a +factor in common. (In the example above we specified the variable with which +we wanted to compute the resultant because the polynomials could have +involved variables other than x.) +<> +@ + +\subsection{polynomialpage.xhtml} +<>= +<> + + +<> +
    Polynomials
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    + Basic Functions + + Create and manipulate polynomials +
    + Substitutions + + Evaluate Polynomials +
    + Factorization + + Factor in different contexts +
    + GCD and Friends + + Greatest Common Divisors, Resultants, and Discriminants +
    + Roots + + Work with and solve for roots +
    + Specific Types + + More specific information +
    +<> +@ + +\subsection{polyroots.xhtml} +<>= +<> + + +<> +
    Roots of Polynomials
    +
    + + + + + + + + + + + + + + + + + +
    + + Using a Single Root of a Polynomial + + + Working with a single root of a polynomial +
    + + Using All Roots of a Polynomial + + + Working with all the roots of a polynomial +
    + + Solution of a Single Polynomial Equation + + + Finding the roots of one polynomial +
    + + Solution of Systems of Polynomial Equations + + + Finding the roots of a system of polynomials +
    +<> +@ + +\subsection{polyroots1.xhtml} +<>= +<> + + + +<> +
    Using a Single Root of a Polynomial
    +
    +Use rootOf to get a symbolic root of a +polynomial. The call rootOf(p,x) returns a root of p(x). + +This creates an algebraic number a, which is a root of the polynomial +returned in symbolic form. +
      +
    • + +
      +
    • +
    +To find the algebraic relation that defines a, use +definingPolynomial +
      +
    • + +
      +
    • +
    +You can use a in any further expression, including a nested +rootOf. +
      +
    • + +
      +
    • +
    +Higher powers of the roots are automatically reduced during calculations. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    +The operation zeroOf is similar to +rootOf, except that it may express the +root using radicals in some cases. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    +<> +@ + +\subsection{polyroots2.xhtml} +<>= +<> + + + +<> +
    Using All Roots of a Polynomial
    +
    +Use rootsOf to get all symbolic roots +of a polynomial. The call rootsOf(p,x) returns a list of all the roots +of p(x). If p(x) has a multiple root of order n, then that root appears +n times in the list. + +Compute all the roots of x^4+1. +
      +
    • + +
      +
    • +
    +As a side effect, the variables %x0, %x1, and %x2 are bound to the first +three roots of x^4+1. +
      +
    • + +
      +
    • +
    +Although they all satisfy x^4+1=0, %x0, %x1, and %x2 are different +algebraic numbers. To find the algebraic relation that defines each of +them, use definingPolynomial. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    +We can check that the sum and product of the roots of x^4+1 are its +trace and norm. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    +Corresponding to the pair of operations +rootOf and +zeroOf in + +Solution of a Single Polynomial Equation +there is an operations zerosOf that, like +rootsOf, computes all the roots of a given +polynomial, but which expresses some of them in terms of radicals. +
      +
    • + +
      +
    • +
    +As you see, only one implicit algebraic number was created (%y1), and its +defining equation is this. The other three roots are expressed in radicals. +
      +
    • + +
      +
    • +
    +<> +@ + +\subsection{polyroots3.xhtml} +<>= +<> + + + +<> +
    Solution of a Single Polynomial Equation
    +
    +Axiom can solve polynomial equations producing either approximate or exact +solutions. Exact solutions are either members of the ground field or can +be presented symbolically as roots of irreducible polynomials. + +This returns one rational root along with an irreducible polynomial +describing the other solutions +
      +
    • + +
      +
    • +
    +If you want solutions expressed in terms of radicals you would use this +instead. +
      +
    • + +
      +
    • +
    +The solve command always returns a value but +radicalSolve returns only the solutions +that it is able to express in terms of radicals. + +If the polynomial equation has rational coefficients you can ask for +approximations to its real roots by calling solve with a second argument +that specifies the "precision" epsilon. This means that each approximation +will be within plus or minus epsilon of the actual result. + +Notice that the type of second argument controls the type of the result. +
      +
    • + +
      +
    • +
    +If you give a floating point precision you get a floating point result. +If you give the precision as a ration number you get a rational result. +
      +
    • + +
      +
    • +
    +If you want approximate complex results you should use the command +complexSolve that takes the same +precision argument epsilon. +
      +
    • + +
      +
    • +
    +Each approximation will be within plus or minus epsilon of the actual result +in each of the real and imaginary parts. +
      +
    • + +
      +
    • +
    +Note that if you omit the = from the first argument Axiom generates +an equation by equating the first argument to zero. Also, when only one +variable is present in the equation, you do not need to specify the +variable to be solved for, that is, you can omit the second argument. + +Axiom can also solve equations involving rational functions. Solutions +where the denominator vanishes are discarded. +
      +
    • + +
      +
    • +
    +<> +@ + +\subsection{polyroots4.xhtml} +<>= +<> + + + +<> +
    Solution of Systems of Polynomial Equations
    +
    +Given a system of equations of rational functions with exact coefficients +
    +     p1(x1,...,xn)
    +         .
    +         .
    +     pm(x1,...,xn)
    +
    +Axiom can find numeric or symbolic solutions. The system is first split +into irreducible components, then for each component, a triangular system +of equations is found that reduces the problem to sequential solutions of +univariate polynomials resulting from substitution of partial solutions +from the previous stage. +
    +     q1(x1,...,xn)
    +         .
    +         .
    +     qm(xn)
    +
    +Symbolic solutions can be presented using "implicit" algebraic numbers +defined as roots of irreducible polynomials or in terms of radicals. Axiom +can also find approximations to the real or complex roots of a system of +polynomial equations to any user specified accuracy. + +The operation solve for systems is used in +a way similar to solve for single equations. +Instead of a polynomial equation, one has to give a list of equations and +instead of a single variable to solve for, a list of variables. For +solutions of single equations see + +Solution of a Single Polynomial Equation + +Use the operation solve if you want +implicitly presented solutions. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    +Use radicalSolve if you want your +solutions expressed in terms of radicals. +
      +
    • + +
      +
    • +
    +To get numeric solutions you only need to give the list of equations and +the precision desired. The list of variables would be redundant information +since there can be no parameters for the numerical solver. + +If the precision is expressed as a floating point number you get results +expressed as floats. +
      +
    • + +
      +
    • +
    +To get complex numeric solutions, use the operation +complexSolve, which takes the same +arguments as in the real case. +
      +
    • + +
      +
    • +
    +It is also possible to solve systems of equations in rational functions +over the rational numbers. Note that [x=0.0,a=0.0] is not returned as +a solution since the denominator vanishes there. +
      +
    • + +
      +
    • +
    +When solving equations with denominators, all solutions where the +denominator vanishes are discarded. +
      +
    • + +
      +
    • +
    +<> +@ + +\subsection{polyspecifictypes.xhtml} +<>= +<> + + +<> +
    The Specific Polynomial Types
    +
    + + + + + + + + + + + + + + + + Multiple variable polynomials, non-recursive structure + + +
    + + Polynomial + + + The general type +
    + + UnivariatePolynomial + + + One variable polynomials +
    + + MultivariatePolynomial + + + Multiple variable polynomials, recursive structure +
    + + DistributedMultivariatePolynomial + + +
    +<> +@ + +\subsection{polyspecifictypes1.xhtml} +<>= +<> + + + +<> +
    Polynomial
    +
    +The domain constructor Polynomial +(abbreviation: POLY) provides polynomials +with an arbitrary number of unspecified variables. + +It is used to create the default polynomial domains in Axiom. Here the +coefficients are integers. +
      +
    • + +
      +
    • +
    +Here the coefficients have type Float. +
      +
    • + +
      +
    • +
    +And here we have a polynomial in two variables with coefficients which +have type Fraction Integer +
      +
    • + +
      +
    • +
    +The representation of objects of domains created by +Polynomial is that of recursive univariate +polynomials. (The term univariate means "one variable". The term +multivariate means "possibly more than one variable".) This recursive +structure is sometimes obvious from the display of a polynomial. +
      +
    • + +
      +
    • +
    +In this example, you see that the polynomial is stored as a polynomial in y +with coefficients that are polynomials in x with integer coefficients. In +fact, you really don't need to worry about the representation unless you are +working on an advanced application where it is critical. The polynomial +types created from + +DistributedMultivariatePolynomial and +XDistributedPolynomial +(discussed in +"DistributedMultivariatePolynomial" +are stored and displayed in a +non-recursive manner. You see a "flat" display of the above polynomial by +converting to one of those types. +
      +
    • + +
      +
    • +
    +We will demonstrate many of the polynomial facilities by using two +polynomials with integer coefficients. By default, the interpreter +expands polynomial expressions, even if they are written in a factored +format. +
      +
    • + +
      +
    • +
    +See Factored +to see how to create objects in factored form directly. +
      +
    • + +
      +
    • +
    +The fully factored form can be recovered by using +factor +
      +
    • + +
      +
    • +
    +This is the same name used for the operation to factor integer. +Such reuse of names is called +overloading and makes it much +easier to think of solving problems in general ways. Axiom facilities +for factoring polynomials created with +Polynomial +are currently restricted to the integer and rational number coefficients +cases. There are more complete facilities for factoring univariate +polynomials (see +Polynomial Factorization) + +The standard arithmetic operations are available for polynomials. +
      +
    • + +
      +
    • +
    +The operation gcd is used to compute the +greated common divisor of two polynomials. +
      +
    • + +
      +
    • +
    +In the case of p and q, the gcd is obvious from their definitions. +We factor the gcd to show this relationship better. +
      +
    • + +
      +
    • +
    +The least common multiple is computed by using +lcm. +
      +
    • + +
      +
    • +
    +Use content to compute the greatest common +divisor of the coefficients of the polynomial. +
      +
    • + +
      +
    • +
    +Many of the operations on polynomials require you to specify a variable. +For example, resultant requires you to +give the variable in which the polynomials should be expressed. This +computes the resultant of the values of p and q, considering them as +polynomials in the variable z. They do not share a root when thought +of as polynomials in z. +
      +
    • + +
      +
    • +
    +This value is 0 because as polynomials in x the polynomials have a +common root. +
      +
    • + +
      +
    • +
    +The data type used for the variables created by +Polynomial is +Symbol. As mentioned above, the representation +used by Polynomial is recursive and so +there is a main variable for nonconstant polynomials. The operation +makeVariable returns this variable. +The return type is actually a union of Symbol +and "failed". +
      +
    • + +
      +
    • +
    +The latter branch of the union is used if the polynomial has no +variables, that is, is a constant. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    +The complete list of variables actually used in a particular polynomial +is returned by variables. For constant +polynomials, this list is empty. +
      +
    • + +
      +
    • +
    +The degree operation returns the degree +of a polynomial in a specific variable. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    +If you give a list of variables for the second argument, a list of the +degrees in those variables is returned. +
      +
    • + +
      +
    • +
    +The minimum degree of a variable in a polynomial is computed using +minimumDegree. +
      +
    • + +
      +
    • +
    +The total degree of a polynomial is returned by +totalDegree. +
      +
    • + +
      +
    • +
    +It is often convenient to think of a polynomial as a leading monomial +plus the remaining terms, using the operation +leadingMonomial +
      +
    • + +
      +
    • +
    +The reductum operation returns a polynomial +consisting of the sum of the monomials after the first. +
      +
    • + +
      +
    • +
    +These have the obvious relationship that the original polynomial is equal +to the leading monomial plus the reductum. +
      +
    • + +
      +
    • +
    +The value returned by leadingMonomial +includes the coefficient of that term. This is extracted by using +leadingCoefficient on the +original polynomial. +
      +
    • + +
      +
    • +
    +The operation eval is used to substitute a +value for a varialbe in a polynomial. +
      +
    • + +
      +
    • +
    +This value may be another variable, a constant or a polynomial. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    +Actually, all the things being substituted are just polynomials, some +more trivial than others. +
      +
    • + +
      +
    • +
    +Derivatives are computed using the D operation. +
      +
    • + +
      +
    • +
    +The first argument is the polynomial and the second is the variable. +
      +
    • + +
      +
    • +
    +Even if the polynomial has only one variable, you must specify it. +
      +
    • + +
      +
    • +
    +Integration of polynomials is similar and the +integrate operation is used. + +Integration requires that the coefficients support division. +Consequently, Axiom converts polynomials over the integers to polynomials +over the rational numbers before integrating them. +
      +
    • + +
      +
    • +
    +It is not possible, in general, to divide two polynomials. In our example +using polynomials over the integers, the operation +monicDivide divides a polynomial by a +monic polynomial (that is, a polynomial with leading coefficient equal to +1). The result is a record of the quotient and remainder of the division. +You must specify the variable in which to express the polynomial. +
      +
    • + +
      +
    • +
    +The selectors of the components of the record are quotient and +remainder. Issue this to extract the remainder: +
      +
    • + +
      +
    • +
    +Now that we can extract the components, we can demonstrate the +relationship among them and the arguments to our original expression +
    +  qr:=monicDivide(p,x+1,x)
    +
    +
      +
    • + +
      +
    • +
    +If the / operator is used with polynomials, +a fraction object is created. In this example, the result is an object of +type +Fraction Polynomial Integer. +
      +
    • + +
      +
    • +
    +If you use rational numbers as polynomial coefficients, the resulting +object is of type +Polynomial Fraction Integer +
      +
    • + +
      +
    • +
    +This can be converted to a fraction of polynomials and back again, if +required. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    +To convert the coefficients to floating point, map the +numeric operation on the coefficients +of the polynomial. +
      +
    • + +
      +
    • +
    +For more information on related topcis, see +UnivariatePolynomial, +MultivariatePolynomial, and +DistributedMultivariatePolynomial. +You can also issue the system command +
      +
    • + +
      +
    • +
    +to display the full list of operations defined by +Polynomial. +<> +@ + +\subsection{polyspecifictypes2.xhtml} +<>= +<> + + + +<> +
    UnivariatePolynomial
    +
    +The domain constructor +UnivariatePolynomial +(abbreviated UP) +creates domains of univariate polynomials in a specified variable. +For example, the domain UP(a1,POLY FRAC INT) provides polynomials in +the single variable a1 whose coefficients are general polynomials with +rational number coefficients. +
    +Restriction:
    +Axiom does not allow you to create types where +UnivariatePolynomial +is contained in the coefficient type of +Polynomial. +Therefore, UP(x,POLY INT) is legal but POLY UP(x,INT) is not. +
    +UP(x,INT) is the domain of polynomials in the single variable x with +integer coefficients. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    +The usual arithmetic operations are available for univariate polynomials. +
      +
    • + +
      +
    • +
    +The operation +leadingCoefficient +extracts the coefficient of the term of highest degree. +
      +
    • + +
      +
    • +
    +The operation degree returns the degree of +the polynomial. Since the polynomial has only one variable, the variable +is not supplied to operations like degree. +
      +
    • + +
      +
    • +
    +The reductum of the polynomial, the polynomial obtained by subtracting +the term of highest order, is returned by +reductum. +
      +
    • + +
      +
    • +
    +The operation gcd computes the greatest common +divisor of two polynomials. +
      +
    • + +
      +
    • +
    +The operation lcm computes the least common +multiple. +
      +
    • + +
      +
    • +
    +The operation resultant computes the +resultant of two univariate polynomials. In the case of p and q, the +resultant is 0 because they share a common root. +
      +
    • + +
      +
    • +
    +To compute the derivative of a univariate polynomial with respect to +its variable, use D. +
      +
    • + +
      +
    • +
    +Univariate polynomials can also be used as if they were functions. +To evaluate a univariate polynomial at some point, apply the polynomial +to the point. +
      +
    • + +
      +
    • +
    +The same syntax is used for composing two univariate polynomials, i.e. +substituting one polynomial for the variable in another. This substitutes q +for the variable in p. +
      +
    • + +
      +
    • +
    +This substitutes p for the variable in q. +
      +
    • + +
      +
    • +
    +To obtain a list of coefficients of the polynomial, use +coefficients. +
      +
    • + +
      +
    • +
    +From this you can use gcd and +reduce to compute the contents of the +polynomial. +
      +
    • + +
      +
    • +
    +Alternatively (and more easily), you can just call +content +
      +
    • + +
      +
    • +
    +Note that the operation coefficients +omits the zero coefficients from the list. Sometimes it is useful to +convert a univariate polynomial to a vector whose i-th position contains +the degree i-1 coefficient of the polynomial. +
      +
    • + +
      +
    • +
    +To get a complete vector of coefficients, use the operation +vectorise, which takes a univariate +polynomial and an integer denoting the length of the desired vector. +
      +
    • + +
      +
    • +
    +It is common to want to do something to every term of a polynomial, +creating a new polynomial in the process. This is a function for +iterating across the terms of a polynomial, squaring each term. +
      +
    • + +
      +
    • +
    +Recall what p looked like. +
      +
    • + +
      +
    • +
    +We can demonstrate squareTerms on p. +
      +
    • + +
      +
    • +
    +When the coefficients of the univariate polynomial belong to a field, +(for example, when the coefficients are rational numbers, as opposed to +integers. The important property of a field is that non-zero elements can +be divided and produce another element. The quotient of the integers 2 and 3 +is not another integer.) It is possible to compute quotients and remainders. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    +When the coefficients are rational numbers or rational expressions, the +operation quo computes the quotient of two +polynomials. +
      +
    • + +
      +
    • +
    +The operation rem computes the remainder. +
      +
    • + +
      +
    • +
    +The operation divide can be used to return +a record of both components. +
      +
    • + +
      +
    • +
    +Now we check the arithmetic. +
      +
    • + +
      +
    • +
    +It is also possible to integrate univariate polynomials when the +coefficients belong to a field. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    +One application of univariate polynomials is to see expressions in terms of +a specific variable. We start with a polynomial in a1 whose coefficients are +quotients of polynomials in b1 and b2. +
      +
    • + +
      +
    • +
    +Since in this case we are not talking about using multivariate polynomials +in only two variables, we use Polynomial. +We also use Fraction because we want fractions. +
      +
    • + +
      +
    • +
    +We push all the variables into a single quotient of polynomials. +
      +
    • + +
      +
    • +
    +Alternatively, we can view this as a polynomial in the variable. This is a +mode-directed conversion: You indicate as much of the structure as you care +about and let Axiom decide on the full type and how to do the transformation. +
      +
    • + +
      +
    • +
    +See Polynomial Factorization for a +discussion of the factorization facilities in Axiom for univariate +polynomials. For more information on related topics, see +Polynomials, +Conversion, +Polynomial, +MultivariatePolynomial, and +DistributedMultivariatePolynomial. +Issue the system command +
      +
    • + +
      +
    • +
    +to display the full list of operations defined by +UnivariatePolynomial. +<> +@ + +\subsection{polyspecifictypes3.xhtml} +<>= +<> + + + +<> +
    MultivariatePolynomial
    +
    +The domain constructor +MultivariatePolynomial is +similar to Polynomial except that it +specifies the variables to be used. +Polynomial are available for +MultivariatePolynomial. +The abbreviation for +MultivariatePolynomial is +MPOLY. The type expressions +
    +   MultivariatePolynomial([x,y],Integer)
    +
    +and +
    +         MPOLY([x,y],INT)
    +
    +refer to the domain of multivariate polynomials in the variables x and y +where the coefficients are restricted to be integers. The first variable +specified is the main variable and the display of the polynomial reflects +this. This polynomial appears with terms in descending powers of the +variable x. +
      +
    • + +
      +
    • +
    +It is easy to see a different variable ordering by doing a conversion. +
      +
    • + +
      +
    • +
    +You can use other, unspecified variables, by using +Polynomial in the coefficient type of +MPOLY. +
      +
    • + +
      +
    • +
    +Conversions can be used to re-express such polynomials in terms of the +other variables. For example, you can first push all the variables into a +polynomial with integer coefficients. +
      +
    • + +
      +
    • +
    +Now pull out the variables of interest. +
      +
    • + +
      +
    • +
    +
    +Restriction: Axiom does not allow you to create types where +MultivariatePolynomial is +contained in the coefficient type of +Polynomial. Therefore, +
    +     MPOLY([x,y],POLY INT)
    +
    +is legal but this is not: +
    +     POLY MPOLY([x,y],INT)n
    +
    +
    +Multivariate polynomials may be combined with univariate polynomials to +create types with special structures. +
      +
    • + +
      +
    • +
    +This is a polynomial in x whose coefficients are quotients of polynomials +in y and z. Use conversions for the structural rearrangements. z does not +appear in a denominator and so it can be made the main variable. +
      +
    • + +
      +
    • +
    +Or you can make a multivariate polynomial in x and z whose coefficients +are fractions in polynomials in y +
      +
    • + +
      +
    • +
    +A conversion like +
    +  q::MPOLY([x,y],FRAC UP(z,INT))
    +
    +is not possible in this example because y appears in the denominator of +a fraction. As you can see, Axiom provides extraordinary flexibility in +the manipulation and display of expressions via its conversion facility. + +For more information on related topics, see +Polynomial, +UnivariatePolynomial, and +DistributedMultivariatePolynomial. +Issue the system command +
      +
    • + +
      +
    • +
    +to display the full list of operations defined by +MultivariatePolynomial. +<> +@ + +\subsection{polyspecifictypes4.xhtml} +<>= +<> + + + +<> +
    DistributedMultivariatePolynomial
    +
    + +DistributedMultivariatePolynomial and + +HomogeneousDistributedMultivariatePolynomial, abbreviated +DMP and +HDMP +repspectively, are very similar to +MultivariatePolynomial +except that they are represented and displayed in a non-recursive manner. +
      +
    • + +
      +
    • +
    +The construction +DMP orders its +monomials lexicographically while +HDMP +orders them by total order refined by reverse lexicographic order. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    +These constructors are mostly used in Groebner basis calculations. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    • + +
      +
    • +
    +Note that we get a different Groebner basis when we use the +HDMP +polynomials, as expected. +
      +
    • + +
      +
    • +
    + +GeneralDistributedMultivariatePolynomial is somewhat more flexible in +the sense that as well as accepting a list of variables to specify the +variable ordering, it also takes a predicate on exponent vectors to specify +the term ordering. With this polynomial type the user can experiment with +the effect of using completely arbitrary term orderings. This flexibility +is mostly important for algorithms such as Groebner basis calculations +which can be very sensitive to term orderings. + +For more information on related topics, see +Polynomials, +Conversion, +Polynomial, +UnivariatePolynomial. and +MultivariatePolynomial, +Issue the system command +
      +
    • + +
      +
    • +
    +to display the full list of operations defined by + +DistributedMultivariatePolynomial and +<> +@ + +\subsection{polysubstitutions.xhtml} +<>= +<> + + + +<> +
    Polynomial Evaluation and Substitution
    +
    +The function eval is used to substitute values +into polynomials. Here's an example of how to use it: +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    +This example would give you the value of the polynomial p at 5. You can +also substitute into polynomials with several variables. First, specify +the polynomial, then give a list of the bindings of the form +
    +  variable = value
    +
    +For examples: +
      +
    • + +
      +
    • +
    +Here x was replaced by a+b, and y was replaced by c+d. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    +Substitution is done "in parallel". That is, Axiom takes q(x,y) and +returns q(y,x). + +You can also substitute numerical values for some or all of the variables. +
      +
    • + +
      +
    • +
    • + +
      +
    • +
    +<> +@ + + +\subsection{puiseuxseries.xhtml} +<>= +<> + + + +<> + + + + + + + + + + + + + + + + +
    + Enter the formula for the general coefficient of the series: +
    + +
    + Enter the index variable for your formula: + +
    + Enter the power series variable: + +
    + Enter the point about which to expand: + +
    +For Puiseux Series, the exponent of the power series variable ranges +from an initial value, an arbitrary rational number, to plus +infinity; the step size is any positive rational number. + + + + + + + +
    + Enter the initial value of the index (a rational number): + +
    + Enter the step size (a positive rational number): + +
    +<> +<> +<> + +@ + +%%Q +%%R +\subsection{reallimit.xhtml} +<>= +<> + + + +<> +
    + Enter the function you want to compute the limit of:
    +
    + Enter the name of the variable:
    +
    + + A finite point +
    + + %plusInfinity
    + + %minusInfinity


    + Compute the limit from:
    + + both directions
    + + the right
    + + the left
    +
    +<> +<> +<> + +@ +\subsection{refsearchpage.xhtml} +<>= +<> + + +<> + refsearchpage not implemented +<> +@ + +\subsection{releasenotes.xhtml} +<>= +<> + + +<> +The November 2007 release of Axiom contains +
      +
    • + New MathML output mode. This mode allows Axiom to output expressions + using standard MathML format. This complements the existing ability + to output Fortran, IBM script, Latex, OpenMath, and algebra formats. +
    • +
    • + Ninety-five domains have been documented for the )help command. + Type )help to see the list. +
    • +
    • + New regression tests were added to improve the release testing. +
    • +
    • + Hyperdoc can now be restarted. Type )hd +
    • +
    • + Testing has begun against Spiegel's Mathematical Handbook from the + Schaum's Outline Series. These tests include Axiom's solutions and + have uncovered mistakes in the published text. +
    • +
    +Bug fixes +
      +
    • + Bug100 integrate((z^a+1)^b,z) no longer loops infinitely. +
    • +
    • + Bug101 laplace(log(z),z,w) returns "failed" instead of crashing. +
    • +
    • + Bug103 solve(z=z,z) returns the correct answer +
    • +
    +Additional information sources: + + + + + + + +
    + + Online information is available here + +
    + + The changelog file contains specific file-by-file changes. + +
    +<> +@ + +\subsection{rootpage.xhtml} +\begin{verbatim} + notangle -R"rootpage.xhtml" bookvol11.pamphlet > rootpage.xhtml +\end{verbatim} +<>= +<> + + + +
    + What would you like to do?
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + Any Command + + Try command line input
    + + Basic Commands + + Solve problems by filling in templates
    + + Axiom Textbook + + Read Volume 0 -- The Jenks/Sutor Book
    + + Axiom Tutorial + + Read Volume 1 -- The Tutorial
    + + Reference + + Scan on-line documentation for AXIOM
    + + Topics + + Learn how to use Axiom, by topic
    + + Browser + + Browse through the AXIOM library
    + + Examples + + See examples of use of the library
    + + Settings + + Display and change the system environment
    + + What's New + + Enhancements in this version of Axiom
    + + Fonts + + Test Axiom Fonts in your Browser
    +<> +@ + +%%S +\subsection{series.xhtml} +<>= +<> + + +<> + Create a series by + + + + + + + + + + + + + + + + + +
    + + Expansion + + + Expand a function in a series around a point +
    + + Taylor Series + +
    + Series where the exponent ranges over the integers from a + non-negative integer value to plus infinity by an arbitrary + positive integer step size. +
    + + Laurent Series + +
    + Series where the exponent ranges from an arbitrary integer value + to plus infinity by an arbitrary positive integer step size. +
    + + Puiseux Series + +
    + Series where the exponent ranges from an arbitrary rational value + to plus infinity by an arbitrary positive rational number step size. +
    +<> +@ + +\subsection{seriesexpand.xhtml} +<>= +<> + + + +<> + + + + + + + + + + + + + +
    + What function would you like to expand in a power series? +
    + +
    + Enter the power series variable: + +
    + Expand around the point: + +
    +<> +<> +<> + +@ + +\subsection{solve.xhtml} +<>= +<> + + +<> + What do you want to solve? + + + + + + + + + + + + + +
    + + A System of Linear Equations in equation form + +
    + + A System of Linear Equations in matrix form + +
    + + A System of Polynomial Equations + +
    + + A Single Polynomial Equation + +
    +<> +@ + + +\subsection{solvelinearequations.xhtml} +<>= +<> + + + +<> + + + + +
    + Enter the number of equations: + +
    +
    +
    +
    + +
    +
    +
    +<> +<> +@ + +\subsection{solvelinearmatrix.xhtml} +<>= +<> + + + +<> +Enter the size of the matrix: + + + + + + + + + +
    Rows
    Columns
    +
    +
    + How would you like to enter the matrix elements? +
    + + +
    +
    +
    +<> +<> +@ + + +@ + +\subsection{solvesinglepolynomial.xhtml} +<>= +<> + + +<> + solvesinglepolynomial.xhtml not implemented +<> + +@ + +\subsection{solvesystempolynomials.xhtml} +<>= +<> + + +<> + solvesystempolynomials.xhtml not implemented +<> + +@ + +\subsection{summation.xhtml} +<>= +<> + + + +<> +
    + Enter the function you want to sum:
    +
    + Enter the summation index: +
    + Enter the limits of the sum: From: + + To: +
    +
    +<> +<> +<> +@ + +\subsection{systemvariables.xhtml} +<>= +<> + + +<> + systemvariables not implemented +<> +@ + + +%%T + +\subsection{taylorseries.xhtml} +<>= +<> + + + +<> + + + + + + + + + + + + + + + + +
    + Enter the formula for the general coefficient of the series: +
    + +
    + Enter the index variable for your formula: + +
    + Enter the power series variable: + +
    + Enter the point about which to expand: + +
    +For Taylor Series, the exponent of the power series variable ranges +from an initial value, an arbitrary non-negative integer, to plus +infinity; the step size is any positive integer. + + + + + + + +
    + Enter the initial value of the index (an integer): + +
    + Enter the step size (a positive integer): + +
    +<> +<> +<> + +@ + +\subsection{topexamplepage.xhtml} +<>= +<> + + +<> + + + + + + + + + + + + + +
    GraphicsExamples of Axiom Graphics
    DomainsExamples of use of Axiom domains and packages
    OperationsExamples of Axiom Operations, by topic
    +<> +@ + +\subsection{topicspage.xhtml} +<>= +<> + + +<> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NumbersA look at different types of numbers
    PolynomialsPolynomials in Axiom
    FunctionsBuilt-in and user-defined functions
    Solving EquationsFacilities for solving equations
    CalculusUsing Axiom to do calculus
    Linear AlgebraAxiom's linear algebra facilities
    GraphicsAxiom's graphics facilities
    AlgebraAxiom's abstract algebra facilities
    CryptographyAlasdair McAndrew's Crytography Course Notes
    Mathematical MethodsMIT 18-08 Mathematical Methods for Engineers Course Notes
    +<> +@ + +\subsection{topreferencepage.xhtml} +<>= +<> + + +<> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    AXIOM BookThe on-line version of the Jenks/Sutor book.
    Aldor GuideThe on-line Aldor Users Guide.
    NAG LibraryThe on-line NAG Library documentation.
    TopicsLearn how to use Axiom, by topic.
    LanguageIntroduction to the Axiom language.
    ExamplesExamples for exposed domains and packages
    CommandsSystem commands that control your workspace.
    OperationsA guide to useful operations
    System VariablesView and change a system-defined variable
    GlossaryA glossary of Axiom terms.
    HyperDocHow to write your own HyperDoc pages.
    SearchReference pages for occurrences of a string.
    +<> +@ + +\subsection{topsettingspage.xhtml} +<>= +<> + + +<> +System commands are used to perform Axiom environment +management and change Axiom system variables. +
    + + + + + + + + + +
    CommandsSystem commands that control your environment.
    SettingsChange an Axiom variable.
    +<> +@ + +\subsection{tutorial.xhtml} +<>= +<> + + +<> + tutorial not implemented +<> +@ + +%%U +\subsection{uglangpage.xhtml} +<>= +<> + + +<> + uglangpage not implemented +<> +@ + +\subsection{ugsyscmdpage.xhtml} +<>= +<> + + +<> + ugsyscmdpage not implemented +<> +@ + + +\subsection{usersguidepage.xhtml} +<>= +<> + + +<> + usersguidepage not implemented +<> +@ + + +%%V +%%W +%%X +%%Y +%%Z +\subsection{rcm3720.input} +<>= +str2lst(str) == [ord(str.i)-65 for i in 1..#str] + +lst2str(lst) == concat [char(lst.i+65)::String for i in 1..#lst] + +str2num(str) == + local strlst + strlst:=[ord(str.i) for i in 1..#str] + return wholeRadix(strlst)$RadixExpansion(256)::INT + +num2str(n) == + local tmp + tmp:=wholeRagits(n::RadixExpansion(256)) + return concat [char(tmp.i)::String for i in 1..#tmp] + +superIncreasing?(lst) == + reduce(/\,[lst.i>reduce(+,[lst.j for j in 1..i-1]) for i in 2..#lst]) + +siSolve(lst,n) == + local res,m,i + if not superIncreasing?(lst) then error "The list is not super-increasing" + m := n + res := [0 for i in 1..#lst] + for i in #lst..1 by -1 repeat + if lst.i <= m then + res.i := 1 + m := m - lst.i + if m = 0 then return res + error "Unsolvable" + +subsetsum(L:List(INT),N:INT):List(INT) == + local x,Y + if N=0 then return([]) + if N<0 or #L=0 then return([-1]) + for x in L repeat + Y:=subsetsum(remove(x,L),N) + if Y~=[-1] then return(Y) + Y:=subsetsum(remove(x,L),N-x) + if Y~=[-1] then return(cons(x,Y)) + return([-1]) +@ + +\subsection{signatures.txt} +<>= +RSA --- +n = 2^137-1 e = 17 +message = "This is my text." +signature = 68767027465671577191073128495082795700768 +n = (6^67-1)/5 e = 17 +message = "Please feed my dog!" +signature = 1703215098456351993605104919259566435843590978852633 + +Rabin ----- +n = (3^59-1)/2 +message = "Leave now." +signature = +n = (7^47-1)/6 +message = "Arrive Thursday." +signature = 189479723122534414019783447271411895509 + +El Gamal -------- +p = next prime after 2^150 +a = 2 +B = 1369851585774063312693119161120024351761244461 +message = "Leave AT ONCE!" +signature r = 1389080525305754392111976715361069425353578198 +s = 1141326468070168229982976133801721430306004477 + +DSS --- +p = next prime after 2^170 +q = 143441505468590696209 +g = 672396402136852996799074813867123583326389281120278 +B = 1394256880659595564848116770226045673904445792389839 +message = "Now's your chance!" +signature r = 64609209464638355801 +s = 13824808741200493330 +@ + +\subsection{strang.input} +<>= +rowmatrix(r:List(Fraction(Integer))):Matrix(Fraction(Integer)) == + [r]::Matrix(Fraction(Integer)) + +columnmatrix(c:List(Fraction(Integer))):Matrix(Fraction(Integer)) == + [[i] for i in c]::Matrix(Fraction(Integer)) + +k(n) == + M := diagonalMatrix([2 for i in 1..n]) + for i in 1..n-1 repeat M(i,i+1):=-1 + for i in 1..n-1 repeat M(i+1,i):=-1 + M::SquareMatrix(n,Fraction(Integer)) + +t(n) == + M:=k(n) + N:=M::Matrix(Fraction(Integer)) + qsetelt!(N,1,1,1) + N::SquareMatrix(n,Fraction(Integer)) + +b(n) == + M:=k(n) + N:=M::Matrix(Fraction(Integer)) + qsetelt!(N,1,1,1) + qsetelt!(N,n,n,1) + N::SquareMatrix(n,Fraction(Integer)) + +K:=k(3) +T:=t(3) +B:=b(3) + + +@ +\subsection{bitmaps/axiom1.bitmap} +<>= +#define axiom_width 270 +#define axiom_height 100 +static char axiom_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, + 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x1f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x1f, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xf8, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x3f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xf2, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x92, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x02, + 0x00, 0xe0, 0x01, 0xf0, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0xe0, 0xff, 0x01, 0x00, 0x00, 0xe0, + 0x00, 0xc0, 0x7f, 0x00, 0x00, 0xc0, 0x1f, 0x00, 0xd2, 0x02, 0x00, 0xe0, + 0xff, 0xff, 0xff, 0x0f, 0xfe, 0xff, 0xff, 0x03, 0xf8, 0xff, 0xff, 0x03, + 0xe0, 0x07, 0x00, 0x00, 0xfe, 0xff, 0x0f, 0x00, 0x00, 0xf8, 0x01, 0xf8, + 0xff, 0x03, 0x00, 0xf8, 0xff, 0x01, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, + 0xff, 0x3f, 0xff, 0xff, 0xff, 0x03, 0xf8, 0xff, 0xff, 0x01, 0xf8, 0x07, + 0x00, 0x80, 0xff, 0xff, 0x3f, 0x00, 0x00, 0xff, 0x01, 0xfe, 0xff, 0x07, + 0x00, 0xfe, 0xff, 0x03, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0x7f, + 0xff, 0xff, 0xff, 0x01, 0xf8, 0xff, 0xff, 0xfd, 0xff, 0x07, 0x00, 0xe0, + 0xff, 0xff, 0x7f, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x0f, 0x00, 0xff, + 0xff, 0x03, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x8f, 0xff, 0xff, 0xe0, 0xff, + 0x7f, 0x00, 0x80, 0xff, 0x3f, 0xfe, 0xff, 0x07, 0x00, 0xf0, 0xff, 0xff, + 0xff, 0x80, 0xff, 0xff, 0xc0, 0xff, 0xff, 0x1f, 0xc0, 0xff, 0xff, 0x07, + 0x00, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0xf0, 0xff, 0x81, 0xff, 0x3f, 0x00, + 0x00, 0xff, 0x07, 0xff, 0xff, 0x03, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xc3, + 0xff, 0xff, 0xf0, 0xff, 0xff, 0x3f, 0xf0, 0xff, 0xff, 0x0f, 0x00, 0x00, + 0x00, 0xf0, 0x1f, 0x00, 0xe0, 0xff, 0x01, 0xff, 0x3f, 0x00, 0x00, 0xfe, + 0x03, 0xe0, 0xff, 0x03, 0x00, 0xff, 0xff, 0xff, 0xff, 0x83, 0xff, 0xff, + 0xf8, 0xff, 0xff, 0x3f, 0xf8, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0xf0, + 0x0f, 0x00, 0xc0, 0xff, 0x01, 0xfe, 0x3f, 0x00, 0x00, 0xfe, 0x01, 0xc0, + 0xff, 0x03, 0x80, 0xff, 0x00, 0xfc, 0xff, 0x07, 0xf8, 0xff, 0xfc, 0x01, + 0xff, 0x3f, 0xfe, 0x80, 0xff, 0x1f, 0x00, 0x00, 0x00, 0xf0, 0x07, 0x00, + 0xc0, 0xff, 0x03, 0xfe, 0x3f, 0x00, 0x00, 0xff, 0x00, 0x80, 0xff, 0x03, + 0xc0, 0x3f, 0x00, 0xe0, 0xff, 0x0f, 0xe0, 0xff, 0x3f, 0x00, 0xfe, 0xbf, + 0x3f, 0x00, 0xff, 0x1f, 0x00, 0x00, 0x00, 0xf8, 0x01, 0x00, 0x80, 0xff, + 0x03, 0xf8, 0x3f, 0x00, 0x80, 0x7f, 0x00, 0x80, 0xff, 0x03, 0xe0, 0x0f, + 0x00, 0x80, 0xff, 0x1f, 0xe0, 0xff, 0x0f, 0x00, 0xf8, 0xff, 0x0f, 0x00, + 0xfc, 0x1f, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0xff, 0x03, 0xf8, + 0x7f, 0x00, 0x80, 0x3f, 0x00, 0x80, 0xff, 0x03, 0xf0, 0x0f, 0x00, 0x00, + 0xff, 0x1f, 0xe0, 0xff, 0x07, 0x00, 0xf8, 0xff, 0x07, 0x00, 0xfc, 0x1f, + 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0xff, 0x03, 0xf0, 0xff, 0x00, + 0xc0, 0x1f, 0x00, 0x80, 0xff, 0x03, 0xf8, 0x07, 0x00, 0x00, 0xfe, 0x3f, + 0xe0, 0xff, 0x07, 0x00, 0xf8, 0xff, 0x03, 0x00, 0xf8, 0x3f, 0x00, 0x00, + 0x00, 0x78, 0x00, 0x00, 0x00, 0xff, 0x03, 0xe0, 0xff, 0x00, 0xc0, 0x0f, + 0x00, 0x80, 0xff, 0x03, 0xfc, 0x03, 0x00, 0x00, 0xfc, 0x3f, 0xe0, 0xff, + 0x03, 0x00, 0xf0, 0xff, 0x01, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0x00, 0x3c, + 0x00, 0x00, 0x00, 0xff, 0x03, 0xc0, 0xff, 0x01, 0xe0, 0x0f, 0x00, 0x80, + 0xff, 0x03, 0xfc, 0x03, 0x00, 0x00, 0xfc, 0x3f, 0xe0, 0xff, 0x01, 0x00, + 0xf0, 0xff, 0x01, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, + 0x00, 0xff, 0x03, 0xc0, 0xff, 0x03, 0xf0, 0x07, 0x00, 0x80, 0xff, 0x03, + 0xfe, 0x01, 0x00, 0x00, 0xf8, 0x7f, 0xe0, 0xff, 0x01, 0x00, 0xf0, 0xff, + 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, + 0x03, 0x80, 0xff, 0x07, 0xf8, 0x01, 0x00, 0x80, 0xff, 0x03, 0xff, 0x01, + 0x00, 0x00, 0xf8, 0x7f, 0xe0, 0xff, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, + 0xf8, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x03, 0x00, + 0xff, 0x0f, 0xf8, 0x01, 0x00, 0x80, 0xff, 0x03, 0xff, 0x01, 0x00, 0x00, + 0xf0, 0x7f, 0xe0, 0xff, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x3f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x03, 0x00, 0xfe, 0x1f, + 0xf8, 0x00, 0x00, 0x80, 0xff, 0x83, 0xff, 0x00, 0x00, 0x00, 0xf0, 0xff, + 0xe0, 0xff, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x03, 0x00, 0xfc, 0x3f, 0x7e, 0x00, + 0x00, 0x80, 0xff, 0xc3, 0xff, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xe0, 0xff, + 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xff, 0x03, 0x00, 0xf8, 0x7f, 0x3e, 0x00, 0x00, 0x80, + 0xff, 0xc3, 0xff, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xe0, 0xff, 0x00, 0x00, + 0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xff, 0x03, 0x00, 0xf8, 0x7f, 0x3f, 0x00, 0x00, 0x80, 0xff, 0xc3, + 0xff, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xe0, 0xff, 0x00, 0x00, 0xf0, 0x7f, + 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, + 0x03, 0x00, 0xf0, 0xff, 0x1f, 0x00, 0x00, 0x80, 0xff, 0xc3, 0xff, 0x00, + 0x00, 0x00, 0xe0, 0xff, 0xe0, 0xff, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, + 0xf8, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0x03, 0x00, + 0xe0, 0xff, 0x0f, 0x00, 0x00, 0x80, 0xff, 0xe3, 0xff, 0x00, 0x00, 0x00, + 0xc0, 0xff, 0xe1, 0xff, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x3f, + 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0x03, 0x00, 0xc0, 0xff, + 0x07, 0x00, 0x00, 0x80, 0xff, 0xe3, 0xff, 0x00, 0x00, 0x00, 0xc0, 0xff, + 0xe1, 0xff, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, + 0x00, 0x00, 0xe0, 0xff, 0x7f, 0xff, 0x03, 0x00, 0x80, 0xff, 0x07, 0x00, + 0x00, 0x80, 0xff, 0xe3, 0xff, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xe1, 0xff, + 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0x00, 0x00, + 0xfc, 0xff, 0x07, 0xff, 0x03, 0x00, 0x80, 0xff, 0x07, 0x00, 0x00, 0x80, + 0xff, 0xe3, 0xff, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xe1, 0xff, 0x00, 0x00, + 0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x3f, + 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0x80, 0xff, 0xe3, + 0xff, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xe0, 0xff, 0x00, 0x00, 0xf0, 0x7f, + 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x07, 0x00, 0xff, + 0x03, 0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0x80, 0xff, 0xe3, 0xff, 0x00, + 0x00, 0x00, 0xc0, 0xff, 0xe0, 0xff, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, + 0xf8, 0x3f, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x01, 0x00, 0xff, 0x03, 0x00, + 0x00, 0xfe, 0x1f, 0x00, 0x00, 0x80, 0xff, 0xe3, 0xff, 0x00, 0x00, 0x00, + 0xc0, 0xff, 0xe0, 0xff, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x1f, + 0x00, 0x00, 0x00, 0xf0, 0xff, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0xff, + 0x3f, 0x00, 0x00, 0x80, 0xff, 0xe3, 0xff, 0x00, 0x00, 0x00, 0xc0, 0xff, + 0xe0, 0xff, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, + 0x00, 0xf8, 0x3f, 0x00, 0x00, 0xff, 0x03, 0x00, 0x80, 0xff, 0x7f, 0x00, + 0x00, 0x80, 0xff, 0xe3, 0xff, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xe0, 0xff, + 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0xfc, + 0x1f, 0x00, 0x00, 0xff, 0x03, 0x00, 0x80, 0xff, 0xff, 0x00, 0x00, 0x80, + 0xff, 0xe3, 0xff, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xe0, 0xff, 0x00, 0x00, + 0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0xfe, 0x1f, 0x00, + 0x00, 0xff, 0x03, 0x00, 0xc0, 0xef, 0xff, 0x01, 0x00, 0x80, 0xff, 0xe3, + 0xff, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xe0, 0xff, 0x00, 0x00, 0xf0, 0x7f, + 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0xfe, 0x0f, 0x00, 0x00, 0xff, + 0x03, 0x00, 0xe0, 0xc7, 0xff, 0x01, 0x00, 0x80, 0xff, 0xe3, 0xff, 0x01, + 0x00, 0x00, 0xc0, 0xff, 0xe0, 0xff, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, + 0xf8, 0x1f, 0x00, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x03, 0x00, + 0xf0, 0x83, 0xff, 0x07, 0x00, 0x80, 0xff, 0xe3, 0xff, 0x01, 0x00, 0x00, + 0xc0, 0x7f, 0xe0, 0xff, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x1f, + 0x00, 0x00, 0x80, 0xff, 0x07, 0x00, 0x00, 0xff, 0x03, 0x00, 0xf8, 0x83, + 0xff, 0x0f, 0x00, 0x80, 0xff, 0xe3, 0xff, 0x01, 0x00, 0x00, 0xc0, 0x7f, + 0xe0, 0xff, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, + 0x80, 0xff, 0x07, 0x00, 0x80, 0xff, 0x03, 0x00, 0xf8, 0x01, 0xff, 0x0f, + 0x00, 0x80, 0xff, 0xc3, 0xff, 0x01, 0x00, 0x00, 0xc0, 0x3f, 0xe0, 0xff, + 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x80, 0xff, + 0x03, 0x00, 0x80, 0xff, 0x03, 0x00, 0xfc, 0x00, 0xfe, 0x1f, 0x00, 0x80, + 0xff, 0xc3, 0xff, 0x03, 0x00, 0x00, 0xe0, 0x3f, 0xe0, 0xff, 0x00, 0x00, + 0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x80, 0xff, 0x03, 0x00, + 0x80, 0xff, 0x03, 0x00, 0xfe, 0x00, 0xfc, 0x3f, 0x00, 0x80, 0xff, 0xc3, + 0xff, 0x03, 0x00, 0x00, 0xe0, 0x3f, 0xe0, 0xff, 0x00, 0x00, 0xf0, 0x7f, + 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x80, 0xff, 0x03, 0x00, 0xc0, 0xff, + 0x03, 0x00, 0x7f, 0x00, 0xf8, 0x7f, 0x00, 0x80, 0xff, 0xc3, 0xff, 0x07, + 0x00, 0x00, 0xe0, 0x1f, 0xe0, 0xff, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, + 0xf8, 0x1f, 0x00, 0x00, 0x80, 0xff, 0x03, 0x00, 0xc0, 0xff, 0x03, 0x80, + 0x3f, 0x00, 0xf8, 0x7f, 0x00, 0x80, 0xff, 0x83, 0xff, 0x07, 0x00, 0x00, + 0xf0, 0x0f, 0xe0, 0xff, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x1f, + 0x00, 0x00, 0x80, 0xff, 0x03, 0x00, 0xe0, 0xff, 0x03, 0x80, 0x1f, 0x00, + 0xf0, 0xff, 0x00, 0x80, 0xff, 0x83, 0xff, 0x0f, 0x00, 0x00, 0xf0, 0x0f, + 0xe0, 0xff, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, + 0x80, 0xff, 0x07, 0x00, 0xe0, 0xff, 0x03, 0xc0, 0x1f, 0x00, 0xf0, 0xff, + 0x01, 0x80, 0xff, 0x83, 0xff, 0x0f, 0x00, 0x00, 0xf0, 0x07, 0xe0, 0xff, + 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x80, 0xff, + 0x07, 0x00, 0xf8, 0xff, 0x03, 0xe0, 0x0f, 0x00, 0xe0, 0xff, 0x03, 0x80, + 0xff, 0x03, 0xff, 0x3f, 0x00, 0x00, 0xf8, 0x03, 0xe0, 0xff, 0x00, 0x00, + 0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x80, 0xff, 0x0f, 0x00, + 0xf8, 0xff, 0x03, 0xf0, 0x07, 0x00, 0xc0, 0xff, 0x07, 0x80, 0xff, 0x03, + 0xfe, 0x7f, 0x00, 0x00, 0xfc, 0x01, 0xe0, 0xff, 0x00, 0x00, 0xf0, 0x7f, + 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x80, 0xff, 0x1f, 0x00, 0xfe, 0xff, + 0x07, 0xf8, 0x07, 0x00, 0xc0, 0xff, 0x0f, 0x80, 0xff, 0x03, 0xfe, 0xff, + 0x00, 0x00, 0xfe, 0x00, 0xe0, 0xff, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, + 0xf8, 0x3f, 0x00, 0x00, 0x80, 0xff, 0x1f, 0x00, 0x7f, 0xff, 0x0f, 0xf8, + 0x07, 0x00, 0x80, 0xff, 0x1f, 0x80, 0xff, 0x03, 0xfc, 0xff, 0x01, 0x00, + 0x7f, 0x00, 0xe0, 0xff, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x3f, + 0x00, 0x00, 0x00, 0xff, 0xff, 0xf1, 0x1f, 0xfe, 0xff, 0xff, 0x03, 0x00, + 0x80, 0xff, 0x3f, 0xc0, 0xff, 0x07, 0xf8, 0xff, 0x1f, 0xf0, 0x3f, 0x00, + 0xf0, 0xff, 0x00, 0x00, 0xf8, 0xff, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, + 0x00, 0xfe, 0xff, 0xff, 0x0f, 0xfe, 0xff, 0xff, 0x03, 0x00, 0x80, 0xff, + 0x7f, 0xc0, 0xff, 0x07, 0xf8, 0xff, 0xff, 0xff, 0x1f, 0x00, 0xf0, 0xff, + 0x01, 0x00, 0xf8, 0xff, 0x00, 0x00, 0xfc, 0x7f, 0x00, 0x00, 0x00, 0xfc, + 0xff, 0xff, 0x07, 0xfe, 0xff, 0xff, 0x07, 0x00, 0xc0, 0xff, 0xff, 0xe0, + 0xff, 0x1f, 0xf0, 0xff, 0xff, 0xff, 0x0f, 0x00, 0xf8, 0xff, 0x03, 0x00, + 0xf8, 0xff, 0x01, 0x00, 0xfc, 0xff, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, + 0x01, 0xfc, 0xff, 0xff, 0x0f, 0x00, 0xe0, 0xff, 0xff, 0xfb, 0xff, 0x3f, + 0xe0, 0xff, 0xff, 0xff, 0x03, 0x00, 0xfe, 0xff, 0x07, 0x00, 0xfc, 0xff, + 0x07, 0x00, 0xfe, 0xff, 0x01, 0x00, 0x00, 0xf0, 0xff, 0x7f, 0x00, 0xfc, + 0xff, 0xff, 0x7f, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xff, + 0xff, 0xff, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x01, 0xff, 0xff, 0x7f, 0x80, + 0xff, 0xff, 0x3f, 0x00, 0x00, 0xc0, 0xff, 0x3f, 0x00, 0xf8, 0xff, 0xff, + 0x3f, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xff, 0xff, 0x3f, + 0x00, 0xc0, 0xff, 0xff, 0xff, 0x80, 0xff, 0xff, 0x7f, 0xc0, 0xff, 0xff, + 0x3f, 0x00, 0x00, 0x00, 0xff, 0x0f, 0x00, 0xf0, 0xff, 0x00, 0x1f, 0x00, + 0xfc, 0x0f, 0xfe, 0xff, 0xcf, 0xff, 0x03, 0xfc, 0xff, 0x0f, 0x00, 0xe0, + 0xff, 0xff, 0x7f, 0x80, 0xff, 0xff, 0x3f, 0xc0, 0xff, 0xff, 0x3f, 0x00, + 0x00, 0x00, 0xf8, 0x03, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x18, 0xc0, 0x01, 0x00, 0x1f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xe0, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xf0, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, + 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x1f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x1f, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00}; +@ + +\section{License} +<>= +--Copyright (c) 2007 Arthur C. Ralfs +--All rights reserved. +-- +--Redistribution and use in source and binary forms, with or without +--modification, are permitted provided that the following conditions are +--met: +-- +-- - Redistributions of source code must retain the above copyright +-- notice, this list of conditions and the following disclaimer. +-- +-- - Redistributions in binary form must reproduce the above copyright +-- notice, this list of conditions and the following disclaimer in +-- the documentation and/or other materials provided with the +-- distribution. +-- +-- - Neither the name of Arthur C. Ralfs nor the +-- names of its contributors may be used to endorse or promote products +-- derived from this software without specific prior written permission. +-- +--THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +--IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +--TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +--PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +--OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +--EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +--PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +--PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +--LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +--NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +--SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +@ + +\eject +\begin{thebibliography}{99} +\bibitem{1} nothing +\end{thebibliography} +\end{document} diff --git a/src/hyper/doctitle.png b/src/hyper/doctitle.png new file mode 100644 index 0000000..cedadc0 Binary files /dev/null and b/src/hyper/doctitle.png differ diff --git a/src/interp/bookvol5.pamphlet b/src/interp/bookvol5.pamphlet index 3c4465e..f2e570a 100644 --- a/src/interp/bookvol5.pamphlet +++ b/src/interp/bookvol5.pamphlet @@ -962,99 +962,65 @@ SpadInterpretStream(str, source, interactive?) == @ \section{The Read-Eval-Print Loop} \subsection{defun intloopReadConsole} -\begin{verbatim} -intloopReadConsole(b, n)== - a:= serverReadLine(_*STANDARD_-INPUT_*) - not STRINGP a => leaveScratchpad() - #a=0 => - PRINC(MKPROMPT()) - intloopReadConsole('"", n) - $DALYMODE and intloopPrefix?('"(",a) => - intnplisp(a) - PRINC(MKPROMPT()) - intloopReadConsole('"",n) - pfx := stripSpaces intloopPrefix?('")fi",a) - pfx and ((pfx = '")fi") or (pfx = '")fin")) => [] - b = '"" and (d := intloopPrefix?('")", a)) => - setCurrentLine d - c := ncloopCommand(d,n) - PRINC(MKPROMPT()) - intloopReadConsole('"", c) - a:=CONCAT(b,a) - ncloopEscaped a => intloopReadConsole(SUBSEQ(a, 0, (LENGTH a) - 1),n) - c := intloopProcessString(a, n) - PRINC(MKPROMPT()) - intloopReadConsole('"", c) -\end{verbatim} +Note that this function relies on the fact that lisp can do tail-recursion. +The function recursively invokes itself. + +The serverReadLine function is a special readline function that handles +communication with the session manager code, which is a separate process +running in parallel. + +We read a line from standard input. +\begin{itemize} +\item If it is a null line then we exit Axiom. +\item If it is a zero length line we prompt and recurse +\item If \$dalymode and open-paren we execute lisp code, prompt and recurse +The \$dalymode will interpret any input that begins with an open-paren +as a lisp expression rather than Axiom input. This is useful for debugging +purposes when most of the input lines will be lisp. Setting \$dalymode +non-nil will certainly break user expectations and is to be used with +caution. +\item If it is ``)fi'' or ``)fin'' we drop into lisp. Use the (restart) + function to return to the interpreter loop. +\item If it starts with ``)'' we process the command, prompt, and recurse +\item If it is a command then we remember the current line, process the + command, prompt, and recurse. +\item If the input has a trailing underscore (Axiom line-continuation) + then we cut off the continuation character and pass the truncated + string to ourselves, prompt, and recurse +\item otherwise we process the input, prompt, and recurse. +\end{itemize} +Notice that all but two paths (a null input or a ``)fi'' or a ``)fin'') +will end up as a recursive call to ourselves. <>= (defun |intloopReadConsole| (b n) - (prog (c d pfx a) - (declare (special $dalymode)) - (return - (progn - (setq a (|serverReadLine| *standard-input*)) - (cond - ((null (stringp a)) - (|leaveScratchpad|)) - ((eql (length a) 0) - (progn - (princ (mkprompt)) - (|intloopReadConsole| "" n))) - ((and $dalymode (|intloopPrefix?| "(" a)) - (progn - (|intnplisp| a) - (princ (mkprompt)) - (|intloopReadConsole| "" n))) - (t - (progn - (setq pfx (|stripSpaces| (|intloopPrefix?| ")fi" a))) - (cond - ((and pfx (or (equal pfx ")fi") (equal pfx ")fin"))) - nil) - ((and (equal b "") (setq d (|intloopPrefix?| ")" a))) - (progn - (|setCurrentLine| d) - (setq c (|ncloopCommand| d n)) - (princ (mkprompt)) - (|intloopReadConsole| "" c))) - (t - (progn - (setq a (concat b a)) - (cond - ((|ncloopEscaped| a) - (|intloopReadConsole| (subseq a 0 (- (length a) 1)) n)) - (t - (progn - (setq c (|intloopProcessString| a n)) - (princ (mkprompt)) - (|intloopReadConsole| "" c)))))))))))))) + (declare (special $dalymode)) + (let (c d pfx input) + (setq input (|serverReadLine| *standard-input*)) + (when (null (stringp input)) (|leaveScratchpad|)) + (when (eql (length input) 0) + (princ (mkprompt)) + (|intloopReadConsole| "" n)) + (when (and $dalymode (|intloopPrefix?| "(" input)) + (|intnplisp| input) + (princ (mkprompt)) + (|intloopReadConsole| "" n)) + (setq pfx (|intloopPrefix?| ")fi" input)) + (when (and pfx (or (string= pfx ")fi") (string= pfx ")fin"))) + (throw '|top-level| nil)) + (when (and (equal b "") (setq d (|intloopPrefix?| ")" input))) + (|setCurrentLine| d) + (setq c (|ncloopCommand| d n)) + (princ (mkprompt)) + (|intloopReadConsole| "" c)) + (setq input (concat b input)) + (when (|ncloopEscaped| input) + (|intloopReadConsole| (subseq input 0 (- (length input) 1)) n)) + (setq c (|intloopProcessString| input n)) + (princ (mkprompt)) + (|intloopReadConsole| "" c))) @ \section{Helper Functions} -\subsection{defun reclaim} -Call the garbage collector on various platforms. -<>= -#+abcl -(defun reclaim () (ext::gc)) -#+:allegro -(defun reclaim () (excl::gc t)) -#+:CCL -(defun reclaim () (gc)) -#+clisp -(defun reclaim () (#+lisp=cl ext::gc #-lisp=cl lisp::gc)) -#+(or :cmulisp :cmu) -(defun reclaim () (ext:gc)) -#+cormanlisp -(defun reclaim () (cl::gc)) -#+(OR IBCL KCL GCL) -(defun reclaim () (si::gbc t)) -#+lispworks -(defun reclaim () (hcl::normal-gc)) -#+Lucid -(defun reclaim () (lcl::gc)) -#+sbcl -(defun reclaim () (sb-ext::gc)) -@ \subsection{defun getenviron} <>= (defun getenviron (shellvar) @@ -1070,6 +1036,7 @@ Call the garbage collector on various platforms. #+sbcl (sb-ext:posix-getenv var) ) @ + \subsection{defun init-memory-config} Austin-Kyoto Common Lisp (AKCL), now known as Gnu Common Lisp (GCL) requires some changes to the default memory setup to run Axiom efficently. @@ -1103,6 +1070,7 @@ This function performs those setup commands. nil) @ + \subsection{defun initroot} Sets up the system to use the {\bf AXIOM} shell variable if we can and default to the {\bf \$spadroot} variable (which was the value @@ -1112,6 +1080,20 @@ of the {\bf AXIOM} shell variable at build time) if we can't. (reroot (or newroot $spadroot (error "setenv AXIOM or (setq $spadroot)")))) @ + +\subsection{defun intloopPrefix?} +If the prefix string is the same as the whole string initial characters +(ignoring spaces in the whole string) then we return the whole string +minus any leading spaces. +<>= +(defun |intloopPrefix?| (prefix whole) + (let ((newprefix (string-left-trim '(#\space) prefix)) + (newwhole (string-left-trim '(#\space) whole))) + (when (<= (length newprefix) (length newwhole)) + (when (string= newprefix newwhole :end2 (length prefix)) + newwhole)))) + +@ \subsection{defun loadExposureGroupData} <>= #+:AKCL @@ -1133,6 +1115,7 @@ of the {\bf AXIOM} shell variable at build time) if we can't. (t nil) )) @ + \subsection{make-absolute-filename} Prefix a filename with the {\bf AXIOM} shell variable. <>= @@ -1140,6 +1123,7 @@ Prefix a filename with the {\bf AXIOM} shell variable. (concatenate 'string $spadroot name)) @ + \subsection{defun makeInitialModemapFrame} \begin{verbatim} makeInitialModemapFrame() == COPY $InitialModemapFrame @@ -1149,6 +1133,45 @@ makeInitialModemapFrame() == COPY $InitialModemapFrame (copy |$InitialModemapFrame|)) @ + +\subsection{defun ncloopEscaped} +The ncloopEscaped function will return true if the last non-blank +character of a line is an underscore, the Axiom line-continuation +character. Otherwise, it returns nil. +<>= +(defun |ncloopEscaped| (x) + (let ((l (length x))) + (dotimes (i l) + (when (char= (char x (- l i 1)) #\_) (return t)) + (unless (char= (char x (- l i 1)) #\space) (return nil))))) + +@ + +\subsection{defun reclaim} +Call the garbage collector on various platforms. +<>= +#+abcl +(defun reclaim () (ext::gc)) +#+:allegro +(defun reclaim () (excl::gc t)) +#+:CCL +(defun reclaim () (gc)) +#+clisp +(defun reclaim () (#+lisp=cl ext::gc #-lisp=cl lisp::gc)) +#+(or :cmulisp :cmu) +(defun reclaim () (ext:gc)) +#+cormanlisp +(defun reclaim () (cl::gc)) +#+(OR IBCL KCL GCL) +(defun reclaim () (si::gbc t)) +#+lispworks +(defun reclaim () (hcl::normal-gc)) +#+Lucid +(defun reclaim () (lcl::gc)) +#+sbcl +(defun reclaim () (sb-ext::gc)) +@ + \subsection{defun reroot} The reroot function is used to reset the important variables used by the system. In particular, these variables are sensitive to the @@ -1180,6 +1203,37 @@ where the [[${SYS}]] variable is the same one set at build time. (setq $current-directory $spadroot)) @ + +\subsection{defun setCurrentLine} +Remember the current line. The cases are: +\begin{itemize} +\item If there is no \$currentLine set it to the input +\item Is the current line a string and the input a string? + Make them into a list +\item Is \$currentLine not a cons cell? Make it one. +\item Is the input a string? Cons it on the end of the list. +\item Otherwise stick it on the end of the list +\end{itemize} +Note I suspect the last two cases do not occur in practice since +they result in a dotted pair if the input is not a cons. However, +this is what the current code does so I won't change it. +<>= +(defun |setCurrentLine| (s) + (cond + ((null |$currentLine|) + (setq |$currentLine| s)) + ((and (stringp |$currentLine|) (stringp s)) + (setq |$currentLine| (list |$currentLine| s))) + ((not (consp |$currentLine|)) + (setq |$currentLine| (cons |$currentLine| s))) + ((stringp s) + (rplacd (last |$currentLine|) (cons s nil))) + (t + (rplacd (last |$currentLine|) s))) + |$currentLine|) + +@ + \subsection{defun statisticsInitialization} <>= (defun |statisticsInitialization| () @@ -1188,6 +1242,278 @@ where the [[${SYS}]] variable is the same one set at build time. nil) @ +\chapter{System Command Handling} +\subsection{defvar \$systemCommands} +The system commands are the top-level commands available in Axiom +that can all be invoked by prefixing the symbol with a closed-paren. +Thus, to see they copyright you type: +\begin{verbatim} + )copyright +\end{verbatim} +New commands need to be added to this table. The command invoked will +be the first entry of the pair and the ``user level'' of the command +will be the second entry. +<>= +(defvar |$systemCommands| nil) + +(eval-when (eval load) + (setq |$systemCommands| + '( + (|abbreviations| . |compiler| ) + (|boot| . |development|) + (|browse| . |development|) + (|cd| . |interpreter|) + (|clear| . |interpreter|) + (|close| . |interpreter|) + (|compiler| . |compiler| ) + (|copyright| . |interpreter|) + (|credits| . |interpreter|) + (|display| . |interpreter|) + (|edit| . |interpreter|) + (|fin| . |development|) + (|frame| . |interpreter|) + (|help| . |interpreter|) + (|history| . |interpreter|) +;; (|input| . |interpreter|) + (|lisp| . |development|) + (|library| . |interpreter|) + (|load| . |interpreter|) + (|ltrace| . |interpreter|) + (|pquit| . |interpreter|) + (|quit| . |interpreter|) + (|read| . |interpreter|) + (|savesystem| . |interpreter|) + (|set| . |interpreter|) + (|show| . |interpreter|) + (|spool| . |interpreter|) + (|summary| . |interpreter|) + (|synonym| . |interpreter|) + (|system| . |interpreter|) + (|trace| . |interpreter|) + (|undo| . |interpreter|) + (|what| . |interpreter|) + (|with| . |interpreter|) + (|workfiles| . |development|) + (|zsystemdevelopment| . |interpreter|) + ))) + +@ + +\subsection{defvar \$SYSCOMMANDS} +This table is used to look up a symbol to see if it might be a command. +<>= +(defvar $SYSCOMMANDS nil) +(eval-when (eval load) + (setq $SYSCOMMANDS (mapcar #'car |$systemCommands|))) + +@ +\subsection{defvar \$noParseCommands} +This is a list of the commands which have their arguments passed verbatim. +Certain functions, such as the lisp function need to be able to handle +all kinds of input that will not be acceptable to the interpreter. +<>= +(defvar |$noParseCommands| nil) +(eval-when (eval load) + (setq |$noParseCommands| + '( |boot| + |copyright| + |credits| + |fin| + |lisp| + |pquit| + |quit| + |suspend| + |synonym| + |system| + ))) + +@ +\subsection{defvar \$tokenCommands} +This is a list of the commands that expect the interpreter to parse +their arguments. Thus the history command expects that Axiom will have +tokenized and validated the input before calling the history function. +<>= +(defvar |$tokenCommands| nil) +(eval-when (eval load) + (setq |$tokenCommands| + '( |abbreviations| + |cd| + |clear| + |close| + |compiler| + |depends| + |display| + |edit| + |frame| + |frame| + |help| + |history| + |input| + |library| + |load| + |ltrace| + |read| + |savesystem| + |set| + |spool| + |undo| + |what| + |with| + |workfiles| + |zsystemdevelopment| + ))) + +@ + +\subsection{defvar \$InitialCommandSynonymAlist} +Axiom can create ``synonyms'' for commands. We create an initial table +of synonyms which are in common use. +<>= +(defvar |$InitialCommandSynonymAlist| nil) +(eval-when (eval load) + (setq |$InitialCommandSynonymAlist| + '( + (|?| . "what commands") + (|ap| . "what things") + (|apr| . "what things") + (|apropos| . "what things") + (|cache| . "set functions cache") + (|cl| . "clear") + (|cls| . "zsystemdevelopment )cls") + (|cms| . "system") + (|co| . "compiler") + (|d| . "display") + (|dep| . "display dependents") + (|dependents| . "display dependents") + (|e| . "edit") + (|expose| . "set expose add constructor") + (|fc| . "zsystemdevelopment )c") + (|fd| . "zsystemdevelopment )d") + (|fdt| . "zsystemdevelopment )dt") + (|fct| . "zsystemdevelopment )ct") + (|fctl| . "zsystemdevelopment )ctl") + (|fe| . "zsystemdevelopment )e") + (|fec| . "zsystemdevelopment )ec") + (|fect| . "zsystemdevelopment )ect") + (|fns| . "exec spadfn") + (|fortran| . "set output fortran") + (|h| . "help") + (|hd| . "system hypertex &") + (|kclam| . "boot clearClams ( )") + (|killcaches| . "boot clearConstructorAndLisplibCaches ( )") + (|patch| . "zsystemdevelopment )patch") + (|pause| . "zsystemdevelopment )pause") + (|prompt| . "set message prompt") + (|recurrence| . "set functions recurrence") + (|restore| . "history )restore") + (|save| . "history )save") + (|startGraphics| . "system $AXIOM/lib/viewman &") + (|startNAGLink| . "system $AXIOM/lib/nagman &") + (|stopGraphics| . "lisp (|sockSendSignal| 2 15)") + (|stopNAGLink| . "lisp (|sockSendSignal| 8 15)") + (|time| . "set message time") + (|type| . "set message type") + (|unexpose| . "set expose drop constructor") + (|up| . "zsystemdevelopment )update") + (|version| . "lisp *yearweek*") + (|w| . "what") + (|wc| . "what categories") + (|wd| . "what domains") + (|who| . "lisp (pprint credits)") + (|wp| . "what packages") + (|ws| . "what synonyms") +))) + +@ +\subsection{defvar \$CommandSynonymAlist} +The actual list of synonyms is initialized to be the same as the +above initial list of synonyms. The user synonyms that are added +during a session are pushed onto this list for later lookup. +<>= +(defvar |$CommandSynonymAlist| nil) +(eval-when (eval load) + (setq |$CommandSynonymAlist| (copy-alist |$InitialCommandSynonymAlist|))) + +@ + +\subsection{defun ncloopCommand} +The \$systemCommandFunction is set in SpadInterpretStream +to point to the function InterpExecuteSpadSystemCommand. +<>= +(defun |ncloopCommand| (line n) + (declare (special |$systemCommandFunction|)) + (let (a) + (cond + ((setq a (|ncloopPrefix?| ")include" line)) + (|ncloopInclude1| a n)) + (t + (funcall |$systemCommandFunction| line) + n)))) + +@ +\subsection{defun ncloopPrefix?} +If we find the prefix string in the whole string starting at position zero +we return the remainder of the string without the leading prefix. +<>= +(defun |ncloopPrefix?| (prefix whole) + (when (eql (search prefix whole) 0) + (subseq whole (length prefix)))) + +@ +\subsection{defun ncloopInclude1} +<>= +(defun |ncloopInclude1| (name n) + (let (a) + (if (setq a (|ncloopIncFileName| name)) + (|ncloopInclude| a n) + n))) + +@ +\subsection{defun ncloopIncFileName} +Returns the first non-blank substring of the given string. +<>= +(defun |ncloopIncFileName| (string) + (let (fn) + (unless (setq fn (|incFileName| string)) + (write-line (concat string " not found"))) + fn)) + +@ + +\subsection{defun ncloopInclude} +Open the file and read it in. The ncloopInclude0 function is part +of the parser and lives in int-top.boot. +<>= +(defun |ncloopInclude| (name n) + (with-open-file (st name) (|ncloopInclude0| st name n))) + +@ + +\subsection{defun incFileName} +Given a string we return the first token from the string which is +the first non-blank substring. +<>= +(defun |incFileName| (x) + (car (|incBiteOff| x))) + +@ + +\subsection{defun incBiteOff} +Takes a sequence and returns the a list of the first token and the +remaining string characters. If there are no remaining string characters +the second string is of length 0. Effectively it "bites off" the first +token in the string. If the string only 0 or more blanks it returns nil. +<>= +(defun |incBiteOff| (x) + (let (blank nonblank) + (setq x (string x)) + (when (setq nonblank (position #\space x :test-not #'char=)) + (setq blank (position #\space x :start nonblank)) + (if blank + (list (subseq x nonblank blank) (subseq x blank)) + (list (subseq x nonblank) ""))))) + +@ \chapter{The History Mechanism} \section{)history} \index{ugSysCmdhistory} @@ -1403,13 +1729,6 @@ into a call of [[fetchOutput(n)]]. The and [[$HistRecord]] \subsection{Initialized history variables} -\begin{verbatim} -SETANDFILEQ($historyFileType,'axh) -SETANDFILEQ($oldHistoryFileName,'last) -SETANDFILEQ($internalHistoryTable,NIL) -SETANDFILEQ($useInternalHistoryTable,NIL) -\end{verbatim} - <>= (defvar |$oldHistoryFileName| '|last| "vm/370 filename name component") (defvar |$historyFileType| '|axh| "vm/370 filename type component") @@ -5342,6 +5661,204 @@ removeUndoLines u == --called by writeInputLines @ +\chapter{The Help Browser Mechanism} +The Axiom book on the help browser is a complete rewrite of the +hyperdoc mechanism. There are several components that were needed +to make this function. Most of the web browser components are +described in bookvol11.pamphlet. This portion describes some of +the design issues needed to support the interface. + +The axServer command takes a port (defaulting to 8085) and a +program to handle the browser interaction (defaulting to multiServ). +The axServer function opens the port, constructs the stream, and +passes the stream to multiServ. The multiServ loop processes one +interaction at a time. + +So the basic process is that the Axiom ``)browse'' command opens a +socket and listens for http requests. Based on the type of request +(either 'GET' or 'POST') and the content of the request, which is +one of: +\begin{itemize} +\item command - algebra request/response +\item lispcall - a lisp s-expression to be evaluated +\item showcall - an Axiom )show command +\end{itemize} +the multiServ function will call a handler function to evaluate +the command line and construct a response. GET requests result +in a new browser page. POST requests result in an inline result. + +Most responses contain the fields: +\begin{itemize} +\item stepnum - this is the Axiom step number +\item command - this is the original command from the browser +\item algebra - this is the Axiom 2D algebra output +\item mathml - this is the MathML version of the Axiom algebra +\item type - this is the type of the Axiom result +\end{itemize} + +\section{Browsers, MathML, and Fonts} +This work has the Firefox browser as its target. Firefox has built-in +support for MathML, javascript, and XMLHttpRequest handling. More details +are available in bookvol11.pamphlet but the very basic machinery for +communication with the browser involves a dance between the browser +and the multiServ function (see the axserver.spad.pamphlet). + +In particular, a simple request is embedded in a web page as: +\begin{verbatim} +
      +
    • + +
      +
    • +
    +\end{verbatim} +which says that this is an html ``input'' field of type ``submit''. +The CSS display class is ``subbut'' which is of a different color +than the surrounding text to make it obvious that you can click on +this field. Clickable fields that have no response text are of class +``noresult''. + +The javascript call to ``makeRequest'' gives the ``id'' of this input +field, which must be unique in the page, as an argument. In this case, +the argument is 'p3'. The ``value'' field holds the display text which +will be passed back to Axiom as a command. + +When the result arrives the ``showanswer'' function will select out +the mathml field of the response, construct the ``id'' of the html +div to hold the response by concatenating the string ``ans'' (answer) +to the ``id'' of the request resulting, in this case, as ``ansp3''. +The ``showanswer'' function will find this div and replace it with a +div containing the mathml result. + +The ``makeRequest'' function is: +\begin{verbatim} + function makeRequest(arg) { + http_request = new XMLHttpRequest(); + var command = commandline(arg); + //alert(command); + http_request.open('POST', '127.0.0.1:8085', true); + http_request.onreadystatechange = handleResponse; + http_request.setRequestHeader('Content-Type', 'text/plain'); + http_request.send("command="+command); + return(false); +\end{verbatim} +It contains a request to open a local server connection to Axiom, +sets ``handleResponse'' as the function to call on reply, sets up +the type of request, fills in the command field, and sends off the +http request. + +When a response is received, the ``handleResponse'' function checks +for the correct reply state, strips out the important text, and +calls ``showanswer''. +\begin{verbatim} + function handleResponse() { + if (http_request.readyState == 4) { + if (http_request.status == 200) { + showanswer(http_request.responseText,'mathAns'); + } else + { + alert('There was a problem with the request.'+ http_request.statusText); + } + } + } +\end{verbatim} +See bookvol11.pamphlet for further details. + +\section{The axServer/multiServ loop} +The basic call to start an Axiom browser listener is: +\begin{verbatim} + )set message autoload off + )set output mathml on + axServer(8085,multiServ)$AXSERV +\end{verbatim} + +This call sets the port, opens a socket, attaches it to a stream, +and then calls ``multiServ'' with that stream. The ``multiServ'' +function loops serving web responses to that port. + +\section{The )browse command} +In order to make the whole process cleaner the function ``)browse'' +handles the details. This code creates the command-line function for )browse + +The browse function does the internal equivalent of the following 3 command +line statments: +\begin{verbatim} + )set message autoload off + )set output mathml on + axServer(8085,multiServ)$AXSERV +\end{verbatim} +which causes Axiom to start serving web pages on port 8085 + +For those unfamiliar with calling algebra from lisp there are a +few points to mention. + +The loadLib needs to be called to load the algebra code into the image. +Normally this is automatic but we are not using the interpreter so +we need to do this ``by hand''. + +Each algebra file contains a "constructor function" which builds the +domain, which is a vector, and then caches the vector so that every +call to the contructor returns an EQ vector, that is, the same vector. +In this case, we call the constructor $\vert$AxiomServer$\vert$ + +The axServer function was mangled internally to +$\vert$AXSERV;axServer;IMV;2$\vert$. +The multiServ function was mangled to $\vert$AXSERV;multiServ;SeV;3$\vert$ +Note well that if you change axserver.spad these names might change +which will generate the error message along the lines of: +\begin{verbatim} + System error: + The function $\vert$AXSERV;axServer;IMV;2$\vert$ is undefined. +\end{verbatim} + +To fix this you need to look at int/algebra/AXSERV.nrlib/code.lsp +and find the new mangled function name. A better solution would +be to dynamically look up the surface names in the domain vector. + +Each Axiom function expects the domain vector as the last argument. +This is not obvious from the call as the interpreter supplies it. +We must do that ``by hand''. + +We don't call the multiServ function. We pass it as a parameter to +the axServer function. When it does get called by the SPADCALL +macro it needs to be a lisp pair whose car is the function and +whose cdr is the domain vector. We construct that pair here as +the second argument to axServer. The third, hidden, argument to +axServer is the domain vector which we supply ``by hand''. + +The socket can be supplied on the command line but defaults to 8085. +Axiom supplies the arguments as a list. +<>= +(defun |browse| (socket) + (let (axserv browser) + (if socket + (setq socket (car socket)) + (setq socket 8085)) + (|set| '(|mes| |auto| |off|)) + (|set| '(|out| |mathml| |on|)) + (|loadLib| '|AxiomServer|) + (setq axserv (|AxiomServer|)) + (setq browser + (|AXSERV;axServer;IMV;2| socket + (cons #'|AXSERV;multiServ;SeV;3| axserv) axserv)))) + +@ +Now we have to bolt it into Axiom. This involves two lookups. + +We create the lisp pair +\begin{verbatim} +(|browse| . |development|) +\end{verbatim} +and cons it into the \$systemCommands command table. This allows the +command to be executed in development mode. This lookup decides if +this command is allowed. It also has the side-effect of putting the +command into the \$SYSCOMMANDS variable which is used to determine +if the token is a command. + +\section{The server support code} + \chapter{Axiom Build-time Functions} \subsection{defun spad-save} The {\bf spad-save} function is just a cover function for more @@ -5420,6 +5937,8 @@ DEBUGSYS=${OBJ}/${SYS}/bin/debugsys <> +<> + <> <> <> @@ -5453,6 +5972,8 @@ DEBUGSYS=${OBJ}/${SYS}/bin/debugsys <> <> +<> +<> <> <> <> @@ -5460,6 +5981,7 @@ DEBUGSYS=${OBJ}/${SYS}/bin/debugsys <> <> <> +<> <> <> @@ -5469,6 +5991,12 @@ DEBUGSYS=${OBJ}/${SYS}/bin/debugsys <> <> +<> +<> +<> +<> +<> +<> <> <> @@ -5495,6 +6023,7 @@ DEBUGSYS=${OBJ}/${SYS}/bin/debugsys <> <> <> +<> <> <> <> diff --git a/src/interp/bootfuns.lisp.pamphlet b/src/interp/bootfuns.lisp.pamphlet index 55f2022..6b57dfe 100644 --- a/src/interp/bootfuns.lisp.pamphlet +++ b/src/interp/bootfuns.lisp.pamphlet @@ -392,7 +392,7 @@ for primitive domains. Also used by putInLocalDomainReferences and optCal.") (def-boot-var |$suffix| "???") (def-boot-val |$Symbol| '(|Symbol|) "???") (def-boot-val |$SymbolOpt| '(|Symbol| . OPT) "???") -(def-boot-var |$systemCommands| "Interpreter>System.boot") +;(def-boot-var |$systemCommands| "Interpreter>System.boot") (def-boot-val |$systemCreation| (currenttime) "???") (def-boot-val |$systemLastChanged| |$systemCreation| "???") diff --git a/src/interp/i-syscmd.boot.pamphlet b/src/interp/i-syscmd.boot.pamphlet index 3f3e57b..0cac608 100644 --- a/src/interp/i-syscmd.boot.pamphlet +++ b/src/interp/i-syscmd.boot.pamphlet @@ -130,9 +130,6 @@ SETANDFILEQ($compileRecurrence,true) SETANDFILEQ($errorReportLevel,'warning) SETANDFILEQ($sourceFileTypes,'(INPUT SPAD BOOT LISP LISP370 META)) -SETANDFILEQ($SYSCOMMANDS,[CAR x for x in $systemCommands]) - - SETANDFILEQ($whatOptions, '( _ operations _ categories _ diff --git a/src/interp/incl.boot.pamphlet b/src/interp/incl.boot.pamphlet index 4e0d0c7..2f82cee 100644 --- a/src/interp/incl.boot.pamphlet +++ b/src/interp/incl.boot.pamphlet @@ -122,16 +122,6 @@ incDrop(n, b) == inclFname(s, info) == incFileName incCommandTail(s, info) -incBiteOff x == - n:=STRPOSL('" ",x,0,true)-- first nonspace - if null n - then false -- all spaces - else - n1:=STRPOSL ('" ",x,n,nil) - if null n1 -- all nonspaces - then [SUBSTRING(x,n,nil),'""] - else [SUBSTRING(x,n,n1-n),SUBSTRING(x,n1,nil)] - incTrunc (n,x)== if #x>n then SUBSTRING(x,0,n) diff --git a/src/interp/int-top.boot.pamphlet b/src/interp/int-top.boot.pamphlet index 2b87d38..59986a4 100644 --- a/src/interp/int-top.boot.pamphlet +++ b/src/interp/int-top.boot.pamphlet @@ -9,112 +9,6 @@ \eject \tableofcontents \eject -\section{intloopReadConsole} - -This is the top level loop when reading from the input console. This -function calls itself after processing the current line. Because of -this it is important that the underlying common lisp supports -tail-recursion. - -Normally we never really exit this function. - -We read a string from the input. The serverReadLine\cite{1} function -is a special readline function that handles communication with the -session manager code, which is a separate process running in parallel. -In the usual case it just returns the current string. - -If the user enters a blank line ([[#a=]]) then just put up another prompt -and then tail-recursively call [[intloopReadConsole]]. - -If the user has set [[$DALYMODE]] to true and the new line starts with -an open parenthesis then the input is assumed to be a lisp expression -and is evaluated by the underlying common lisp. This is useful if you -are doing a lot of debugging. Commands can also be executed in the -underlying common lisp by using the [[)lisp]] command. In either case we -tail-recursively call [[intloopReadConsole]]. - -If the user typed [[)fin]] then we exit the loop and drop into the -underlying common lisp. You can use the [[(restart)]] function call -to return to the top level loop. - -If the input line starts with a close parenthesis we parse the -input line as a command rather than an expression. We execute the command -and then tail-recursively call [[intloopReadConsole]]. - -If the input line contains a trailing underscore, which is the standard -end-of-line escape character, then we continue to read the line by -tail-recursively calling [[intloopReadConsole]]. - -If none of the above conditions occur we simply evaluate the input line -and then tail-recursively call [[intloopReadConsole]]. - -However, there was a small bug in the test for the system command -[[)fin]]. Originally, the test took the form: -\begin{verbatim} - intloopPrefix?('")fin",a) => [] -\end{verbatim} -This test was flawed in two ways. First, it would match {\sl any} -command beginning with [[)fin]]. Second, it would {\sl only} match -names beginning with [[)fin]], although [[)fi]] is an acceptable -abbreviation for this command. The improved test takes the form: -\begin{verbatim} - pfx := stripSpaces intloopPrefix?('")fi",a) - pfx and ((pfx = '")fi") or (pfx = '")fin")) => [] -\end{verbatim} - -\section{intloopPrefix?} -The [[intloopPrefix?(prefix, whole)]] function simply tests if the string -[[prefix]] is a prefix of the string [[whole]]. The original -implementation discounts {\sl any} whitespace in [[whole]] in deciding a -match, when a more sensible behavior would be to discount only leading -whitespace. - -Moreover, the function SUBSTRING\cite{2} was being improperly called. -The reason why this improper call had gone undetected is that -generally [[intloopPrefix?]] is invoked with a prefix string of length -one -- hence the start position for the substring would generally -begin at index [[spaces]] (which is what we want). - -The original code read: -\begin{verbatim} -intloopPrefix?(prefix,whole) == - #prefix > #whole => false - good:=true - spaces := 0 - i := 0 - len := #prefix - wlen := #whole - for j in 0.. while (good and i < len and j < wlen) repeat - good:= (prefix.i = whole.j) or (whole.j = char " ") - if prefix.i = whole.j then i := i+1 - if whole.j = char " " then spaces := spaces + 1 - spaces = wlen => nil - if good then SUBSTRING(whole,#prefix+spaces-1,nil) else good - -\end{verbatim} - -The improved version of [[inloopPrefix?(prefix, whole)]] returns the -string [[whole]] sans leading whitespace if the match succeeds, else nil. - -<>= -intloopPrefix?(prefix,whole) == - #prefix > #whole => false - good := true - leading := true - spaces := 0 - i := 0 - len := #prefix - wlen := #whole - for j in 0.. while (good and i < len and j < wlen) repeat - good := (prefix.i = whole.j) or (leading and (whole.j = char " ")) - if prefix.i = whole.j then i := i+1 - if (whole.j = char " ") and leading then - spaces := spaces + 1 - else leading := false - spaces = wlen => nil - if good then SUBSTRING(whole,spaces,nil) else good - -@ \section{License} <>= -- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. @@ -156,8 +50,6 @@ intloopPrefix?(prefix,whole) == --% INTERPRETER TOP LEVEL -<> - intloopProcess(n,interactive,s)== StreamNull s => n [lines,ptree]:=CAR s @@ -253,24 +145,6 @@ nonBlank str == return value value -ncloopCommand (line,n) == - a:=ncloopPrefix?('")include",line)=> - ncloopInclude1( a,n) - FUNCALL($systemCommandFunction,line) - n - -ncloopEscaped x== - esc :=false - done:=false - for i in (# x) - 1 .. 0 by -1 while not done repeat - done:= - x.i='" ".0 =>false - x.i='"__".0=> - esc:=true - true - true - esc - ncloopDQlines (dq,stream)== StreamNull stream a:= poGlobalLinePosn tokPosn CADR dq @@ -293,13 +167,6 @@ ncloopPrintLines lines == for line in lines repeat WRITE_-LINE CDR line WRITE_-LINE '" " -ncloopIncFileName string== - fn := incFileName string - not fn => - WRITE_-LINE (CONCAT(string, '" not found")) - [] - fn - ncloopParse s== [dq,stream]:=CAR s [lines,rest]:=ncloopDQlines(dq,stream) @@ -312,11 +179,6 @@ ncloopInclude0(st, name, n) == next(function insertpile, next(function lineoftoks,$lines)))) -ncloopInclude1(name,n) == - a:=ncloopIncFileName name - a => ncloopInclude(a,n) - n - incString s== incRenumber incLude(0,[s],0,['"strings"] ,[Top]) ncError() == @@ -373,13 +235,6 @@ ncConversationPhase(fn, args) == for m in $ncMsgList repeat ncPutQ(carrier, 'messages, [m, :ncEltQ(carrier, 'messages)]) -ncloopPrefix?(prefix,whole) == - #prefix > #whole => false - good:=true - for i in 0..#prefix-1 for j in 0.. while good repeat - good:= prefix.i = whole.j - if good then SUBSTRING(whole,#prefix,nil) else good - phBegin id == $convPhase := id if $ncmPhase then intSayKeyedMsg('S2CTP021,[id]) diff --git a/src/interp/intint.lisp.pamphlet b/src/interp/intint.lisp.pamphlet index d132ad8..a4e29f5 100644 --- a/src/interp/intint.lisp.pamphlet +++ b/src/interp/intint.lisp.pamphlet @@ -93,10 +93,6 @@ ;;(defun |intPackageTran| (sex) ;; (|packageTran| sex)) -;;--------------------> NEW DEFINITION (override in i-syscmd.boot.pamphlet) -(defun |stripSpaces| (str) - (string-trim '(#\Space) str)) - ;;(defvar |$SessionManager| |$SessionManager|) ;;(defvar |$EndOfOutput| |$EndOfOutput|) @@ -128,16 +124,6 @@ ;;(defun |setCurrentLine| (s) ;; (setq |$currentLine| s)) -(defun |setCurrentLine| (s) - (setq |$currentLine| - (cond ((null |$currentLine|) s) - ((stringp |$currentLine|) - (cons |$currentLine| - (if (stringp s) (cons s nil) s))) - (t (rplacd (last |$currentLine|) - (if (stringp s) (cons s nil) s)) - |$currentLine|)))) - (defun |intnplisp| (s) (setq |$currentLine| s) (|nplisp| |$currentLine|)) diff --git a/src/interp/nci.lisp.pamphlet b/src/interp/nci.lisp.pamphlet index 51917f5..d6bca72 100644 --- a/src/interp/nci.lisp.pamphlet +++ b/src/interp/nci.lisp.pamphlet @@ -96,9 +96,6 @@ (with-open-file (st name) (|intloopInclude0| st name n))) -(defun |ncloopInclude| (name n) - (with-open-file (st name) - (|ncloopInclude0| st name n))) @ \eject \begin{thebibliography}{99} diff --git a/src/interp/setq.lisp.pamphlet b/src/interp/setq.lisp.pamphlet index 25155d8..c0aa0a8 100644 --- a/src/interp/setq.lisp.pamphlet +++ b/src/interp/setq.lisp.pamphlet @@ -188,88 +188,6 @@ (setq *print-pretty* nil) (setq *print-circle* nil) -;; $SYSCOMMANDS is now defined at the top of i-syscmd.boot - -(SETQ |$systemCommands| '( -;; COMMAND USER LEVEL - )set userlevel - (|abbreviations| . |compiler| ) - (|boot| . |development|) - (|cd| . |interpreter|) - (|clear| . |interpreter|) - (|close| . |interpreter|) - (|compiler| . |compiler| ) - (|copyright| . |interpreter|) - (|credits| . |interpreter|) - (|display| . |interpreter|) - (|edit| . |interpreter|) - (|fin| . |development|) - (|frame| . |interpreter|) - (|help| . |interpreter|) - (|history| . |interpreter|) -;; (|input| . |interpreter|) - (|lisp| . |development|) - (|library| . |interpreter|) - (|load| . |interpreter|) - (|ltrace| . |interpreter|) - (|pquit| . |interpreter|) - (|quit| . |interpreter|) - (|read| . |interpreter|) - (|savesystem| . |interpreter|) - (|set| . |interpreter|) - (|show| . |interpreter|) - (|spool| . |interpreter|) - (|summary| . |interpreter|) - (|synonym| . |interpreter|) - (|system| . |interpreter|) - (|trace| . |interpreter|) - (|undo| . |interpreter|) - (|what| . |interpreter|) - (|with| . |interpreter|) - (|workfiles| . |development|) - (|zsystemdevelopment| . |interpreter|) - )) - -(SETQ |$noParseCommands| '( - |boot| - |copyright| - |credits| - |fin| - |lisp| - |pquit| - |quit| - |suspend| - |synonym| - |system| - )) - -(SETQ |$tokenCommands| '( - |abbreviations| - |cd| - |clear| - |close| - |compiler| - |depends| - |display| - |edit| - |frame| - |frame| - |help| - |history| - |input| - |library| - |load| - |ltrace| - |read| - |savesystem| - |set| - |spool| - |undo| - |what| - |with| - |workfiles| - |zsystemdevelopment| - )) - (SETQ |S:SPADTOK| 'SPADSYSTOK) (SETQ APLMODE NIL) (SETQ RLGENSYMFG NIL) @@ -325,60 +243,6 @@ (SETQ |$spadSystemDisks| '(I J K L)) (SETQ |$functorForm| NIL) -(SETQ |$InitialCommandSynonymAlist| '( - (|?| . "what commands") - (|ap| . "what things") - (|apr| . "what things") - (|apropos| . "what things") - (|cache| . "set functions cache") - (|cl| . "clear") - (|cls| . "zsystemdevelopment )cls") - (|cms| . "system") - (|co| . "compiler") - (|d| . "display") - (|dep| . "display dependents") - (|dependents| . "display dependents") - (|e| . "edit") - (|expose| . "set expose add constructor") - (|fc| . "zsystemdevelopment )c") - (|fd| . "zsystemdevelopment )d") - (|fdt| . "zsystemdevelopment )dt") - (|fct| . "zsystemdevelopment )ct") - (|fctl| . "zsystemdevelopment )ctl") - (|fe| . "zsystemdevelopment )e") - (|fec| . "zsystemdevelopment )ec") - (|fect| . "zsystemdevelopment )ect") - (|fns| . "exec spadfn") - (|fortran| . "set output fortran") - (|h| . "help") - (|hd| . "system hypertex &") - (|kclam| . "boot clearClams ( )") - (|killcaches| . "boot clearConstructorAndLisplibCaches ( )") - (|patch| . "zsystemdevelopment )patch") - (|pause| . "zsystemdevelopment )pause") - (|prompt| . "set message prompt") - (|recurrence| . "set functions recurrence") - (|restore| . "history )restore") - (|save| . "history )save") - (|startGraphics| . "system $AXIOM/lib/viewman &") - (|startNAGLink| . "system $AXIOM/lib/nagman &") - (|stopGraphics| . "lisp (|sockSendSignal| 2 15)") - (|stopNAGLink| . "lisp (|sockSendSignal| 8 15)") - (|time| . "set message time") - (|type| . "set message type") - (|unexpose| . "set expose drop constructor") - (|up| . "zsystemdevelopment )update") - (|version| . "lisp *yearweek*") - (|w| . "what") - (|wc| . "what categories") - (|wd| . "what domains") - (|who| . "lisp (pprint credits)") - (|wp| . "what packages") - (|ws| . "what synonyms") -)) - -(SETQ |$CommandSynonymAlist| (COPY |$InitialCommandSynonymAlist|)) - (SETQ |$spadLibFT| 'LISPLIB) (SETQ |$existingFiles| (MAKE-HASHTABLE 'UEQUAL))