daveg@near.cs.caltech.edu (Dave Gillespie) (10/31/90)
#!/bin/sh # this is part 3 of a multipart archive # do not concatenate these parts, unpack them in order with /bin/sh # file calc.patch continued # CurArch=3 if test ! -r s2_seq_.tmp then echo "Please unpack part 1 first!" exit 1; fi ( read Scheck if test "$Scheck" != $CurArch then echo "Please unpack part $Scheck next!" exit 1; else exit 0; fi ) < s2_seq_.tmp || exit 1 sed 's/^X//' << 'SHAR_EOF' >> calc.patch X! functions of the first and second kinds, respectively. Note that X! in @samp{besJ(n,x)} and @samp{besY(n,x)} the ``order'' parameter X @samp{n} is often an integer, but is not required to be one. X Calc's implementation of the Bessel functions currently limits the X precision to 8 digits, and may not be exact even to that precision. X! Use with care! X X @node Branch Cuts, Random Numbers, Advanced Math Functions, Scientific Functions X @section Branch Cuts and Principal Values X--- 9552,9563 ---- X @tindex besY X The @kbd{f j} (@code{calc-bessel-J}) [@code{besJ}] and @kbd{f y} X (@code{calc-bessel-Y}) [@code{besY}] commands compute the Bessel X! functions of the first and second kinds, respectively. X! In @samp{besJ(n,x)} and @samp{besY(n,x)} the ``order'' parameter X @samp{n} is often an integer, but is not required to be one. X Calc's implementation of the Bessel functions currently limits the X precision to 8 digits, and may not be exact even to that precision. X! Use with care!@refill X X @node Branch Cuts, Random Numbers, Advanced Math Functions, Scientific Functions X @section Branch Cuts and Principal Values X*************** X*** 9488,9501 **** X X @cindex Branch cuts X @cindex Principal values X! All of the logarithmic, trigonometric, and hyperbolic functions are defined X! for complex numbers as well as for reals. This section describes the values X returned in cases where the general result is a family of possible values. X Calc follows section 12.5.3 of Steele's @cite{Common Lisp, the Language} in X these matters. This section will describe each function briefly; for a X more detailed discussion, consult Steele's book. Except as noted below, X these branch cuts also exactly match those implemented by the HP-28C X! calculator. X X Note: The current implementations of these functions with complex arguments X are designed with proper behavior around the branch cuts in mind, @emph{not} X--- 9564,9578 ---- X X @cindex Branch cuts X @cindex Principal values X! All of the logarithmic, trigonometric, and other scientific functions are X! defined for complex numbers as well as for reals. X! This section describes the values X returned in cases where the general result is a family of possible values. X Calc follows section 12.5.3 of Steele's @cite{Common Lisp, the Language} in X these matters. This section will describe each function briefly; for a X more detailed discussion, consult Steele's book. Except as noted below, X these branch cuts also exactly match those implemented by the HP-28C X! calculator.@refill X X Note: The current implementations of these functions with complex arguments X are designed with proper behavior around the branch cuts in mind, @emph{not} X*************** X*** 10025,10032 **** X The @kbd{b t} (@code{calc-rotate-binary}) [@code{rot}] command rotates a X number one bit to the left. The leftmost bit (according to the current X word size) is dropped off the left and shifted in on the right. With a X! numeric prefix argument, the number is rotated the specified number of X! bits to the left or right. X X @node Matrix Functions, Graphics, Binary Functions, Top X @chapter Vector and Matrix Functions X--- 10102,10109 ---- X The @kbd{b t} (@code{calc-rotate-binary}) [@code{rot}] command rotates a X number one bit to the left. The leftmost bit (according to the current X word size) is dropped off the left and shifted in on the right. With a X! numeric prefix argument, the number is rotated that many bits to the left X! or right. X X @node Matrix Functions, Graphics, Binary Functions, Top X @chapter Vector and Matrix Functions X*************** X*** 10166,10192 **** X (Interactively, just use @kbd{v b} twice: once to build a row, then again X to build a matrix of copies of that row.) X X @pindex calc-head X @pindex calc-tail X @tindex head X @tindex tail X! The @code{calc-head} [@code{head}] function returns the first element X! of a vector. The @code{calc-tail} [@code{tail}] function returns the X! vector with its first element removed. In both cases, the argument X! must be a non-empty vector. X X @pindex calc-cons X @tindex cons X! The @code{calc-cons} [@code{cons}] function takes a value @var{h} and a X! vector @var{t} from the stack, and produces the vector whose head is X @var{h} and whose tail is @var{t}. This is similar to @kbd{|}, except X if @var{h} is itself a vector, @kbd{|} will concatenate the two vectors X whereas @code{cons} will insert @var{h} at the front of the vector @var{t}. X X @tindex rhead X @tindex rtail X @tindex rcons X! Each of these three functions also accepts the Inverse flag [@code{rhead}, X @code{rtail}, @code{rcons}] in which case @var{t} represents the X @emph{last} element of the vector instead of the first, with @var{h} X representing the remainder of the vector. Thus the vector X--- 10243,10275 ---- X (Interactively, just use @kbd{v b} twice: once to build a row, then again X to build a matrix of copies of that row.) X X+ @kindex v h X+ @kindex I v h X @pindex calc-head X @pindex calc-tail X @tindex head X @tindex tail X! The @kbd{v h} (@code{calc-head}) [@code{head}] function returns the first X! element of a vector. The @kbd{I v h} (@code{calc-tail}) [@code{tail}] X! function returns the vector with its first element removed. In both X! cases, the argument must be a non-empty vector. X X+ @kindex v k X @pindex calc-cons X @tindex cons X! The @kbd{v k} (@code{calc-cons}) [@code{cons}] function takes a value @var{h} X! and a vector @var{t} from the stack, and produces the vector whose head is X @var{h} and whose tail is @var{t}. This is similar to @kbd{|}, except X if @var{h} is itself a vector, @kbd{|} will concatenate the two vectors X whereas @code{cons} will insert @var{h} at the front of the vector @var{t}. X X+ @kindex H v h X+ @kindex H I v h X+ @kindex H v k X @tindex rhead X @tindex rtail X @tindex rcons X! Each of these three functions also accepts the Hyperbolic flag [@code{rhead}, X @code{rtail}, @code{rcons}] in which case @var{t} represents the X @emph{last} element of the vector instead of the first, with @var{h} X representing the remainder of the vector. Thus the vector X*************** X*** 10439,10445 **** X top of the stack; the mask and target vectors come from the third and X second elements of the stack. This filler is used where the mask is X zero: @samp{vexp([2, 0, 3, 0, 7], [a, b], z)} produces X! @samp{[a, z, c, z, 7]}. X X Another variation on the masking idea is to combine @samp{[a, b, c, d, e]} X with the mask @samp{[1, 0, 1, 0, 1]} to produce @samp{[a, 0, c, 0, e]}. X--- 10522,10532 ---- X top of the stack; the mask and target vectors come from the third and X second elements of the stack. This filler is used where the mask is X zero: @samp{vexp([2, 0, 3, 0, 7], [a, b], z)} produces X! @samp{[a, z, c, z, 7]}. If the filler value is itself a vector, X! then successive values are taken from it, so that the effect is to X! interleave two vectors according to the mask: X! @samp{vexp([2, 0, 3, 7, 0, 0], [a, b], [x, y])} produces X! @samp{[a, x, b, 7, y, 0]}. X X Another variation on the masking idea is to combine @samp{[a, b, c, d, e]} X with the mask @samp{[1, 0, 1, 0, 1]} to produce @samp{[a, 0, c, 0, e]}. X*************** X*** 10548,10554 **** X objects. A set is a collection of objects; any given object can appear X only once in the set. For efficiency Calc stores sets as vectors in X sorted order. Objects in a Calc set can be any of the usual things, X! such as numbers, variables, or formulas. Two set objects are considered X equal if they are identical, except that numerically equal numbers like X the integer 4 and the float 4.0 are considered equal even though they X are not ``identical.'' X--- 10635,10641 ---- X objects. A set is a collection of objects; any given object can appear X only once in the set. For efficiency Calc stores sets as vectors in X sorted order. Objects in a Calc set can be any of the usual things, X! such as numbers, variables, or formulas. Two set elements are considered X equal if they are identical, except that numerically equal numbers like X the integer 4 and the float 4.0 are considered equal even though they X are not ``identical.'' X*************** X*** 10653,10662 **** X list of all variables that appear in the formula, sorted into alphabetic X order. For example, suppose you enter the formula @samp{x + 2y^x}. X The default argument list would be @samp{(x y)}, which means that if X! this function is applied to the arguments @samp{[3, 10]}, the result would X be @samp{3 + 2*10^3}. If you plan to use a certain formula in this X way often, you might consider defining it as a function with @kbd{Z F}. X X If you press @kbd{$} at the operator prompt, the effect is similar to X the apostrophe except that the relevant formula is taken from top-of-stack X instead. The actual vector argument of the @code{calc-apply} command is X--- 10740,10756 ---- X list of all variables that appear in the formula, sorted into alphabetic X order. For example, suppose you enter the formula @samp{x + 2y^x}. X The default argument list would be @samp{(x y)}, which means that if X! this function is applied to the arguments @samp{[3, 10]} the result will X be @samp{3 + 2*10^3}. If you plan to use a certain formula in this X way often, you might consider defining it as a function with @kbd{Z F}. X X+ Another way to specify the arguments to the formula you enter is with X+ @kbd{$}, @kbd{$$}, and so on. For example, @kbd{V M ' $$ + 2$^$$} X+ has the same effect as the previous example. The argument list is X+ automatically taken to be @samp{($$ $)}. (The order of the arguments X+ may seem backwards, but it is analogous to the way normal algebraic X+ entry interacts with the stack.) X+ X If you press @kbd{$} at the operator prompt, the effect is similar to X the apostrophe except that the relevant formula is taken from top-of-stack X instead. The actual vector argument of the @code{calc-apply} command is X*************** X*** 10677,10685 **** X derives from Lisp notation and the theory of functions. Note that there X is no actual Calc function called @code{lambda}; the whole point is that X the @code{lambda} expression is used in its symbolic form, not evaluated X! for an answer.) (Actually, @code{lambda} does have one one special X property: Its arguments are never evaluated; for example, putting X! @samp{lambda(x, x*(2+3))} on the stack will not simplify the @samp{2+3} X until the @code{lambda} is actually applied to some value of @samp{x}.) X X @kindex V R X--- 10771,10779 ---- X derives from Lisp notation and the theory of functions. Note that there X is no actual Calc function called @code{lambda}; the whole point is that X the @code{lambda} expression is used in its symbolic form, not evaluated X! for an answer.) (Actually, @code{lambda} does have one special X property: Its arguments are never evaluated; for example, putting X! @samp{lambda(x, x*(2/3))} on the stack will not simplify the @samp{2/3} X until the @code{lambda} is actually applied to some value of @samp{x}.) X X @kindex V R X*************** X*** 10739,10746 **** X @tindex outer X The @kbd{V O} (@code{calc-outer-product}) command applies a given binary X operator to all possible pairs of elements from two vectors, to produce X! a matrix. For example, @kbd{V O *} with @samp{[a, b]} and @samp{[x, y]} X! on the stack produces a multiplication table @samp{[[a x, a y], [b x, b y]]}. X X @kindex V I X @pindex calc-inner-product X--- 10833,10843 ---- X @tindex outer X The @kbd{V O} (@code{calc-outer-product}) command applies a given binary X operator to all possible pairs of elements from two vectors, to produce X! a matrix. For example, @kbd{V O *} with @samp{[a, b]} and @samp{[x, y, z]} X! on the stack produces a multiplication table: X! @samp{[[a x, a y, a z], [b x, b y, b z]]}. Element @var{r},@var{c} of X! the result matrix is obtained by applying the operator to element @var{r} X! of the lefthand vector and element @var{c} of the righthand vector. X X @kindex V I X @pindex calc-inner-product X*************** X*** 10749,10760 **** X inner product of two vectors or matrices, given a ``multiplicative'' X operator and an ``additive operator.'' These can each actually be any X binary operators; if they are @samp{*} and @samp{+}, respectively, the X! result is a standard matrix multiplication. Each element of the result X! is obtained by mapping the multiplicative operator across a row of the X! lefthand matrix and a column of the righthand matrix, and then reducing X! with the additive operator. Just as for the standard @kbd{*} command, X! this can also do a vector-matrix or matrix-vector inner product, or a X! generalized dot product of two plain vectors. X X @tindex add X @tindex sub X--- 10846,10857 ---- X inner product of two vectors or matrices, given a ``multiplicative'' X operator and an ``additive operator.'' These can each actually be any X binary operators; if they are @samp{*} and @samp{+}, respectively, the X! result is a standard matrix multiplication. Element @var{r},@var{c} of the X! result matrix is obtained by mapping the multiplicative operator across X! row @var{r} of the lefthand matrix and column @var{c} of the righthand X! matrix, and then reducing with the additive operator. Just as for the X! standard @kbd{*} command, this can also do a vector-matrix or matrix-vector X! inner product, or a vector-vector generalized dot product. X X @tindex add X @tindex sub X*************** X*** 10767,10780 **** X In algebraic formulas, these operations can be expressed as X X @example X! apply(@var{oper}, @var{vec}) X! reduce(@var{oper}, @var{vec}) X! rreduce(@var{oper}, @var{vec}) X! accum(@var{oper}, @var{vec}) X! raccum(@var{oper}, @var{vec}) X! map(@var{oper}, @var{v1}, @var{v2}, ...) X! outer(@var{oper}, @var{vec1}, @var{vec2}) X! inner(@var{mul-oper}, @var{add-oper}, @var{vec1}, @var{vec2}) X @end example X X For example, @samp{map(gcd, [10,20,30], x)}. X--- 10864,10877 ---- X In algebraic formulas, these operations can be expressed as X X @example X! V A apply(@var{oper}, @var{vec}) X! V R reduce(@var{oper}, @var{vec}) X! I V R rreduce(@var{oper}, @var{vec}) X! V U accum(@var{oper}, @var{vec}) X! I V U raccum(@var{oper}, @var{vec}) X! V M map(@var{oper}, @var{v1}, @var{v2}, ...) X! V O outer(@var{oper}, @var{vec1}, @var{vec2}) X! V I inner(@var{mul-oper}, @var{add-oper}, @var{vec1}, @var{vec2}) X @end example X X For example, @samp{map(gcd, [10,20,30], x)}. X*************** X*** 10850,10856 **** X--- 10947,10957 ---- X @kbd{V M} or @kbd{V R}; elsewhere they have unrelated meanings X (like @code{calc-algebraic-mode} for @kbd{m a}). X X+ For your convenience, mapping mode keys can be enter shifted or unshifted. X+ Thus @kbd{V M M R +} maps addition by rows. X+ X @kindex m e (mapping modes) X+ @kindex M E (mapping modes) X Use @kbd{m e} to select map-by-elements mode. In this mode, the operator X is applied to each element of the argument matrix, or to corresponding X elements of the argument matrices. For example, mapping by elements X*************** X*** 10861,10866 **** X--- 10962,10968 ---- X X @tindex mapr X @kindex m r (mapping modes) X+ @kindex M R (mapping modes) X Use @kbd{m r} to select map-by-rows mode. In this mode, the operator is X applied to each row of the argument matrix, or to corresponding rows of X the argument matrices. Rows are presented to the operator as plain vectors. X*************** X*** 10872,10882 **** X--- 10974,10986 ---- X X @tindex mapc X @kindex m c (mapping modes) X+ @kindex M C (mapping modes) X Use @kbd{m c} to select map-by-columns mode. Essentially, this transposes X all matrix arguments, maps by rows, then transposes the result. X X @tindex mapa X @kindex m a (mapping modes) X+ @kindex M A (mapping modes) X Use @kbd{m a} to select map-across mode. In this mode, the input is a X single matrix with as many columns as the operator takes arguments. X The columns of the matrix are treated as arguments in a regular vector X*************** X*** 10885,10890 **** X--- 10989,10995 ---- X X @tindex mapd X @kindex m d (mapping modes) X+ @kindex M D (mapping modes) X Use @kbd{m d} to select map-down mode. This mode is analogous to map-across, X except that it treats the rows of the matrix as arguments to the mapping X operation. X*************** X*** 11001,11007 **** X Trail. The @kbd{t y} (@code{calc-trail-yank}) command will be X unable to recover those vectors. If you are working with very X large vectors, this mode will improve the speed of all operations X! that involve the trial. X X @kindex v / X @pindex calc-break-vectors X--- 11106,11112 ---- X Trail. The @kbd{t y} (@code{calc-trail-yank}) command will be X unable to recover those vectors. If you are working with very X large vectors, this mode will improve the speed of all operations X! that involve the trail. X X @kindex v / X @pindex calc-break-vectors X*************** X*** 11017,11026 **** X X The commands for graphing data begin with the @kbd{g} prefix key. X Calc uses GNUPLOT 2.0 to do graphics. These commands will only work X! if GNUPLOT is available on your system. While GNUPLOT sounds like X a relative of GNU Emacs, it is actually completely unrelated. X However, it is free software and can be obtained from the Free X! Software Foundation's machine @samp{prep.ai.mit.edu}. X X @vindex calc-gnuplot-name X If you have GNUPLOT installed on your system but Calc is unable to X--- 11122,11131 ---- X X The commands for graphing data begin with the @kbd{g} prefix key. X Calc uses GNUPLOT 2.0 to do graphics. These commands will only work X! if GNUPLOT is available on your system. (While GNUPLOT sounds like X a relative of GNU Emacs, it is actually completely unrelated. X However, it is free software and can be obtained from the Free X! Software Foundation's machine @samp{prep.ai.mit.edu}.) X X @vindex calc-gnuplot-name X If you have GNUPLOT installed on your system but Calc is unable to X*************** X*** 11027,11033 **** X find it, you may need to set the @code{calc-gnuplot-name} variable X in your @file{.emacs} file. You may also need to set some Lisp X variables to show Calc how to run GNUPLOT on your system; these X! are described at under @kbd{g D} and @kbd{g O} below. If you are X using the X window system, Calc will configure GNUPLOT for you X automatically. X X--- 11132,11138 ---- X find it, you may need to set the @code{calc-gnuplot-name} variable X in your @file{.emacs} file. You may also need to set some Lisp X variables to show Calc how to run GNUPLOT on your system; these X! are described under @kbd{g D} and @kbd{g O} below. If you are X using the X window system, Calc will configure GNUPLOT for you X automatically. X X*************** X*** 11056,11068 **** X Calc guesses at a reasonable number of data points to use. See the X @kbd{g N} command below. X X! If ``y'' is a formula of the form @samp{xy(X, Y)}) then the result is a X parametric plot. The two arguments of the fictitious @code{xy} function X are used as the ``x'' and ``y'' coordinates of the curve, respectively. X In this case the ``x'' vector or interval you specified is not directly X visible in the graph. For example, if ``x'' is the interval @samp{[0..360]} X and ``y'' is the formula @samp{xy(sin(t), cos(t))}, the resulting graph X! will be a circle. X X Also, ``x'' and ``y'' may each be variable names, in which case Calc X looks for suitable vectors, intervals, or formulas stored in those X--- 11161,11174 ---- X Calc guesses at a reasonable number of data points to use. See the X @kbd{g N} command below. X X! If ``y'' is a formula of the form @samp{xy(@var{x}, @var{y})}) then the X! result is a X parametric plot. The two arguments of the fictitious @code{xy} function X are used as the ``x'' and ``y'' coordinates of the curve, respectively. X In this case the ``x'' vector or interval you specified is not directly X visible in the graph. For example, if ``x'' is the interval @samp{[0..360]} X and ``y'' is the formula @samp{xy(sin(t), cos(t))}, the resulting graph X! will be a circle.@refill X X Also, ``x'' and ``y'' may each be variable names, in which case Calc X looks for suitable vectors, intervals, or formulas stored in those X*************** X*** 11078,11084 **** X @cindex @code{PlotRejects} variable X If you store an empty vector in the variable @code{PlotRejects} X (i.e., @kbd{[ ] s PlotRejects}), Calc will append information to X! this record for every data point which was rejected because its X ``x'' or ``y'' values were not real numbers. The result will be X a matrix where each row holds the curve number, data point number, X ``x'' value, and ``y'' value for a rejected data point. X--- 11184,11190 ---- X @cindex @code{PlotRejects} variable X If you store an empty vector in the variable @code{PlotRejects} X (i.e., @kbd{[ ] s PlotRejects}), Calc will append information to X! this vector for every data point which was rejected because its X ``x'' or ``y'' values were not real numbers. The result will be X a matrix where each row holds the curve number, data point number, X ``x'' value, and ``y'' value for a rejected data point. X*************** X*** 11147,11153 **** X X @kindex g j X @pindex calc-graph-juggle X! This @kbd{g j} (@code{calc-graph-juggle}) command moves the curve X at the end of the list (the ``most recently added curve'') to the X front of the list. The next-most-recent curve is thus exposed for X @kbd{g d} or similar commands to use. With @kbd{g j} you can work X--- 11253,11259 ---- X X @kindex g j X @pindex calc-graph-juggle X! The @kbd{g j} (@code{calc-graph-juggle}) command moves the curve X at the end of the list (the ``most recently added curve'') to the X front of the list. The next-most-recent curve is thus exposed for X @kbd{g d} or similar commands to use. With @kbd{g j} you can work X*************** X*** 11164,11170 **** X are then replaced by the file name in the template. The resulting X plotting commands are fed to the GNUPLOT program. See the documentation X for the GNUPLOT program for more specific information. All temporary X! files are removed when plotting is finished. X X If you give a formula for ``y'', Calc will remember all the values that X it calculates for the formula so that later plots can reuse these values. X--- 11270,11276 ---- X are then replaced by the file name in the template. The resulting X plotting commands are fed to the GNUPLOT program. See the documentation X for the GNUPLOT program for more specific information. All temporary X! files are removed when Emacs or GNUPLOT exits. X X If you give a formula for ``y'', Calc will remember all the values that X it calculates for the formula so that later plots can reuse these values. X*************** X*** 11223,11232 **** X graphs that don't specify it explicitly. X X Data points in the graph of a function are normally computed to a X! precision of five digits, regardless of the current precision at X! the time. This is usually more than adequate, there are cases where X it will not be. For example, plotting @samp{1 + x} for @samp{x} in the X! interval @samp{[0 .. 1e-6]} will round all the data points down X to 1.0! Putting the command @samp{set precision @var{n}} in the X @samp{*Gnuplot Commands*} buffer will cause the data to be computed X at precision @var{n} instead of 5. Since this is such a rare case, X--- 11329,11338 ---- X graphs that don't specify it explicitly. X X Data points in the graph of a function are normally computed to a X! precision of five digits, regardless of the current precision at the X! time. This is usually more than adequate, but there are cases where X it will not be. For example, plotting @samp{1 + x} for @samp{x} in the X! interval @samp{[0 ..@: 1e-6]} will round all the data points down X to 1.0! Putting the command @samp{set precision @var{n}} in the X @samp{*Gnuplot Commands*} buffer will cause the data to be computed X at precision @var{n} instead of 5. Since this is such a rare case, X*************** X*** 11273,11279 **** X default behavior of setting the range based on the range of values X in the data, or @samp{$} to take the range from the top of the stack. X Ranges on the stack can be represented as either interval forms or X! vectors: @samp{[@var{min} .. @var{max}]} or @samp{[@var{min}, @var{max}]}. X X @kindex g l X @kindex g L X--- 11379,11385 ---- X default behavior of setting the range based on the range of values X in the data, or @samp{$} to take the range from the top of the stack. X Ranges on the stack can be represented as either interval forms or X! vectors: @samp{[@var{min} ..@: @var{max}]} or @samp{[@var{min}, @var{max}]}. X X @kindex g l X @kindex g L X*************** X*** 11441,11447 **** X algebraic formulas. First, the general sub-formula selection X mechanism is described; this works in conjunction with any Calc X commands. Then, commands for specific algebraic operations are X! described. Finally, the flexiblr @dfn{rewrite rule} mechanism X is discussed. X X The algebraic commands use the @kbd{a} key prefix; selection X--- 11547,11553 ---- X algebraic formulas. First, the general sub-formula selection X mechanism is described; this works in conjunction with any Calc X commands. Then, commands for specific algebraic operations are X! described. Finally, the flexible @dfn{rewrite rule} mechanism X is discussed. X X The algebraic commands use the @kbd{a} key prefix; selection X*************** X*** 12010,12022 **** X selected term from one side of an equation to the other. Given X @samp{a + b = c + d} with @samp{c} selected, the result is X @samp{a + b - c = d}. This command also works if the selected X! term is part of a @samp{*}, @samp{/}, or @samp{^} formula. If the X! term you wish to move is neither the first nor the last term X! of its sum or product, you may need to use @kbd{j L} or @kbd{j R} X! first to move it to one end. The relevant rules variable is X! @code{JumpRules}. X X @kindex j I X @pindex calc-sel-isolate X The @kbd{j I} (@code{calc-sel-isolate}) command isolates the X selected term on its side of an equation. It uses the @kbd{a S} X--- 12116,12126 ---- X selected term from one side of an equation to the other. Given X @samp{a + b = c + d} with @samp{c} selected, the result is X @samp{a + b - c = d}. This command also works if the selected X! term is part of a @samp{*}, @samp{/}, or @samp{^} formula. The X! relevant rules variable is @code{JumpRules}. X X @kindex j I X+ @kindex H j I X @pindex calc-sel-isolate X The @kbd{j I} (@code{calc-sel-isolate}) command isolates the X selected term on its side of an equation. It uses the @kbd{a S} X*************** X*** 12199,12205 **** X X @kindex a b X @pindex calc-substitute X! The @kbd{a b} (@code{calc-substitute}) command substitutes occurrences X of some variable or sub-expression of an expression with a new X sub-expression. For example, substituting @samp{sin(x)} with @samp{cos(y)} X in @samp{2 sin(x)^2 + x sin(x) + sin(2 x)} produces X--- 12303,12309 ---- X X @kindex a b X @pindex calc-substitute X! The @kbd{a b} (@code{calc-substitute}) command substitutes all occurrences X of some variable or sub-expression of an expression with a new X sub-expression. For example, substituting @samp{sin(x)} with @samp{cos(y)} X in @samp{2 sin(x)^2 + x sin(x) + sin(2 x)} produces X*************** X*** 12252,12258 **** X derivative. X X If you use the @code{deriv} function directly in an algebraic formula, X! you can also write @samp{deriv(f,x,x0)} which represents the derivative X of @code{f} with respect to @code{x}, evaluated at the point @samp{x=x0}. X X If the formula being differentiated contains functions which Calc does X--- 12356,12362 ---- X derivative. X X If you use the @code{deriv} function directly in an algebraic formula, X! you can write @samp{deriv(f,x,x0)} which represents the derivative X of @code{f} with respect to @code{x}, evaluated at the point @samp{x=x0}. X X If the formula being differentiated contains functions which Calc does X*************** X*** 12282,12290 **** X X If you use the @code{integ} function directly in an algebraic formula, X you can also write @samp{integ(f,x,v)} which expresses the resulting X! indefinite integral in terms of variable @code{v} instead of @code{x}, X! or @samp{integ(f,x,a,b)}, which represents a definite integral from X! @code{a} to @code{b}. X X The Calculator remembers all the integrals it has done. If conditions X change in a way that would invalidate the old integrals, they will be X--- 12386,12394 ---- X X If you use the @code{integ} function directly in an algebraic formula, X you can also write @samp{integ(f,x,v)} which expresses the resulting X! indefinite integral in terms of variable @code{v} instead of @code{x}. X! With four arguments, @samp{integ(f,x,a,b)} represents a definite integral X! from @code{a} to @code{b}. X X The Calculator remembers all the integrals it has done. If conditions X change in a way that would invalidate the old integrals, they will be X*************** X*** 12613,12619 **** X @kindex a ! X @pindex calc-logical-not X @tindex lnot X! The @kbd{a !} (@code{calc-logical-not}) [@samp{lnot(a)} or @samp{! a}] X function is true if @samp{a} is false (zero), or false if @samp{a} is X true (nonzero). It is left in symbolic form if @samp{a} is not a X number. X--- 12717,12723 ---- X @kindex a ! X @pindex calc-logical-not X @tindex lnot X! The @kbd{a !} (@code{calc-logical-not}) [@samp{lnot(a)} or @samp{!@: a}] X function is true if @samp{a} is false (zero), or false if @samp{a} is X true (nonzero). It is left in symbolic form if @samp{a} is not a X number. X*************** X*** 12622,12628 **** X @pindex calc-logical-if X @tindex if X @cindex Arguments, not evaluated X! The @kbd{a :} (@code{calc-logical-if}) [@samp{if(a,b,c)} or @samp{a ? b : c}] X function is equal to either @samp{b} or @samp{c} if @samp{a} is a nonzero X number or zero, respectively. If @samp{a} is not a number, the test is X left in symbolic form and neither @samp{b} nor @samp{c} is evaluated in X--- 12726,12732 ---- X @pindex calc-logical-if X @tindex if X @cindex Arguments, not evaluated X! The @kbd{a :} (@code{calc-logical-if}) [@samp{if(a,b,c)} or @samp{a ? b :@: c}] X function is equal to either @samp{b} or @samp{c} if @samp{a} is a nonzero X number or zero, respectively. If @samp{a} is not a number, the test is X left in symbolic form and neither @samp{b} nor @samp{c} is evaluated in X*************** X*** 12670,12676 **** X @end example X X Otherwise, @samp{a} is a formula, and the result is a variable which X! represents name of the top-level function call. X X @tindex integer X @tindex real X--- 12774,12780 ---- X @end example X X Otherwise, @samp{a} is a formula, and the result is a variable which X! represents the name of the top-level function call. X X @tindex integer X @tindex real X*************** X*** 12739,12745 **** X one rule you can write it as a plain vector if you wish. (If the X rewrite rule itself contains vectors, it's safest to enclose your X rule in a surrounding vector to avoid ambiguity: @samp{[[[a,b], [b,a]]]} X! is a rule that exchanges the two parts of a 2-vector. This is a pair X of vectors for @samp{old} and @samp{new}, enclosed in brackets to X make a rule, then enclosed again in brackets to make a rule set.) X X--- 12843,12849 ---- X one rule you can write it as a plain vector if you wish. (If the X rewrite rule itself contains vectors, it's safest to enclose your X rule in a surrounding vector to avoid ambiguity: @samp{[[[a,b], [b,a]]]} X! is a rule that exchanges the parts of a 2-vector. This is a pair X of vectors for @samp{old} and @samp{new}, enclosed in brackets to X make a rule, then enclosed again in brackets to make a rule set.) X X*************** X*** 13096,13102 **** X always simplify to a literal addition like @samp{f((-y) + x)}. X X @node Other Features of Rewrite Rules, Nested Formulas with Rewrite Rules, Algebraic Properties of Rewrite Rules, Rewrite Rules X! @subsection Conditional Rewrite Rules X X Certain ``function names'' serve as markers in rewrite rules. X Here is a complete list of these markers. First are listed the X--- 13200,13206 ---- X always simplify to a literal addition like @samp{f((-y) + x)}. X X @node Other Features of Rewrite Rules, Nested Formulas with Rewrite Rules, Algebraic Properties of Rewrite Rules, Rewrite Rules X! @subsection Other Features of Rewrite Rules X X Certain ``function names'' serve as markers in rewrite rules. X Here is a complete list of these markers. First are listed the X*************** X*** 13170,13176 **** X @tindex condition X This matches the pattern @samp{x}, with the attached condition X @samp{c}. The rule @samp{[condition(f(n x), integer(n)), n f(x)]} X! is functionally equivalent to @samp{[f(n x), n f(x), integer(n)]}. X While it may seem more efficient to put the condition inside X the rule as in @samp{f(condition(n,integer(n)) x)}, Calc is X actually smart enough to test a condition as soon as all the X--- 13274,13280 ---- X @tindex condition X This matches the pattern @samp{x}, with the attached condition X @samp{c}. The rule @samp{[condition(f(n x), integer(n)), n f(x)]} X! is functionally equivalent to the rule @samp{[f(n x), n f(x), integer(n)]}. X While it may seem more efficient to put the condition inside X the rule as in @samp{f(condition(n,integer(n)) x)}, Calc is X actually smart enough to test a condition as soon as all the X*************** X*** 13256,13263 **** X X @item plain(x) X Special properties of and simplifications for the function call X! @samp{x} are not used. Meta-variables in the arguments of @samp{x} X! are substituted as usual. X X @item cons(h,t) X Where @samp{t} is a vector, this is converted into an expanded X--- 13360,13371 ---- X X @item plain(x) X Special properties of and simplifications for the function call X! @samp{x} are not used. One interesting case where @code{plain} X! is useful is the rule, @samp{[q(x), quote(x)]}, trying to expand a X! shorthand notation for the @code{quote} function. This rule will X! not work as shown; instead of replacing @samp{q(foo)} with X! @samp{quote(foo)}, it will replace it with @samp{foo}! The correct X! rule would be @samp{[q(x), plain(quote(x))]}. X X @item cons(h,t) X Where @samp{t} is a vector, this is converted into an expanded X*************** X*** 13268,13275 **** X have been turned off. X X @item rcons(t,h) X! Analogous to @code{cons} except putting @code{h} at the @emph{end} of X! the vector. X X @item apply(f,args) X Where @samp{f} is a variable and @samp{args} is a vector, this X--- 13376,13383 ---- X have been turned off. X X @item rcons(t,h) X! Analogous to @code{cons} except putting @samp{h} at the @emph{end} of X! the vector @samp{t}. X X @item apply(f,args) X Where @samp{f} is a variable and @samp{args} is a vector, this X*************** X*** 13293,13299 **** X X @item evalextsimp(x) X @tindex evalextsimp X! The formula @samp{x} has meta-variables substitited in the normal X way, then ``extendedly'' simplified as if by the @kbd{a e} command. X X @item select(x) X--- 13401,13407 ---- X X @item evalextsimp(x) X @tindex evalextsimp X! The formula @samp{x} has meta-variables substituted in the normal X way, then ``extendedly'' simplified as if by the @kbd{a e} command. X X @item select(x) X*************** X*** 13437,13444 **** X @samp{select( )} calls in rewrite rules. For example, if you used the X above rule @samp{[select(a)^x, select(a)]} with @kbd{a r}, it would apply X the rule as if it were @samp{[a^x, a]}. Thus, you can write general X! purpose rules that include @samp{select( )} hints inside them so X! that they will ``do the right thing'' in both @kbd{a r} and @kbd{j r}, X both with and without selections. X X @node Matching Commands, Examples of Rewrite Rules, Selections with Rewrite Rules, Rewrite Rules X--- 13545,13552 ---- X @samp{select( )} calls in rewrite rules. For example, if you used the X above rule @samp{[select(a)^x, select(a)]} with @kbd{a r}, it would apply X the rule as if it were @samp{[a^x, a]}. Thus, you can write general X! purpose rules with @samp{select( )} hints inside them so that they X! will ``do the right thing'' in both @kbd{a r} and @kbd{j r}, X both with and without selections. X X @node Matching Commands, Examples of Rewrite Rules, Selections with Rewrite Rules, Rewrite Rules X*************** X*** 13452,13458 **** X vector of patterns, or a variable which contains patterns, or X you can give a blank response in which case the patterns are taken X from the top of the stack. The pattern set will be compiled once X! and saved if it is stored in a variable. X X For example, @samp{match(a+b, [x, x+y, x-y, 7, x+y+z])} X will return @samp{[x+y, x-y, x+y+z]}. X--- 13560,13568 ---- X vector of patterns, or a variable which contains patterns, or X you can give a blank response in which case the patterns are taken X from the top of the stack. The pattern set will be compiled once X! and saved if it is stored in a variable. If there are several X! patterns in the set, vector elements are kept if they match any X! of the patterns. X X For example, @samp{match(a+b, [x, x+y, x-y, 7, x+y+z])} X will return @samp{[x+y, x-y, x+y+z]}. X*************** X*** 13829,13835 **** X will be left alone even if you press @kbd{=} (@code{calc-evaluate}). X To return a variable to the void state, use @code{calc-unstore}. An X easy keyboard shortcut for this command is @kbd{s} (@code{calc-store}) X! with any numeric prefix argument: @kbd{C-u s foo @key{RET}} X This form does not use the value on X the top of the stack; it simply removes any value that may already be X defined for the specified variable.@refill X--- 13939,13945 ---- X will be left alone even if you press @kbd{=} (@code{calc-evaluate}). X To return a variable to the void state, use @code{calc-unstore}. An X easy keyboard shortcut for this command is @kbd{s} (@code{calc-store}) X! with any numeric prefix argument: @kbd{C-u s foo @key{RET}}. X This form does not use the value on X the top of the stack; it simply removes any value that may already be X defined for the specified variable.@refill X*************** X*** 13992,13998 **** X command works successfully, it does an automatic @kbd{M-x calc} to enter X the Calculator buffer. X X! The @kbd{M-#} key with a prefix argument of -1 as in (@kbd{M-- M-#}) is X equivalent to @code{calc-grab-region} (with no prefix argument). X X Each line of the grabbed area becomes a row of the matrix. The result X--- 14102,14108 ---- X command works successfully, it does an automatic @kbd{M-x calc} to enter X the Calculator buffer. X X! The @kbd{M-#} key with a prefix argument of -1 (as in @kbd{M-- M-#}) is X equivalent to @code{calc-grab-region} (with no prefix argument). X X Each line of the grabbed area becomes a row of the matrix. The result X*************** X*** 14031,14037 **** X mode, the region is never interpreted as a rectangle. X X If a different language has been specified (@pxref{Language Modes}), X! the grabbed text will be interpreted according to the that language. X X @xref{Matrix Functions}, to see how to pull the matrix apart into its X constituent rows and columns. (If it is a 1x1 matrix, just hit @kbd{v u} X--- 14141,14147 ---- X mode, the region is never interpreted as a rectangle. X X If a different language has been specified (@pxref{Language Modes}), X! the grabbed text will be interpreted according to that language. X X @xref{Matrix Functions}, to see how to pull the matrix apart into its X constituent rows and columns. (If it is a 1x1 matrix, just hit @kbd{v u} X*************** X*** 14041,14047 **** X wish to sum. Go to one corner of the column and press @kbd{C-@@} to X set the mark; go to the other corner and type @kbd{M-x calc-grab-region}. X This will grab the column of numbers into the calculator in the form X! of column matrix. Press @kbd{v t} to transpose this into a row matrix. X Press @kbd{v u} to unpack this into a simple vector. (Recall, a one-row X matrix is a vector of a single vector.) Then, type @kbd{V R +} to X compute the sum. X--- 14151,14157 ---- X wish to sum. Go to one corner of the column and press @kbd{C-@@} to X set the mark; go to the other corner and type @kbd{M-x calc-grab-region}. X This will grab the column of numbers into the calculator in the form X! of a column matrix. Press @kbd{v t} to transpose this into a row matrix. X Press @kbd{v u} to unpack this into a simple vector. (Recall, a one-row X matrix is a vector of a single vector.) Then, type @kbd{V R +} to X compute the sum. X*************** X*** 14231,14237 **** X performing their usual functions. Press @kbd{C-x )} to end recording. X Press shift-@kbd{K} (or the standard Emacs key sequence @kbd{C-x e}) to X execute your keyboard macro by replaying the recorded keystrokes. X! @xref{Keyboard Macros, , , emacs, the Emacs manual}, for further X information.@refill X X When you use @kbd{K} to invoke a keyboard macro, the entire macro is X--- 14341,14347 ---- X performing their usual functions. Press @kbd{C-x )} to end recording. X Press shift-@kbd{K} (or the standard Emacs key sequence @kbd{C-x e}) to X execute your keyboard macro by replaying the recorded keystrokes. X! @xref{Keyboard Macros, , , emacs, the Emacs Manual}, for further X information.@refill X X When you use @kbd{K} to invoke a keyboard macro, the entire macro is X*************** X*** 14333,14345 **** X tests which conveniently produce 1 for true and 0 for false. X X For example, @kbd{@key{RET} 0 a < Z [ n Z ]} implements an absolute-value X! function as a keyboard macro. To program this macro, type @kbd{C-x (}, X type the above sequence of keystrokes, then type @kbd{C-x )}. Note that X the keystrokes will be executed while you are making the definition as X well as when you later re-execute the macro by typing @kbd{K}. Thus you X should make sure a suitable number is on the stack before defining the X macro to make sure you don't get a stack-underflow error during the X! definition process. X X The above macro duplicates the number on the top of the stack, pushes X zero and compares using @kbd{a <} (@code{calc-less-than}), then, if X--- 14443,14456 ---- X tests which conveniently produce 1 for true and 0 for false. X X For example, @kbd{@key{RET} 0 a < Z [ n Z ]} implements an absolute-value X! function in the form of a keyboard macro. To program this macro, type X! @kbd{C-x (}, X type the above sequence of keystrokes, then type @kbd{C-x )}. Note that X the keystrokes will be executed while you are making the definition as X well as when you later re-execute the macro by typing @kbd{K}. Thus you X should make sure a suitable number is on the stack before defining the X macro to make sure you don't get a stack-underflow error during the X! definition process.@refill X X The above macro duplicates the number on the top of the stack, pushes X zero and compares using @kbd{a <} (@code{calc-less-than}), then, if X*************** X*** 14525,14530 **** X--- 14636,14648 ---- X be when you invoke your macro, it's best to use prefix arguments X for all mode-setting commands inside the macro. X X+ In fact, @kbd{C-u Z `} is like @kbd{Z `} except that it sets the modes X+ listed above to their default values. As usual, the matching @kbd{Z '} X+ will restore the modes to their settings from before the @kbd{C-u Z `}. X+ Also, @kbd{Z `} with a negative prefix argument resets the mapping X+ direction and algebraic mode to their defaults but leaves the other X+ modes the same as their values outside the construct. X+ X The contents of the stack and trail, values of non-quick variables, and X other settings such as the language mode and the various display modes, X are @emph{not} affected by @kbd{Z `} and @kbd{Z '}. X*************** X*** 14548,14554 **** X This command allows your keyboard macros to accept numbers or formulas X as interactive input. All the normal conventions of algebraic input, X including the use of @kbd{$} characters, are supported. X! @xref{Kbd Macro Query, , , emacs, the Emacs manual}, for a description of X @kbd{C-x q} (@code{kbd-macro-query}), the standard Emacs way to accept X keyboard input during a keyboard macro. In particular, you can use X @kbd{C-x q} to enter a recursive edit, which allows the user to perform X--- 14666,14672 ---- X This command allows your keyboard macros to accept numbers or formulas X as interactive input. All the normal conventions of algebraic input, X including the use of @kbd{$} characters, are supported. X! @xref{Kbd Macro Query, , , emacs, the Emacs Manual}, for a description of X @kbd{C-x q} (@code{kbd-macro-query}), the standard Emacs way to accept X keyboard input during a keyboard macro. In particular, you can use X @kbd{C-x q} to enter a recursive edit, which allows the user to perform X*************** X*** 15058,15063 **** X--- 15176,15182 ---- X @var{body}) X @end example X X+ @noindent X where each @var{param} is either a symbol or a list of the form X X @example X*************** X*** 15412,15418 **** X @subsubsection Keyboard Macros X X If the separator symbol is @code{macro}, the first argument must be a X! string of characters which Calc executes as a sequence of keystroke. X This switches into the Calc buffer for the duration of the macro. X For example, @samp{(calc-eval "vx5\rVR+" 'macro)} pushes the X vector @samp{[1,2,3,4,5]} on the stack and then replaces it X--- 15531,15537 ---- X @subsubsection Keyboard Macros X X If the separator symbol is @code{macro}, the first argument must be a X! string of characters which Calc can execute as a sequence of keystrokes. X This switches into the Calc buffer for the duration of the macro. X For example, @samp{(calc-eval "vx5\rVR+" 'macro)} pushes the X vector @samp{[1,2,3,4,5]} on the stack and then replaces it X*************** X*** 15503,15510 **** X which is not a Lisp list. X X Large integers are stored as a list of the form @samp{(bigpos @var{d0} X! @var{d1} @var{d2} @dots{}} for positive integers 1000000 or more, or X! @samp{(bigneg @var{d0} @var{d1} @var{d2} @dots{}} for negative integers X -1000000 or less. Each @var{d} is a base-1000 ``digit,'' a Lisp integer X from 0 to 999. The least significant digit is @var{d0}; the last digit, X @var{dn}, which is always nonzero, is the most significant digit. For X--- 15622,15629 ---- X which is not a Lisp list. X X Large integers are stored as a list of the form @samp{(bigpos @var{d0} X! @var{d1} @var{d2} @dots{})} for positive integers 1000000 or more, or X! @samp{(bigneg @var{d0} @var{d1} @var{d2} @dots{})} for negative integers X -1000000 or less. Each @var{d} is a base-1000 ``digit,'' a Lisp integer X from 0 to 999. The least significant digit is @var{d0}; the last digit, X @var{dn}, which is always nonzero, is the most significant digit. For X*************** X*** 15544,15551 **** X Polar complex numbers are stored in the form @samp{(polar @var{r} X @var{theta})}, where @var{r} is a positive real value and @var{theta} X is a real value or HMS form representing an angle. This angle is X! usually normalized to lie in the interval @samp{(-180 .. 180)} degrees, X! or @samp{(-pi .. pi)} radians, according to the current angular mode. X If the angle is 0 the value is converted to a real number automatically. X (If the angle is 180 degrees, the value is usually also converted to a X negative real number.)@refill X--- 15663,15670 ---- X Polar complex numbers are stored in the form @samp{(polar @var{r} X @var{theta})}, where @var{r} is a positive real value and @var{theta} X is a real value or HMS form representing an angle. This angle is X! usually normalized to lie in the interval @samp{(-180 ..@: 180)} degrees, X! or @samp{(-pi ..@: pi)} radians, according to the current angular mode. X If the angle is 0 the value is converted to a real number automatically. X (If the angle is 180 degrees, the value is usually also converted to a X negative real number.)@refill X*************** X*** 15553,15564 **** X Hours-minutes-seconds forms are stored as @samp{(hms @var{h} @var{m} X @var{s})}, where @var{h} is an integer or an integer-valued float (i.e., X a float with @samp{@var{exp} >= 0}), @var{m} is an integer or integer-valued X! float in the range @samp{[0 .. 60)}, and @var{s} is any real number in the X! range @samp{[0 .. 60)}.@refill X X Modulo forms are stored as @samp{(mod @var{n} @var{m})}, where @var{m} is a X positive real number or HMS form, and @var{n} is a real number or HMS X! form in the range @samp{[0 .. @var{m})}. X X Error forms are stored as @samp{(sdev @var{x} @var{sigma})}, where @var{x} X is the mean value and @var{sigma} is the standard deviation. Each X--- 15672,15683 ---- X Hours-minutes-seconds forms are stored as @samp{(hms @var{h} @var{m} X @var{s})}, where @var{h} is an integer or an integer-valued float (i.e., X a float with @samp{@var{exp} >= 0}), @var{m} is an integer or integer-valued X! float in the range @samp{[0 ..@: 60)}, and @var{s} is any real number in the X! range @samp{[0 ..@: 60)}.@refill X X Modulo forms are stored as @samp{(mod @var{n} @var{m})}, where @var{m} is a X positive real number or HMS form, and @var{n} is a real number or HMS X! form in the range @samp{[0 ..@: @var{m})}. X X Error forms are stored as @samp{(sdev @var{x} @var{sigma})}, where @var{x} X is the mean value and @var{sigma} is the standard deviation. Each X*************** X*** 17405,17411 **** X @node Installation, Reporting Bugs, Programming, Top X @chapter Installation X X! Calc 1.06 comes as a pair of Emacs Lisp files, generally called X @file{calc.el} and @file{calc-ext.el}. The first contains the basic X foundations of the Calculator, and is as small as possible to promote X quick loading. The second contains all the more advanced commands and X--- 17524,17530 ---- X @node Installation, Reporting Bugs, Programming, Top X @chapter Installation X X! Calc 1.07 comes as a pair of Emacs Lisp files, generally called X @file{calc.el} and @file{calc-ext.el}. The first contains the basic X foundations of the Calculator, and is as small as possible to promote X quick loading. The second contains all the more advanced commands and X*************** X*** 17446,17452 **** X Test your installation as described at the end of these instructions. X X @item X! (Optional.) To print a hardcopy of the Calc manual (about 300 pages), X move to the Calc home directory and type @file{tex calc.texinfo}, X then @file{texindex calc.??}, then @file{tex calc.texinfo} again. X Now print the resulting @file{calc.dvi} file using whatever command X--- 17565,17571 ---- X Test your installation as described at the end of these instructions. X X @item X! (Optional.) To print a hardcopy of the Calc manual (about 350 pages), X move to the Calc home directory and type @file{tex calc.texinfo}, X then @file{texindex calc.??}, then @file{tex calc.texinfo} again. X Now print the resulting @file{calc.dvi} file using whatever command X*************** X*** 17499,17510 **** X @end example X X where @file{.../calc.elc} represents the full path to the @file{calc.elc} X! file, and similarly for @file{.../calc-ext.elc}. If you have installed X these files in Emacs' main @file{lisp/} directory, you can just write X @samp{"calc.elc"} and @samp{"calc-ext.elc"}. If you have used the X @code{calc-install} method and the home directory you chose is called, X say, @file{/usr/gnu/src/calc}, then you would need to write X! @samp{"/usr/gnu/src/calc/calc.elc"} and similarly for @samp{calc-ext.elc}. X X The @code{autoload} command for @code{calc} is what loads @file{calc.elc} X when you type @kbd{M-x calc}. The @code{autoload} for @code{calc-extensions} X--- 17618,17632 ---- X @end example X X where @file{.../calc.elc} represents the full path to the @file{calc.elc} X! file, and similarly for the file @file{.../calc-ext.elc}. X! If you have installed X these files in Emacs' main @file{lisp/} directory, you can just write X @samp{"calc.elc"} and @samp{"calc-ext.elc"}. If you have used the X @code{calc-install} method and the home directory you chose is called, X say, @file{/usr/gnu/src/calc}, then you would need to write X! @c the full pathname X! @samp{"/usr/gnu/src/calc/calc.elc"} and similarly for X! @samp{calc-ext.elc}.@refill X X The @code{autoload} command for @code{calc} is what loads @file{calc.elc} X when you type @kbd{M-x calc}. The @code{autoload} for @code{calc-extensions} X*************** X*** 17538,17550 **** X inserts the necessary @code{autoload} commands into @file{calc.el} and X the @file{calc-ext.el} to refer to the parts of them that were moved X to other files. These @code{autoload} commands point to the directory X! you did your @code{calc-install} in, so if you move Calc to a new home X! you'll have to do the @code{calc-install} over again there. X Note that you will still need to install the @code{autoload} commands X shown above so that Emacs can find the two main Calc files.@refill X X The @code{calc-install} command also formats the manual, assuming X! you have placed @file{calc.texinfo} in the same directory. X X If you'd rather split and compile the Calculator from the Unix shell X or a Makefile, you can use the command X--- 17660,17681 ---- X inserts the necessary @code{autoload} commands into @file{calc.el} and X the @file{calc-ext.el} to refer to the parts of them that were moved X to other files. These @code{autoload} commands point to the directory X! you did your @code{calc-install} in. X Note that you will still need to install the @code{autoload} commands X shown above so that Emacs can find the two main Calc files.@refill X X+ The Lisp variable @code{calc-autoload-directory} can be set to a X+ directory name, including the trailing @samp{/}, which the @code{autoload} X+ commands should use instead of the original installation directory. X+ Calc examines this variable when it is loaded, so you can set it in X+ your @file{.emacs} or @file{default} file if you move Calc after X+ you have done your @code{calc-install}. Note that this applies X+ only to the @code{autoload} commands created by the splitting X+ procedure; you will have to change the ones you wrote yourself X+ by hand. X+ X The @code{calc-install} command also formats the manual, assuming X! you have placed the file @file{calc.texinfo} in the same directory. X X If you'd rather split and compile the Calculator from the Unix shell X or a Makefile, you can use the command X*************** X*** 17650,17656 **** X to save. The result will be a collection of files whose names begin X with @file{calc-info}. The @code{calc-install} command does this for you. X You can also format this into a printable document using @TeX{}, X! but beware, the manual is almost 300 printed pages! X X @vindex calc-info-filename X There is a Lisp variable called @code{calc-info-filename} which holds X--- 17781,17787 ---- X to save. The result will be a collection of files whose names begin X with @file{calc-info}. The @code{calc-install} command does this for you. X You can also format this into a printable document using @TeX{}, X! but beware, the manual is over 300 printed pages! X X @vindex calc-info-filename X There is a Lisp variable called @code{calc-info-filename} which holds X*************** X*** 17692,17698 **** X Finally, press @kbd{M-#} again to make sure the Calculator can exit. X X You may also wish to test the GNUPLOT interface; to plot a sine wave, X! type @kbd{' [0 .. 360], sin(x) RET g f}. X X X (The above text is included in both the Calc documentation and the X--- 17823,17829 ---- X Finally, press @kbd{M-#} again to make sure the Calculator can exit. X X You may also wish to test the GNUPLOT interface; to plot a sine wave, X! type @kbd{' [0 ..@: 360], sin(x) RET g f}. X X X (The above text is included in both the Calc documentation and the XFiles macedit.el and ../dist/macedit.el are identical SHAR_EOF chmod 0666 calc.patch || echo "restore of calc.patch fails" rm -f s2_seq_.tmp echo "You have unpacked the last part" exit 0 -- Dave Gillespie 256-80 Caltech Pasadena CA USA 91125 daveg@csvax.cs.caltech.edu, ...!cit-vax!daveg