aboutsummaryrefslogtreecommitdiffstats
path: root/doc/misc
diff options
context:
space:
mode:
authorJoakim Verona2011-11-22 15:46:22 +0100
committerJoakim Verona2011-11-22 15:46:22 +0100
commita9c1e05adddf6011c61c0df582c5f2ed423f35c8 (patch)
tree489fac119296416ba2f3530fd3bcb70efbbbdaa6 /doc/misc
parent40bb789236e486a3f36eefb2840c293369ce2af3 (diff)
parentb5afc20930c91159a1cbf629bcaa7e251653dc74 (diff)
downloademacs-a9c1e05adddf6011c61c0df582c5f2ed423f35c8.tar.gz
emacs-a9c1e05adddf6011c61c0df582c5f2ed423f35c8.zip
upstream
Diffstat (limited to 'doc/misc')
-rw-r--r--doc/misc/ChangeLog16
-rw-r--r--doc/misc/ada-mode.texi2
-rw-r--r--doc/misc/autotype.texi2
-rw-r--r--doc/misc/calc.texi1102
-rw-r--r--doc/misc/cc-mode.texi2
-rw-r--r--doc/misc/dbus.texi2
-rw-r--r--doc/misc/dired-x.texi2
-rw-r--r--doc/misc/ede.texi6
-rw-r--r--doc/misc/eieio.texi4
-rw-r--r--doc/misc/eshell.texi2
-rw-r--r--doc/misc/faq.texi2
-rw-r--r--doc/misc/gnus-coding.texi10
-rw-r--r--doc/misc/gnus-news.texi2
-rw-r--r--doc/misc/gnus.texi27
-rw-r--r--doc/misc/message.texi2
-rw-r--r--doc/misc/org.texi2
-rw-r--r--doc/misc/sem-user.texi2
-rw-r--r--doc/misc/semantic.texi2
-rw-r--r--doc/misc/tramp.texi2
19 files changed, 595 insertions, 596 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index 924f3501bfa..43d9ba1b1e6 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,3 +1,19 @@
12011-11-20 Glenn Morris <rgm@gnu.org>
2
3 * gnus.texi (Group Information):
4 Remove gnus-group-fetch-faq, command deleted 2010-09-24.
5
62011-11-20 Juanma Barranquero <lekktu@gmail.com>
7
8 * gnus-coding.texi (Gnus Maintenance Guide):
9 Rename from "Gnus Maintainance Guide".
10
11 * ede.texi (ede-compilation-program, ede-compiler, ede-linker):
12 * eieio.texi (Customizing):
13 * gnus.texi (Article Washing):
14 * gnus-news.texi:
15 * sem-user.texi (Smart Jump): Fix typos.
16
12011-11-16 Juanma Barranquero <lekktu@gmail.com> 172011-11-16 Juanma Barranquero <lekktu@gmail.com>
2 18
3 * org.texi (Agenda commands, Exporting Agenda Views): Fix typos. 19 * org.texi (Agenda commands, Exporting Agenda Views): Fix typos.
diff --git a/doc/misc/ada-mode.texi b/doc/misc/ada-mode.texi
index 374158c2c78..0eb20d01324 100644
--- a/doc/misc/ada-mode.texi
+++ b/doc/misc/ada-mode.texi
@@ -1357,7 +1357,7 @@ specifies the casing of one word or word fragment. Comments may be
1357included, separated from the word by a space. 1357included, separated from the word by a space.
1358 1358
1359If the word starts with an asterisk (@key{*}), it defines the casing 1359If the word starts with an asterisk (@key{*}), it defines the casing
1360af a word fragment (or ``substring''); part of a word between two 1360as a word fragment (or ``substring''); part of a word between two
1361underscores or word boundary. 1361underscores or word boundary.
1362 1362
1363For example: 1363For example:
diff --git a/doc/misc/autotype.texi b/doc/misc/autotype.texi
index 2e66c78a3cb..ecf4c7e47b2 100644
--- a/doc/misc/autotype.texi
+++ b/doc/misc/autotype.texi
@@ -156,7 +156,7 @@ the point is normally left after that skeleton is inserted (@pxref{Using
156Skeletons}). The point (@pxref{(emacs)Point}) is left at the next 156Skeletons}). The point (@pxref{(emacs)Point}) is left at the next
157interesting spot in the skeleton instead. 157interesting spot in the skeleton instead.
158 158
159 A negative prefix means to do something similar with that many precedingly 159 A negative prefix means to do something similar with that many previously
160marked interregions (@pxref{(emacs)Mark}). In the simplest case, if you type 160marked interregions (@pxref{(emacs)Mark}). In the simplest case, if you type
161@kbd{M--} just before issuing the skeleton command, that will wrap the 161@kbd{M--} just before issuing the skeleton command, that will wrap the
162skeleton around the current region, just like a positive argument would have 162skeleton around the current region, just like a positive argument would have
diff --git a/doc/misc/calc.texi b/doc/misc/calc.texi
index 5a1ee872a2b..290b120ea80 100644
--- a/doc/misc/calc.texi
+++ b/doc/misc/calc.texi
@@ -90,7 +90,7 @@
90This file documents Calc, the GNU Emacs calculator. 90This file documents Calc, the GNU Emacs calculator.
91@end ifinfo 91@end ifinfo
92@ifnotinfo 92@ifnotinfo
93This file documents Calc, the GNU Emacs calculator, included with 93This file documents Calc, the GNU Emacs calculator, included with
94GNU Emacs @value{EMACSVER}. 94GNU Emacs @value{EMACSVER}.
95@end ifnotinfo 95@end ifnotinfo
96 96
@@ -324,7 +324,7 @@ need to know.
324@c @cindex Marginal notes 324@c @cindex Marginal notes
325Every Calc keyboard command is listed in the Calc Summary, and also 325Every Calc keyboard command is listed in the Calc Summary, and also
326in the Key Index. Algebraic functions, @kbd{M-x} commands, and 326in the Key Index. Algebraic functions, @kbd{M-x} commands, and
327variables also have their own indices. 327variables also have their own indices.
328@c @texline Each 328@c @texline Each
329@c @infoline In the printed manual, each 329@c @infoline In the printed manual, each
330@c paragraph that is referenced in the Key or Function Index is marked 330@c paragraph that is referenced in the Key or Function Index is marked
@@ -338,7 +338,7 @@ the @kbd{h i} key sequence. Outside of the Calc window, you can press
338command @kbd{C-x * t} will jump to the Tutorial and start Calc if 338command @kbd{C-x * t} will jump to the Tutorial and start Calc if
339necessary. Pressing @kbd{h s} or @kbd{C-x * s} will take you directly 339necessary. Pressing @kbd{h s} or @kbd{C-x * s} will take you directly
340to the Calc Summary. Within Calc, you can also go to the part of the 340to the Calc Summary. Within Calc, you can also go to the part of the
341manual describing any Calc key, function, or variable using 341manual describing any Calc key, function, or variable using
342@w{@kbd{h k}}, @kbd{h f}, or @kbd{h v}, respectively. @xref{Help Commands}. 342@w{@kbd{h k}}, @kbd{h f}, or @kbd{h v}, respectively. @xref{Help Commands}.
343 343
344@ifnottex 344@ifnottex
@@ -437,12 +437,12 @@ Delete, and Space keys.
437then the command to operate on the numbers. 437then the command to operate on the numbers.
438 438
439@noindent 439@noindent
440Type @kbd{2 @key{RET} 3 + Q} to compute 440Type @kbd{2 @key{RET} 3 + Q} to compute
441@texline @math{\sqrt{2+3} = 2.2360679775}. 441@texline @math{\sqrt{2+3} = 2.2360679775}.
442@infoline the square root of 2+3, which is 2.2360679775. 442@infoline the square root of 2+3, which is 2.2360679775.
443 443
444@noindent 444@noindent
445Type @kbd{P 2 ^} to compute 445Type @kbd{P 2 ^} to compute
446@texline @math{\pi^2 = 9.86960440109}. 446@texline @math{\pi^2 = 9.86960440109}.
447@infoline the value of `pi' squared, 9.86960440109. 447@infoline the value of `pi' squared, 9.86960440109.
448 448
@@ -461,14 +461,14 @@ conventional ``algebraic'' notation. To enter an algebraic formula,
461use the apostrophe key. 461use the apostrophe key.
462 462
463@noindent 463@noindent
464Type @kbd{' sqrt(2+3) @key{RET}} to compute 464Type @kbd{' sqrt(2+3) @key{RET}} to compute
465@texline @math{\sqrt{2+3}}. 465@texline @math{\sqrt{2+3}}.
466@infoline the square root of 2+3. 466@infoline the square root of 2+3.
467 467
468@noindent 468@noindent
469Type @kbd{' pi^2 @key{RET}} to enter 469Type @kbd{' pi^2 @key{RET}} to enter
470@texline @math{\pi^2}. 470@texline @math{\pi^2}.
471@infoline `pi' squared. 471@infoline `pi' squared.
472To evaluate this symbolic formula as a number, type @kbd{=}. 472To evaluate this symbolic formula as a number, type @kbd{=}.
473 473
474@noindent 474@noindent
@@ -526,10 +526,10 @@ the upper-leftmost @samp{1} and set the mark, then move to just after
526the lower-right @samp{8} and press @kbd{C-x * r}. 526the lower-right @samp{8} and press @kbd{C-x * r}.
527 527
528@noindent 528@noindent
529Type @kbd{v t} to transpose this 529Type @kbd{v t} to transpose this
530@texline @math{3\times2} 530@texline @math{3\times2}
531@infoline 3x2 531@infoline 3x2
532matrix into a 532matrix into a
533@texline @math{2\times3} 533@texline @math{2\times3}
534@infoline 2x3 534@infoline 2x3
535matrix. Type @w{@kbd{v u}} to unpack the rows into two separate 535matrix. Type @w{@kbd{v u}} to unpack the rows into two separate
@@ -605,7 +605,7 @@ there are Quick mode, Keypad mode, and Embedded mode.
605 605
606@noindent 606@noindent
607On most systems, you can type @kbd{C-x *} to start the Calculator. 607On most systems, you can type @kbd{C-x *} to start the Calculator.
608The key sequence @kbd{C-x *} is bound to the command @code{calc-dispatch}, 608The key sequence @kbd{C-x *} is bound to the command @code{calc-dispatch},
609which can be rebound if convenient (@pxref{Customizing Calc}). 609which can be rebound if convenient (@pxref{Customizing Calc}).
610 610
611When you press @kbd{C-x *}, Emacs waits for you to press a second key to 611When you press @kbd{C-x *}, Emacs waits for you to press a second key to
@@ -1154,9 +1154,9 @@ its initial state: Empty stack, and initial mode settings.
1154@noindent 1154@noindent
1155Calc was originally started as a two-week project to occupy a lull 1155Calc was originally started as a two-week project to occupy a lull
1156in the author's schedule. Basically, a friend asked if I remembered 1156in the author's schedule. Basically, a friend asked if I remembered
1157the value of 1157the value of
1158@texline @math{2^{32}}. 1158@texline @math{2^{32}}.
1159@infoline @expr{2^32}. 1159@infoline @expr{2^32}.
1160I didn't offhand, but I said, ``that's easy, just call up an 1160I didn't offhand, but I said, ``that's easy, just call up an
1161@code{xcalc}.'' @code{Xcalc} duly reported that the answer to our 1161@code{xcalc}.'' @code{Xcalc} duly reported that the answer to our
1162question was @samp{4.294967e+09}---with no way to see the full ten 1162question was @samp{4.294967e+09}---with no way to see the full ten
@@ -1213,7 +1213,7 @@ algebra system for microcomputers.
1213Many people have contributed to Calc by reporting bugs and suggesting 1213Many people have contributed to Calc by reporting bugs and suggesting
1214features, large and small. A few deserve special mention: Tim Peters, 1214features, large and small. A few deserve special mention: Tim Peters,
1215who helped develop the ideas that led to the selection commands, rewrite 1215who helped develop the ideas that led to the selection commands, rewrite
1216rules, and many other algebra features; 1216rules, and many other algebra features;
1217@texline Fran\c{c}ois 1217@texline Fran\c{c}ois
1218@infoline Francois 1218@infoline Francois
1219Pinard, who contributed an early prototype of the Calc Summary appendix 1219Pinard, who contributed an early prototype of the Calc Summary appendix
@@ -1226,7 +1226,7 @@ Randal Schwartz, who suggested the @code{calc-eval} function; Juha
1226Sarlin, who first worked out how to split Calc into quickly-loading 1226Sarlin, who first worked out how to split Calc into quickly-loading
1227parts; Bob Weiner, who helped immensely with the Lucid Emacs port; and 1227parts; Bob Weiner, who helped immensely with the Lucid Emacs port; and
1228Robert J. Chassell, who suggested the Calc Tutorial and exercises as 1228Robert J. Chassell, who suggested the Calc Tutorial and exercises as
1229well as many other things. 1229well as many other things.
1230 1230
1231@cindex Bibliography 1231@cindex Bibliography
1232@cindex Knuth, Art of Computer Programming 1232@cindex Knuth, Art of Computer Programming
@@ -1472,9 +1472,9 @@ Here's the first exercise: What will the keystrokes @kbd{1 @key{RET} 2
1472multiplication.) Figure it out by hand, then try it with Calc to see 1472multiplication.) Figure it out by hand, then try it with Calc to see
1473if you're right. @xref{RPN Answer 1, 1}. (@bullet{}) 1473if you're right. @xref{RPN Answer 1, 1}. (@bullet{})
1474 1474
1475(@bullet{}) @strong{Exercise 2.} Compute 1475(@bullet{}) @strong{Exercise 2.} Compute
1476@texline @math{(2\times4) + (7\times9.4) + {5\over4}} 1476@texline @math{(2\times4) + (7\times9.4) + {5\over4}}
1477@infoline @expr{2*4 + 7*9.5 + 5/4} 1477@infoline @expr{2*4 + 7*9.5 + 5/4}
1478using the stack. @xref{RPN Answer 2, 2}. (@bullet{}) 1478using the stack. @xref{RPN Answer 2, 2}. (@bullet{})
1479 1479
1480The @key{DEL} key is called Backspace on some keyboards. It is 1480The @key{DEL} key is called Backspace on some keyboards. It is
@@ -1889,7 +1889,7 @@ intermediate results of a calculation as you go along. You can
1889accomplish this in Calc by performing your calculation as a series 1889accomplish this in Calc by performing your calculation as a series
1890of algebraic entries, using the @kbd{$} sign to tie them together. 1890of algebraic entries, using the @kbd{$} sign to tie them together.
1891In an algebraic formula, @kbd{$} represents the number on the top 1891In an algebraic formula, @kbd{$} represents the number on the top
1892of the stack. Here, we perform the calculation 1892of the stack. Here, we perform the calculation
1893@texline @math{\sqrt{2\times4+1}}, 1893@texline @math{\sqrt{2\times4+1}},
1894@infoline @expr{sqrt(2*4+1)}, 1894@infoline @expr{sqrt(2*4+1)},
1895which on a traditional calculator would be done by pressing 1895which on a traditional calculator would be done by pressing
@@ -2149,7 +2149,7 @@ key. If you type a prefix key by accident, you can press @kbd{C-g}
2149to cancel it. (In fact, you can press @kbd{C-g} to cancel almost 2149to cancel it. (In fact, you can press @kbd{C-g} to cancel almost
2150anything in Emacs.) To get help on a prefix key, press that key 2150anything in Emacs.) To get help on a prefix key, press that key
2151followed by @kbd{?}. Some prefixes have several lines of help, 2151followed by @kbd{?}. Some prefixes have several lines of help,
2152so you need to press @kbd{?} repeatedly to see them all. 2152so you need to press @kbd{?} repeatedly to see them all.
2153You can also type @kbd{h h} to see all the help at once. 2153You can also type @kbd{h h} to see all the help at once.
2154 2154
2155Try pressing @kbd{t ?} now. You will see a line of the form, 2155Try pressing @kbd{t ?} now. You will see a line of the form,
@@ -2550,13 +2550,13 @@ angle is measured in degrees. For example,
2550 2550
2551@noindent 2551@noindent
2552The shift-@kbd{S} command computes the sine of an angle. The sine 2552The shift-@kbd{S} command computes the sine of an angle. The sine
2553of 45 degrees is 2553of 45 degrees is
2554@texline @math{\sqrt{2}/2}; 2554@texline @math{\sqrt{2}/2};
2555@infoline @expr{sqrt(2)/2}; 2555@infoline @expr{sqrt(2)/2};
2556squaring this yields @expr{2/4 = 0.5}. However, there has been a slight 2556squaring this yields @expr{2/4 = 0.5}. However, there has been a slight
2557roundoff error because the representation of 2557roundoff error because the representation of
2558@texline @math{\sqrt{2}/2} 2558@texline @math{\sqrt{2}/2}
2559@infoline @expr{sqrt(2)/2} 2559@infoline @expr{sqrt(2)/2}
2560wasn't exact. The @kbd{c 1} command is a handy way to clean up numbers 2560wasn't exact. The @kbd{c 1} command is a handy way to clean up numbers
2561in this case; it temporarily reduces the precision by one digit while it 2561in this case; it temporarily reduces the precision by one digit while it
2562re-rounds the number on the top of the stack. 2562re-rounds the number on the top of the stack.
@@ -2595,9 +2595,9 @@ either radians or degrees, depending on the current angular mode.
2595@end smallexample 2595@end smallexample
2596 2596
2597@noindent 2597@noindent
2598Here we compute the Inverse Sine of 2598Here we compute the Inverse Sine of
2599@texline @math{\sqrt{0.5}}, 2599@texline @math{\sqrt{0.5}},
2600@infoline @expr{sqrt(0.5)}, 2600@infoline @expr{sqrt(0.5)},
2601first in radians, then in degrees. 2601first in radians, then in degrees.
2602 2602
2603Use @kbd{c d} and @kbd{c r} to convert a number from radians to degrees 2603Use @kbd{c d} and @kbd{c r} to convert a number from radians to degrees
@@ -2783,9 +2783,9 @@ logarithm). These can be modified by the @kbd{I} (inverse) and
2783@kbd{H} (hyperbolic) prefix keys. 2783@kbd{H} (hyperbolic) prefix keys.
2784 2784
2785Let's compute the sine and cosine of an angle, and verify the 2785Let's compute the sine and cosine of an angle, and verify the
2786identity 2786identity
2787@texline @math{\sin^2x + \cos^2x = 1}. 2787@texline @math{\sin^2x + \cos^2x = 1}.
2788@infoline @expr{sin(x)^2 + cos(x)^2 = 1}. 2788@infoline @expr{sin(x)^2 + cos(x)^2 = 1}.
2789We'll arbitrarily pick @mathit{-64} degrees as a good value for @expr{x}. 2789We'll arbitrarily pick @mathit{-64} degrees as a good value for @expr{x}.
2790With the angular mode set to degrees (type @w{@kbd{m d}}), do: 2790With the angular mode set to degrees (type @w{@kbd{m d}}), do:
2791 2791
@@ -2806,7 +2806,7 @@ You can of course do these calculations to any precision you like.)
2806Remember, @kbd{f h} is the @code{calc-hypot}, or square-root of sum 2806Remember, @kbd{f h} is the @code{calc-hypot}, or square-root of sum
2807of squares, command. 2807of squares, command.
2808 2808
2809Another identity is 2809Another identity is
2810@texline @math{\displaystyle\tan x = {\sin x \over \cos x}}. 2810@texline @math{\displaystyle\tan x = {\sin x \over \cos x}}.
2811@infoline @expr{tan(x) = sin(x) / cos(x)}. 2811@infoline @expr{tan(x) = sin(x) / cos(x)}.
2812@smallexample 2812@smallexample
@@ -2871,7 +2871,7 @@ the top two stack elements right after the @kbd{U U}, then a pair of
2871A similar identity is supposed to hold for hyperbolic sines and cosines, 2871A similar identity is supposed to hold for hyperbolic sines and cosines,
2872except that it is the @emph{difference} 2872except that it is the @emph{difference}
2873@texline @math{\cosh^2x - \sinh^2x} 2873@texline @math{\cosh^2x - \sinh^2x}
2874@infoline @expr{cosh(x)^2 - sinh(x)^2} 2874@infoline @expr{cosh(x)^2 - sinh(x)^2}
2875that always equals one. Let's try to verify this identity. 2875that always equals one. Let's try to verify this identity.
2876 2876
2877@smallexample 2877@smallexample
@@ -2993,7 +2993,7 @@ factorial function defined in terms of Euler's Gamma function
2993@end smallexample 2993@end smallexample
2994 2994
2995@noindent 2995@noindent
2996Here we verify the identity 2996Here we verify the identity
2997@texline @math{n! = \Gamma(n+1)}. 2997@texline @math{n! = \Gamma(n+1)}.
2998@infoline @expr{@var{n}!@: = gamma(@var{n}+1)}. 2998@infoline @expr{@var{n}!@: = gamma(@var{n}+1)}.
2999 2999
@@ -3283,11 +3283,11 @@ rows in the matrix is different from the number of elements in the
3283vector. 3283vector.
3284 3284
3285(@bullet{}) @strong{Exercise 1.} Use @samp{*} to sum along the rows 3285(@bullet{}) @strong{Exercise 1.} Use @samp{*} to sum along the rows
3286of the above 3286of the above
3287@texline @math{2\times3} 3287@texline @math{2\times3}
3288@infoline 2x3 3288@infoline 2x3
3289matrix to get @expr{[6, 15]}. Now use @samp{*} to sum along the columns 3289matrix to get @expr{[6, 15]}. Now use @samp{*} to sum along the columns
3290to get @expr{[5, 7, 9]}. 3290to get @expr{[5, 7, 9]}.
3291@xref{Matrix Answer 1, 1}. (@bullet{}) 3291@xref{Matrix Answer 1, 1}. (@bullet{})
3292 3292
3293@cindex Identity matrix 3293@cindex Identity matrix
@@ -3432,7 +3432,7 @@ the matrix and vector. If we multiplied in the other order, Calc would
3432assume the vector was a row vector in order to make the dimensions 3432assume the vector was a row vector in order to make the dimensions
3433come out right, and the answer would be incorrect. If you 3433come out right, and the answer would be incorrect. If you
3434don't feel safe letting Calc take either interpretation of your 3434don't feel safe letting Calc take either interpretation of your
3435vectors, use explicit 3435vectors, use explicit
3436@texline @math{N\times1} 3436@texline @math{N\times1}
3437@infoline Nx1 3437@infoline Nx1
3438or 3438or
@@ -3482,9 +3482,9 @@ on the left by the transpose of @expr{A}:
3482@tex 3482@tex
3483$A^T A \, X = A^T B$, where $A^T$ is the transpose \samp{trn(A)}. 3483$A^T A \, X = A^T B$, where $A^T$ is the transpose \samp{trn(A)}.
3484@end tex 3484@end tex
3485Now 3485Now
3486@texline @math{A^T A} 3486@texline @math{A^T A}
3487@infoline @expr{trn(A)*A} 3487@infoline @expr{trn(A)*A}
3488is a square matrix so a solution is possible. It turns out that the 3488is a square matrix so a solution is possible. It turns out that the
3489@expr{X} vector you compute in this way will be a ``least-squares'' 3489@expr{X} vector you compute in this way will be a ``least-squares''
3490solution, which can be regarded as the ``closest'' solution to the set 3490solution, which can be regarded as the ``closest'' solution to the set
@@ -3577,9 +3577,9 @@ other a plain number.) In the final step, we take the square root
3577of each element. 3577of each element.
3578 3578
3579(@bullet{}) @strong{Exercise 1.} Compute a vector of powers of two 3579(@bullet{}) @strong{Exercise 1.} Compute a vector of powers of two
3580from 3580from
3581@texline @math{2^{-4}} 3581@texline @math{2^{-4}}
3582@infoline @expr{2^-4} 3582@infoline @expr{2^-4}
3583to @expr{2^4}. @xref{List Answer 1, 1}. (@bullet{}) 3583to @expr{2^4}. @xref{List Answer 1, 1}. (@bullet{})
3584 3584
3585You can also @dfn{reduce} a binary operator across a vector. 3585You can also @dfn{reduce} a binary operator across a vector.
@@ -3780,9 +3780,9 @@ $$ m = {N \sum x y - \sum x \sum y \over
3780@end tex 3780@end tex
3781 3781
3782@noindent 3782@noindent
3783where 3783where
3784@texline @math{\sum x} 3784@texline @math{\sum x}
3785@infoline @expr{sum(x)} 3785@infoline @expr{sum(x)}
3786represents the sum of all the values of @expr{x}. While there is an 3786represents the sum of all the values of @expr{x}. While there is an
3787actual @code{sum} function in Calc, it's easier to sum a vector using a 3787actual @code{sum} function in Calc, it's easier to sum a vector using a
3788simple reduction. First, let's compute the four different sums that 3788simple reduction. First, let's compute the four different sums that
@@ -3883,9 +3883,9 @@ $$ b = {\sum y - m \sum x \over N} $$
3883@end group 3883@end group
3884@end smallexample 3884@end smallexample
3885 3885
3886Let's ``plot'' this straight line approximation, 3886Let's ``plot'' this straight line approximation,
3887@texline @math{y \approx m x + b}, 3887@texline @math{y \approx m x + b},
3888@infoline @expr{m x + b}, 3888@infoline @expr{m x + b},
3889and compare it with the original data. 3889and compare it with the original data.
3890 3890
3891@smallexample 3891@smallexample
@@ -3959,7 +3959,7 @@ Next, let's add the line we got from our least-squares fit.
3959(If you are reading this tutorial on-line while running Calc, typing 3959(If you are reading this tutorial on-line while running Calc, typing
3960@kbd{g a} may cause the tutorial to disappear from its window and be 3960@kbd{g a} may cause the tutorial to disappear from its window and be
3961replaced by a buffer named @samp{*Gnuplot Commands*}. The tutorial 3961replaced by a buffer named @samp{*Gnuplot Commands*}. The tutorial
3962will reappear when you terminate GNUPLOT by typing @kbd{g q}.) 3962will reappear when you terminate GNUPLOT by typing @kbd{g q}.)
3963@end ifinfo 3963@end ifinfo
3964 3964
3965@smallexample 3965@smallexample
@@ -4138,7 +4138,7 @@ command to enable multi-line display of vectors.)
4138@c [fix-ref Numerical Solutions] 4138@c [fix-ref Numerical Solutions]
4139(@bullet{}) @strong{Exercise 8.} Compute a list of values of Bessel's 4139(@bullet{}) @strong{Exercise 8.} Compute a list of values of Bessel's
4140@texline @math{J_1(x)} 4140@texline @math{J_1(x)}
4141@infoline @expr{J1} 4141@infoline @expr{J1}
4142function @samp{besJ(1,x)} for @expr{x} from 0 to 5 in steps of 0.25. 4142function @samp{besJ(1,x)} for @expr{x} from 0 to 5 in steps of 0.25.
4143Find the value of @expr{x} (from among the above set of values) for 4143Find the value of @expr{x} (from among the above set of values) for
4144which @samp{besJ(1,x)} is a maximum. Use an ``automatic'' method, 4144which @samp{besJ(1,x)} is a maximum. Use an ``automatic'' method,
@@ -4150,7 +4150,7 @@ of thing automatically; @pxref{Numerical Solutions}.)
4150@cindex Digits, vectors of 4150@cindex Digits, vectors of
4151(@bullet{}) @strong{Exercise 9.} You are given an integer in the range 4151(@bullet{}) @strong{Exercise 9.} You are given an integer in the range
4152@texline @math{0 \le N < 10^m} 4152@texline @math{0 \le N < 10^m}
4153@infoline @expr{0 <= N < 10^m} 4153@infoline @expr{0 <= N < 10^m}
4154for @expr{m=12} (i.e., an integer of less than 4154for @expr{m=12} (i.e., an integer of less than
4155twelve digits). Convert this integer into a vector of @expr{m} 4155twelve digits). Convert this integer into a vector of @expr{m}
4156digits, each in the range from 0 to 9. In vector-of-digits notation, 4156digits, each in the range from 0 to 9. In vector-of-digits notation,
@@ -4164,12 +4164,12 @@ to try is 25129925999. @xref{List Answer 9, 9}. (@bullet{})
4164happened? How would you do this test? @xref{List Answer 10, 10}. (@bullet{}) 4164happened? How would you do this test? @xref{List Answer 10, 10}. (@bullet{})
4165 4165
4166(@bullet{}) @strong{Exercise 11.} The area of a circle of radius one 4166(@bullet{}) @strong{Exercise 11.} The area of a circle of radius one
4167is @cpi{}. The area of the 4167is @cpi{}. The area of the
4168@texline @math{2\times2} 4168@texline @math{2\times2}
4169@infoline 2x2 4169@infoline 2x2
4170square that encloses that circle is 4. So if we throw @var{n} darts at 4170square that encloses that circle is 4. So if we throw @var{n} darts at
4171random points in the square, about @cpiover{4} of them will land inside 4171random points in the square, about @cpiover{4} of them will land inside
4172the circle. This gives us an entertaining way to estimate the value of 4172the circle. This gives us an entertaining way to estimate the value of
4173@cpi{}. The @w{@kbd{k r}} 4173@cpi{}. The @w{@kbd{k r}}
4174command picks a random number between zero and the value on the stack. 4174command picks a random number between zero and the value on the stack.
4175We could get a random floating-point number between @mathit{-1} and 1 by typing 4175We could get a random floating-point number between @mathit{-1} and 1 by typing
@@ -4183,12 +4183,12 @@ points lie inside the unit circle. Hint: Use the @kbd{v b} command.
4183another way to calculate @cpi{}. Say you have an infinite field 4183another way to calculate @cpi{}. Say you have an infinite field
4184of vertical lines with a spacing of one inch. Toss a one-inch matchstick 4184of vertical lines with a spacing of one inch. Toss a one-inch matchstick
4185onto the field. The probability that the matchstick will land crossing 4185onto the field. The probability that the matchstick will land crossing
4186a line turns out to be 4186a line turns out to be
4187@texline @math{2/\pi}. 4187@texline @math{2/\pi}.
4188@infoline @expr{2/pi}. 4188@infoline @expr{2/pi}.
4189Toss 100 matchsticks to estimate @cpi{}. (If you want still more fun, 4189Toss 100 matchsticks to estimate @cpi{}. (If you want still more fun,
4190the probability that the GCD (@w{@kbd{k g}}) of two large integers is 4190the probability that the GCD (@w{@kbd{k g}}) of two large integers is
4191one turns out to be 4191one turns out to be
4192@texline @math{6/\pi^2}. 4192@texline @math{6/\pi^2}.
4193@infoline @expr{6/pi^2}. 4193@infoline @expr{6/pi^2}.
4194That provides yet another way to estimate @cpi{}.) 4194That provides yet another way to estimate @cpi{}.)
@@ -4488,7 +4488,7 @@ a 60% chance that the result is correct within 0.59 degrees.
4488@cindex Torus, volume of 4488@cindex Torus, volume of
4489(@bullet{}) @strong{Exercise 7.} The volume of a torus (a donut shape) is 4489(@bullet{}) @strong{Exercise 7.} The volume of a torus (a donut shape) is
4490@texline @math{2 \pi^2 R r^2} 4490@texline @math{2 \pi^2 R r^2}
4491@infoline @w{@expr{2 pi^2 R r^2}} 4491@infoline @w{@expr{2 pi^2 R r^2}}
4492where @expr{R} is the radius of the circle that 4492where @expr{R} is the radius of the circle that
4493defines the center of the tube and @expr{r} is the radius of the tube 4493defines the center of the tube and @expr{r} is the radius of the tube
4494itself. Suppose @expr{R} is 20 cm and @expr{r} is 4 cm, each known to 4494itself. Suppose @expr{R} is 20 cm and @expr{r} is 4 cm, each known to
@@ -4569,7 +4569,7 @@ In this last step, Calc has divided by 5 modulo 24; i.e., it has found a
4569new number which, when multiplied by 5 modulo 24, produces the original 4569new number which, when multiplied by 5 modulo 24, produces the original
4570number, 21. If @var{m} is prime and the divisor is not a multiple of 4570number, 21. If @var{m} is prime and the divisor is not a multiple of
4571@var{m}, it is always possible to find such a number. For non-prime 4571@var{m}, it is always possible to find such a number. For non-prime
4572@var{m} like 24, it is only sometimes possible. 4572@var{m} like 24, it is only sometimes possible.
4573 4573
4574@smallexample 4574@smallexample
4575@group 4575@group
@@ -4587,7 +4587,7 @@ that arises in the second one.
4587 4587
4588@cindex Fermat, primality test of 4588@cindex Fermat, primality test of
4589(@bullet{}) @strong{Exercise 10.} A theorem of Pierre de Fermat 4589(@bullet{}) @strong{Exercise 10.} A theorem of Pierre de Fermat
4590says that 4590says that
4591@texline @w{@math{x^{n-1} \bmod n = 1}} 4591@texline @w{@math{x^{n-1} \bmod n = 1}}
4592@infoline @expr{x^(n-1) mod n = 1} 4592@infoline @expr{x^(n-1) mod n = 1}
4593if @expr{n} is a prime number and @expr{x} is an integer less than 4593if @expr{n} is a prime number and @expr{x} is an integer less than
@@ -4615,9 +4615,9 @@ of day on the stack as an HMS/modulo form.
4615This calculation tells me it is six hours and 22 minutes until midnight. 4615This calculation tells me it is six hours and 22 minutes until midnight.
4616 4616
4617(@bullet{}) @strong{Exercise 11.} A rule of thumb is that one year 4617(@bullet{}) @strong{Exercise 11.} A rule of thumb is that one year
4618is about 4618is about
4619@texline @math{\pi \times 10^7} 4619@texline @math{\pi \times 10^7}
4620@infoline @w{@expr{pi * 10^7}} 4620@infoline @w{@expr{pi * 10^7}}
4621seconds. What time will it be that many seconds from right now? 4621seconds. What time will it be that many seconds from right now?
4622@xref{Types Answer 11, 11}. (@bullet{}) 4622@xref{Types Answer 11, 11}. (@bullet{})
4623 4623
@@ -5093,18 +5093,18 @@ One way to do it is again with vector mapping and reduction:
5093@end smallexample 5093@end smallexample
5094 5094
5095(@bullet{}) @strong{Exercise 3.} Find the integral from 1 to @expr{y} 5095(@bullet{}) @strong{Exercise 3.} Find the integral from 1 to @expr{y}
5096of 5096of
5097@texline @math{x \sin \pi x} 5097@texline @math{x \sin \pi x}
5098@infoline @w{@expr{x sin(pi x)}} 5098@infoline @w{@expr{x sin(pi x)}}
5099(where the sine is calculated in radians). Find the values of the 5099(where the sine is calculated in radians). Find the values of the
5100integral for integers @expr{y} from 1 to 5. @xref{Algebra Answer 3, 5100integral for integers @expr{y} from 1 to 5. @xref{Algebra Answer 3,
51013}. (@bullet{}) 51013}. (@bullet{})
5102 5102
5103Calc's integrator can do many simple integrals symbolically, but many 5103Calc's integrator can do many simple integrals symbolically, but many
5104others are beyond its capabilities. Suppose we wish to find the area 5104others are beyond its capabilities. Suppose we wish to find the area
5105under the curve 5105under the curve
5106@texline @math{\sin x \ln x} 5106@texline @math{\sin x \ln x}
5107@infoline @expr{sin(x) ln(x)} 5107@infoline @expr{sin(x) ln(x)}
5108over the same range of @expr{x}. If you entered this formula and typed 5108over the same range of @expr{x}. If you entered this formula and typed
5109@kbd{a i x @key{RET}} (don't bother to try this), Calc would work for a 5109@kbd{a i x @key{RET}} (don't bother to try this), Calc would work for a
5110long time but would be unable to find a solution. In fact, there is no 5110long time but would be unable to find a solution. In fact, there is no
@@ -5242,10 +5242,10 @@ $$ h (f(a) + f(a+h) + f(a+2h) + f(a+3h) + \cdots
5242\afterdisplay 5242\afterdisplay
5243@end tex 5243@end tex
5244 5244
5245Compute the integral from 1 to 2 of 5245Compute the integral from 1 to 2 of
5246@texline @math{\sin x \ln x} 5246@texline @math{\sin x \ln x}
5247@infoline @expr{sin(x) ln(x)} 5247@infoline @expr{sin(x) ln(x)}
5248using Simpson's rule with 10 slices. 5248using Simpson's rule with 10 slices.
5249@xref{Algebra Answer 4, 4}. (@bullet{}) 5249@xref{Algebra Answer 4, 4}. (@bullet{})
5250 5250
5251Calc has a built-in @kbd{a I} command for doing numerical integration. 5251Calc has a built-in @kbd{a I} command for doing numerical integration.
@@ -5396,7 +5396,7 @@ having to retype it.
5396 5396
5397To edit a variable, type @kbd{s e} and the variable name, use regular 5397To edit a variable, type @kbd{s e} and the variable name, use regular
5398Emacs editing commands as necessary, then type @kbd{C-c C-c} to store 5398Emacs editing commands as necessary, then type @kbd{C-c C-c} to store
5399the edited value back into the variable. 5399the edited value back into the variable.
5400You can also use @w{@kbd{s e}} to create a new variable if you wish. 5400You can also use @w{@kbd{s e}} to create a new variable if you wish.
5401 5401
5402Notice that the first time you use each rule, Calc puts up a ``compiling'' 5402Notice that the first time you use each rule, Calc puts up a ``compiling''
@@ -5780,7 +5780,7 @@ in @samp{a + 1} for @samp{x} in the defining formula.
5780@tindex Si 5780@tindex Si
5781(@bullet{}) @strong{Exercise 1.} The ``sine integral'' function 5781(@bullet{}) @strong{Exercise 1.} The ``sine integral'' function
5782@texline @math{{\rm Si}(x)} 5782@texline @math{{\rm Si}(x)}
5783@infoline @expr{Si(x)} 5783@infoline @expr{Si(x)}
5784is defined as the integral of @samp{sin(t)/t} for 5784is defined as the integral of @samp{sin(t)/t} for
5785@expr{t = 0} to @expr{x} in radians. (It was invented because this 5785@expr{t = 0} to @expr{x} in radians. (It was invented because this
5786integral has no solution in terms of basic functions; if you give it 5786integral has no solution in terms of basic functions; if you give it
@@ -5857,9 +5857,9 @@ the following functions:
5857 5857
5858@enumerate 5858@enumerate
5859@item 5859@item
5860Compute 5860Compute
5861@texline @math{\displaystyle{\sin x \over x}}, 5861@texline @math{\displaystyle{\sin x \over x}},
5862@infoline @expr{sin(x) / x}, 5862@infoline @expr{sin(x) / x},
5863where @expr{x} is the number on the top of the stack. 5863where @expr{x} is the number on the top of the stack.
5864 5864
5865@item 5865@item
@@ -5923,15 +5923,15 @@ key if you have one, makes a copy of the number in level 2.)
5923@cindex Golden ratio 5923@cindex Golden ratio
5924@cindex Phi, golden ratio 5924@cindex Phi, golden ratio
5925A fascinating property of the Fibonacci numbers is that the @expr{n}th 5925A fascinating property of the Fibonacci numbers is that the @expr{n}th
5926Fibonacci number can be found directly by computing 5926Fibonacci number can be found directly by computing
5927@texline @math{\phi^n / \sqrt{5}} 5927@texline @math{\phi^n / \sqrt{5}}
5928@infoline @expr{phi^n / sqrt(5)} 5928@infoline @expr{phi^n / sqrt(5)}
5929and then rounding to the nearest integer, where 5929and then rounding to the nearest integer, where
5930@texline @math{\phi} (``phi''), 5930@texline @math{\phi} (``phi''),
5931@infoline @expr{phi}, 5931@infoline @expr{phi},
5932the ``golden ratio,'' is 5932the ``golden ratio,'' is
5933@texline @math{(1 + \sqrt{5}) / 2}. 5933@texline @math{(1 + \sqrt{5}) / 2}.
5934@infoline @expr{(1 + sqrt(5)) / 2}. 5934@infoline @expr{(1 + sqrt(5)) / 2}.
5935(For convenience, this constant is available from the @code{phi} 5935(For convenience, this constant is available from the @code{phi}
5936variable, or the @kbd{I H P} command.) 5936variable, or the @kbd{I H P} command.)
5937 5937
@@ -5946,19 +5946,19 @@ variable, or the @kbd{I H P} command.)
5946 5946
5947@cindex Continued fractions 5947@cindex Continued fractions
5948(@bullet{}) @strong{Exercise 5.} The @dfn{continued fraction} 5948(@bullet{}) @strong{Exercise 5.} The @dfn{continued fraction}
5949representation of 5949representation of
5950@texline @math{\phi} 5950@texline @math{\phi}
5951@infoline @expr{phi} 5951@infoline @expr{phi}
5952is 5952is
5953@texline @math{1 + 1/(1 + 1/(1 + 1/( \ldots )))}. 5953@texline @math{1 + 1/(1 + 1/(1 + 1/( \ldots )))}.
5954@infoline @expr{1 + 1/(1 + 1/(1 + 1/( ...@: )))}. 5954@infoline @expr{1 + 1/(1 + 1/(1 + 1/( ...@: )))}.
5955We can compute an approximate value by carrying this however far 5955We can compute an approximate value by carrying this however far
5956and then replacing the innermost 5956and then replacing the innermost
5957@texline @math{1/( \ldots )} 5957@texline @math{1/( \ldots )}
5958@infoline @expr{1/( ...@: )} 5958@infoline @expr{1/( ...@: )}
5959by 1. Approximate 5959by 1. Approximate
5960@texline @math{\phi} 5960@texline @math{\phi}
5961@infoline @expr{phi} 5961@infoline @expr{phi}
5962using a twenty-term continued fraction. 5962using a twenty-term continued fraction.
5963@xref{Programming Answer 5, 5}. (@bullet{}) 5963@xref{Programming Answer 5, 5}. (@bullet{})
5964 5964
@@ -6056,9 +6056,9 @@ survive past the @kbd{Z '} command.
6056The @dfn{Bernoulli numbers} are a sequence with the interesting 6056The @dfn{Bernoulli numbers} are a sequence with the interesting
6057property that all of the odd Bernoulli numbers are zero, and the 6057property that all of the odd Bernoulli numbers are zero, and the
6058even ones, while difficult to compute, can be roughly approximated 6058even ones, while difficult to compute, can be roughly approximated
6059by the formula 6059by the formula
6060@texline @math{\displaystyle{2 n! \over (2 \pi)^n}}. 6060@texline @math{\displaystyle{2 n! \over (2 \pi)^n}}.
6061@infoline @expr{2 n!@: / (2 pi)^n}. 6061@infoline @expr{2 n!@: / (2 pi)^n}.
6062Let's write a keyboard macro to compute (approximate) Bernoulli numbers. 6062Let's write a keyboard macro to compute (approximate) Bernoulli numbers.
6063(Calc has a command, @kbd{k b}, to compute exact Bernoulli numbers, but 6063(Calc has a command, @kbd{k b}, to compute exact Bernoulli numbers, but
6064this command is very slow for large @expr{n} since the higher Bernoulli 6064this command is very slow for large @expr{n} since the higher Bernoulli
@@ -6166,7 +6166,7 @@ Z` ;; calc-kbd-push (Save local values)
61660 ;; calc digits (Push a zero onto the stack) 61660 ;; calc digits (Push a zero onto the stack)
6167st ;; calc-store-into (Store it in the following variable) 6167st ;; calc-store-into (Store it in the following variable)
61681 ;; calc quick variable (Quick variable q1) 61681 ;; calc quick variable (Quick variable q1)
61691 ;; calc digits (Initial value for the loop) 61691 ;; calc digits (Initial value for the loop)
6170TAB ;; calc-roll-down (Swap initial and final) 6170TAB ;; calc-roll-down (Swap initial and final)
6171Z( ;; calc-kbd-for (Begin the "for" loop) 6171Z( ;; calc-kbd-for (Begin the "for" loop)
6172& ;; calc-inv (Take the reciprocal) 6172& ;; calc-inv (Take the reciprocal)
@@ -6193,10 +6193,10 @@ Press @kbd{C-c C-c} to finish editing and return to the Calculator.
6193 6193
6194The @file{edmacro} package defines a handy @code{read-kbd-macro} command 6194The @file{edmacro} package defines a handy @code{read-kbd-macro} command
6195which reads the current region of the current buffer as a sequence of 6195which reads the current region of the current buffer as a sequence of
6196keystroke names, and defines that sequence on the @kbd{X} 6196keystroke names, and defines that sequence on the @kbd{X}
6197(and @kbd{C-x e}) key. Because this is so useful, Calc puts this 6197(and @kbd{C-x e}) key. Because this is so useful, Calc puts this
6198command on the @kbd{C-x * m} key. Try reading in this macro in the 6198command on the @kbd{C-x * m} key. Try reading in this macro in the
6199following form: Press @kbd{C-@@} (or @kbd{C-@key{SPC}}) at 6199following form: Press @kbd{C-@@} (or @kbd{C-@key{SPC}}) at
6200one end of the text below, then type @kbd{C-x * m} at the other. 6200one end of the text below, then type @kbd{C-x * m} at the other.
6201 6201
6202@example 6202@example
@@ -6230,12 +6230,12 @@ $$ x_{\rm new} = x - {f(x) \over f^{\prime}(x)} $$
6230where @expr{f'(x)} is the derivative of @expr{f}. The @expr{x} 6230where @expr{f'(x)} is the derivative of @expr{f}. The @expr{x}
6231values will quickly converge to a solution, i.e., eventually 6231values will quickly converge to a solution, i.e., eventually
6232@texline @math{x_{\rm new}} 6232@texline @math{x_{\rm new}}
6233@infoline @expr{new_x} 6233@infoline @expr{new_x}
6234and @expr{x} will be equal to within the limits 6234and @expr{x} will be equal to within the limits
6235of the current precision. Write a program which takes a formula 6235of the current precision. Write a program which takes a formula
6236involving the variable @expr{x}, and an initial guess @expr{x_0}, 6236involving the variable @expr{x}, and an initial guess @expr{x_0},
6237on the stack, and produces a value of @expr{x} for which the formula 6237on the stack, and produces a value of @expr{x} for which the formula
6238is zero. Use it to find a solution of 6238is zero. Use it to find a solution of
6239@texline @math{\sin(\cos x) = 0.5} 6239@texline @math{\sin(\cos x) = 0.5}
6240@infoline @expr{sin(cos(x)) = 0.5} 6240@infoline @expr{sin(cos(x)) = 0.5}
6241near @expr{x = 4.5}. (Use angles measured in radians.) Note that 6241near @expr{x = 4.5}. (Use angles measured in radians.) Note that
@@ -6245,12 +6245,12 @@ method when it is able. @xref{Programming Answer 8, 8}. (@bullet{})
6245@cindex Digamma function 6245@cindex Digamma function
6246@cindex Gamma constant, Euler's 6246@cindex Gamma constant, Euler's
6247@cindex Euler's gamma constant 6247@cindex Euler's gamma constant
6248(@bullet{}) @strong{Exercise 9.} The @dfn{digamma} function 6248(@bullet{}) @strong{Exercise 9.} The @dfn{digamma} function
6249@texline @math{\psi(z) (``psi'')} 6249@texline @math{\psi(z) (``psi'')}
6250@infoline @expr{psi(z)} 6250@infoline @expr{psi(z)}
6251is defined as the derivative of 6251is defined as the derivative of
6252@texline @math{\ln \Gamma(z)}. 6252@texline @math{\ln \Gamma(z)}.
6253@infoline @expr{ln(gamma(z))}. 6253@infoline @expr{ln(gamma(z))}.
6254For large values of @expr{z}, it can be approximated by the infinite sum 6254For large values of @expr{z}, it can be approximated by the infinite sum
6255 6255
6256@ifnottex 6256@ifnottex
@@ -6267,9 +6267,9 @@ $$
6267@end tex 6267@end tex
6268 6268
6269@noindent 6269@noindent
6270where 6270where
6271@texline @math{\sum} 6271@texline @math{\sum}
6272@infoline @expr{sum} 6272@infoline @expr{sum}
6273represents the sum over @expr{n} from 1 to infinity 6273represents the sum over @expr{n} from 1 to infinity
6274(or to some limit high enough to give the desired accuracy), and 6274(or to some limit high enough to give the desired accuracy), and
6275the @code{bern} function produces (exact) Bernoulli numbers. 6275the @code{bern} function produces (exact) Bernoulli numbers.
@@ -6277,27 +6277,27 @@ While this sum is not guaranteed to converge, in practice it is safe.
6277An interesting mathematical constant is Euler's gamma, which is equal 6277An interesting mathematical constant is Euler's gamma, which is equal
6278to about 0.5772. One way to compute it is by the formula, 6278to about 0.5772. One way to compute it is by the formula,
6279@texline @math{\gamma = -\psi(1)}. 6279@texline @math{\gamma = -\psi(1)}.
6280@infoline @expr{gamma = -psi(1)}. 6280@infoline @expr{gamma = -psi(1)}.
6281Unfortunately, 1 isn't a large enough argument 6281Unfortunately, 1 isn't a large enough argument
6282for the above formula to work (5 is a much safer value for @expr{z}). 6282for the above formula to work (5 is a much safer value for @expr{z}).
6283Fortunately, we can compute 6283Fortunately, we can compute
6284@texline @math{\psi(1)} 6284@texline @math{\psi(1)}
6285@infoline @expr{psi(1)} 6285@infoline @expr{psi(1)}
6286from 6286from
6287@texline @math{\psi(5)} 6287@texline @math{\psi(5)}
6288@infoline @expr{psi(5)} 6288@infoline @expr{psi(5)}
6289using the recurrence 6289using the recurrence
6290@texline @math{\psi(z+1) = \psi(z) + {1 \over z}}. 6290@texline @math{\psi(z+1) = \psi(z) + {1 \over z}}.
6291@infoline @expr{psi(z+1) = psi(z) + 1/z}. 6291@infoline @expr{psi(z+1) = psi(z) + 1/z}.
6292Your task: Develop a program to compute 6292Your task: Develop a program to compute
6293@texline @math{\psi(z)}; 6293@texline @math{\psi(z)};
6294@infoline @expr{psi(z)}; 6294@infoline @expr{psi(z)};
6295it should ``pump up'' @expr{z} 6295it should ``pump up'' @expr{z}
6296if necessary to be greater than 5, then use the above summation 6296if necessary to be greater than 5, then use the above summation
6297formula. Use looping commands to compute the sum. Use your function 6297formula. Use looping commands to compute the sum. Use your function
6298to compute 6298to compute
6299@texline @math{\gamma} 6299@texline @math{\gamma}
6300@infoline @expr{gamma} 6300@infoline @expr{gamma}
6301to twelve decimal places. (Calc has a built-in command 6301to twelve decimal places. (Calc has a built-in command
6302for Euler's constant, @kbd{I P}, which you can use to check your answer.) 6302for Euler's constant, @kbd{I P}, which you can use to check your answer.)
6303@xref{Programming Answer 9, 9}. (@bullet{}) 6303@xref{Programming Answer 9, 9}. (@bullet{})
@@ -6470,7 +6470,7 @@ This section includes answers to all the exercises in the Calc tutorial.
6470@noindent 6470@noindent
6471@kbd{1 @key{RET} 2 @key{RET} 3 @key{RET} 4 + * -} 6471@kbd{1 @key{RET} 2 @key{RET} 3 @key{RET} 4 + * -}
6472 6472
6473The result is 6473The result is
6474@texline @math{1 - (2 \times (3 + 4)) = -13}. 6474@texline @math{1 - (2 \times (3 + 4)) = -13}.
6475@infoline @expr{1 - (2 * (3 + 4)) = -13}. 6475@infoline @expr{1 - (2 * (3 + 4)) = -13}.
6476 6476
@@ -6481,9 +6481,9 @@ The result is
6481@texline @math{2\times4 + 7\times9.5 + {5\over4} = 75.75} 6481@texline @math{2\times4 + 7\times9.5 + {5\over4} = 75.75}
6482@infoline @expr{2*4 + 7*9.5 + 5/4 = 75.75} 6482@infoline @expr{2*4 + 7*9.5 + 5/4 = 75.75}
6483 6483
6484After computing the intermediate term 6484After computing the intermediate term
6485@texline @math{2\times4 = 8}, 6485@texline @math{2\times4 = 8},
6486@infoline @expr{2*4 = 8}, 6486@infoline @expr{2*4 = 8},
6487you can leave that result on the stack while you compute the second 6487you can leave that result on the stack while you compute the second
6488term. With both of these results waiting on the stack you can then 6488term. With both of these results waiting on the stack you can then
6489compute the final term, then press @kbd{+ +} to add everything up. 6489compute the final term, then press @kbd{+ +} to add everything up.
@@ -6790,7 +6790,7 @@ Dividing two integers that are larger than the current precision may
6790give a floating-point result that is inaccurate even when rounded 6790give a floating-point result that is inaccurate even when rounded
6791down to an integer. Consider @expr{123456789 / 2} when the current 6791down to an integer. Consider @expr{123456789 / 2} when the current
6792precision is 6 digits. The true answer is @expr{61728394.5}, but 6792precision is 6 digits. The true answer is @expr{61728394.5}, but
6793with a precision of 6 this will be rounded to 6793with a precision of 6 this will be rounded to
6794@texline @math{12345700.0/2.0 = 61728500.0}. 6794@texline @math{12345700.0/2.0 = 61728500.0}.
6795@infoline @expr{12345700.@: / 2.@: = 61728500.}. 6795@infoline @expr{12345700.@: / 2.@: = 61728500.}.
6796The result, when converted to an integer, will be off by 106. 6796The result, when converted to an integer, will be off by 106.
@@ -6900,18 +6900,18 @@ Type @kbd{d N} to return to Normal display mode afterwards.
6900@subsection Matrix Tutorial Exercise 3 6900@subsection Matrix Tutorial Exercise 3
6901 6901
6902@noindent 6902@noindent
6903To solve 6903To solve
6904@texline @math{A^T A \, X = A^T B}, 6904@texline @math{A^T A \, X = A^T B},
6905@infoline @expr{trn(A) * A * X = trn(A) * B}, 6905@infoline @expr{trn(A) * A * X = trn(A) * B},
6906first we compute 6906first we compute
6907@texline @math{A' = A^T A} 6907@texline @math{A' = A^T A}
6908@infoline @expr{A2 = trn(A) * A} 6908@infoline @expr{A2 = trn(A) * A}
6909and 6909and
6910@texline @math{B' = A^T B}; 6910@texline @math{B' = A^T B};
6911@infoline @expr{B2 = trn(A) * B}; 6911@infoline @expr{B2 = trn(A) * B};
6912now, we have a system 6912now, we have a system
6913@texline @math{A' X = B'} 6913@texline @math{A' X = B'}
6914@infoline @expr{A2 * X = B2} 6914@infoline @expr{A2 * X = B2}
6915which we can solve using Calc's @samp{/} command. 6915which we can solve using Calc's @samp{/} command.
6916 6916
6917@ifnottex 6917@ifnottex
@@ -6942,7 +6942,7 @@ $$
6942The first step is to enter the coefficient matrix. We'll store it in 6942The first step is to enter the coefficient matrix. We'll store it in
6943quick variable number 7 for later reference. Next, we compute the 6943quick variable number 7 for later reference. Next, we compute the
6944@texline @math{B'} 6944@texline @math{B'}
6945@infoline @expr{B2} 6945@infoline @expr{B2}
6946vector. 6946vector.
6947 6947
6948@smallexample 6948@smallexample
@@ -6958,9 +6958,9 @@ vector.
6958@end smallexample 6958@end smallexample
6959 6959
6960@noindent 6960@noindent
6961Now we compute the matrix 6961Now we compute the matrix
6962@texline @math{A'} 6962@texline @math{A'}
6963@infoline @expr{A2} 6963@infoline @expr{A2}
6964and divide. 6964and divide.
6965 6965
6966@smallexample 6966@smallexample
@@ -6979,16 +6979,16 @@ and divide.
6979(The actual computed answer will be slightly inexact due to 6979(The actual computed answer will be slightly inexact due to
6980round-off error.) 6980round-off error.)
6981 6981
6982Notice that the answers are similar to those for the 6982Notice that the answers are similar to those for the
6983@texline @math{3\times3} 6983@texline @math{3\times3}
6984@infoline 3x3 6984@infoline 3x3
6985system solved in the text. That's because the fourth equation that was 6985system solved in the text. That's because the fourth equation that was
6986added to the system is almost identical to the first one multiplied 6986added to the system is almost identical to the first one multiplied
6987by two. (If it were identical, we would have gotten the exact same 6987by two. (If it were identical, we would have gotten the exact same
6988answer since the 6988answer since the
6989@texline @math{4\times3} 6989@texline @math{4\times3}
6990@infoline 4x3 6990@infoline 4x3
6991system would be equivalent to the original 6991system would be equivalent to the original
6992@texline @math{3\times3} 6992@texline @math{3\times3}
6993@infoline 3x3 6993@infoline 3x3
6994system.) 6994system.)
@@ -7064,7 +7064,7 @@ $$ m \times x + b \times 1 = y $$
7064\afterdisplay 7064\afterdisplay
7065@end tex 7065@end tex
7066 7066
7067Thus we want a 7067Thus we want a
7068@texline @math{19\times2} 7068@texline @math{19\times2}
7069@infoline 19x2 7069@infoline 19x2
7070matrix with our @expr{x} vector as one column and 7070matrix with our @expr{x} vector as one column and
@@ -7083,12 +7083,12 @@ we combine the two columns to form our @expr{A} matrix.
7083@end smallexample 7083@end smallexample
7084 7084
7085@noindent 7085@noindent
7086Now we compute 7086Now we compute
7087@texline @math{A^T y} 7087@texline @math{A^T y}
7088@infoline @expr{trn(A) * y} 7088@infoline @expr{trn(A) * y}
7089and 7089and
7090@texline @math{A^T A} 7090@texline @math{A^T A}
7091@infoline @expr{trn(A) * A} 7091@infoline @expr{trn(A) * A}
7092and divide. 7092and divide.
7093 7093
7094@smallexample 7094@smallexample
@@ -7114,9 +7114,9 @@ and divide.
7114@end group 7114@end group
7115@end smallexample 7115@end smallexample
7116 7116
7117Since we were solving equations of the form 7117Since we were solving equations of the form
7118@texline @math{m \times x + b \times 1 = y}, 7118@texline @math{m \times x + b \times 1 = y},
7119@infoline @expr{m*x + b*1 = y}, 7119@infoline @expr{m*x + b*1 = y},
7120these numbers should be @expr{m} and @expr{b}, respectively. Sure 7120these numbers should be @expr{m} and @expr{b}, respectively. Sure
7121enough, they agree exactly with the result computed using @kbd{V M} and 7121enough, they agree exactly with the result computed using @kbd{V M} and
7122@kbd{V R}! 7122@kbd{V R}!
@@ -7177,9 +7177,9 @@ then raise the number to that power.)
7177@subsection List Tutorial Exercise 4 7177@subsection List Tutorial Exercise 4
7178 7178
7179@noindent 7179@noindent
7180A number @expr{j} is a divisor of @expr{n} if 7180A number @expr{j} is a divisor of @expr{n} if
7181@texline @math{n \mathbin{\hbox{\code{\%}}} j = 0}. 7181@texline @math{n \mathbin{\hbox{\code{\%}}} j = 0}.
7182@infoline @samp{n % j = 0}. 7182@infoline @samp{n % j = 0}.
7183The first step is to get a vector that identifies the divisors. 7183The first step is to get a vector that identifies the divisors.
7184 7184
7185@smallexample 7185@smallexample
@@ -7248,9 +7248,9 @@ so that the mapping operation works; no prime factor will ever be
7248zero, so adding zeros on the left and right is safe. From then on 7248zero, so adding zeros on the left and right is safe. From then on
7249the job is pretty straightforward. 7249the job is pretty straightforward.
7250 7250
7251Incidentally, Calc provides the 7251Incidentally, Calc provides the
7252@texline @dfn{M@"obius} @math{\mu} 7252@texline @dfn{M@"obius} @math{\mu}
7253@infoline @dfn{Moebius mu} 7253@infoline @dfn{Moebius mu}
7254function which is zero if and only if its argument is square-free. It 7254function which is zero if and only if its argument is square-free. It
7255would be a much more convenient way to do the above test in practice. 7255would be a much more convenient way to do the above test in practice.
7256 7256
@@ -7282,7 +7282,7 @@ exercise and type @kbd{1 -} to subtract one from all the elements.
7282The numbers down the lefthand edge of the list we desire are called 7282The numbers down the lefthand edge of the list we desire are called
7283the ``triangular numbers'' (now you know why!). The @expr{n}th 7283the ``triangular numbers'' (now you know why!). The @expr{n}th
7284triangular number is the sum of the integers from 1 to @expr{n}, and 7284triangular number is the sum of the integers from 1 to @expr{n}, and
7285can be computed directly by the formula 7285can be computed directly by the formula
7286@texline @math{n (n+1) \over 2}. 7286@texline @math{n (n+1) \over 2}.
7287@infoline @expr{n * (n+1) / 2}. 7287@infoline @expr{n * (n+1) / 2}.
7288 7288
@@ -7378,7 +7378,7 @@ A way to isolate the maximum value is to compute the maximum using
7378 7378
7379@noindent 7379@noindent
7380It's a good idea to verify, as in the last step above, that only 7380It's a good idea to verify, as in the last step above, that only
7381one value is equal to the maximum. (After all, a plot of 7381one value is equal to the maximum. (After all, a plot of
7382@texline @math{\sin x} 7382@texline @math{\sin x}
7383@infoline @expr{sin(x)} 7383@infoline @expr{sin(x)}
7384might have many points all equal to the maximum value, 1.) 7384might have many points all equal to the maximum value, 1.)
@@ -7650,12 +7650,12 @@ return to full-sized display of vectors.
7650This problem can be made a lot easier by taking advantage of some 7650This problem can be made a lot easier by taking advantage of some
7651symmetries. First of all, after some thought it's clear that the 7651symmetries. First of all, after some thought it's clear that the
7652@expr{y} axis can be ignored altogether. Just pick a random @expr{x} 7652@expr{y} axis can be ignored altogether. Just pick a random @expr{x}
7653component for one end of the match, pick a random direction 7653component for one end of the match, pick a random direction
7654@texline @math{\theta}, 7654@texline @math{\theta},
7655@infoline @expr{theta}, 7655@infoline @expr{theta},
7656and see if @expr{x} and 7656and see if @expr{x} and
7657@texline @math{x + \cos \theta} 7657@texline @math{x + \cos \theta}
7658@infoline @expr{x + cos(theta)} 7658@infoline @expr{x + cos(theta)}
7659(which is the @expr{x} coordinate of the other endpoint) cross a line. 7659(which is the @expr{x} coordinate of the other endpoint) cross a line.
7660The lines are at integer coordinates, so this happens when the two 7660The lines are at integer coordinates, so this happens when the two
7661numbers surround an integer. 7661numbers surround an integer.
@@ -7670,9 +7670,9 @@ In fact, since the field of lines is infinite we can choose the
7670coordinates 0 and 1 for the lines on either side of the leftmost 7670coordinates 0 and 1 for the lines on either side of the leftmost
7671endpoint. The rightmost endpoint will be between 0 and 1 if the 7671endpoint. The rightmost endpoint will be between 0 and 1 if the
7672match does not cross a line, or between 1 and 2 if it does. So: 7672match does not cross a line, or between 1 and 2 if it does. So:
7673Pick random @expr{x} and 7673Pick random @expr{x} and
7674@texline @math{\theta}, 7674@texline @math{\theta},
7675@infoline @expr{theta}, 7675@infoline @expr{theta},
7676compute 7676compute
7677@texline @math{x + \cos \theta}, 7677@texline @math{x + \cos \theta},
7678@infoline @expr{x + cos(theta)}, 7678@infoline @expr{x + cos(theta)},
@@ -8997,7 +8997,7 @@ Each of these functions can be computed using the stack, or using
8997algebraic entry, whichever way you prefer: 8997algebraic entry, whichever way you prefer:
8998 8998
8999@noindent 8999@noindent
9000Computing 9000Computing
9001@texline @math{\displaystyle{\sin x \over x}}: 9001@texline @math{\displaystyle{\sin x \over x}}:
9002@infoline @expr{sin(x) / x}: 9002@infoline @expr{sin(x) / x}:
9003 9003
@@ -9068,7 +9068,7 @@ C-x ( ' [0, 1; 1, 1] ^ ($-1) * [1, 1] @key{RET} v u @key{DEL} C-x )
9068 9068
9069@noindent 9069@noindent
9070This program is quite efficient because Calc knows how to raise a 9070This program is quite efficient because Calc knows how to raise a
9071matrix (or other value) to the power @expr{n} in only 9071matrix (or other value) to the power @expr{n} in only
9072@texline @math{\log_2 n} 9072@texline @math{\log_2 n}
9073@infoline @expr{log(n,2)} 9073@infoline @expr{log(n,2)}
9074steps. For example, this program can compute the 1000th Fibonacci 9074steps. For example, this program can compute the 1000th Fibonacci
@@ -9122,7 +9122,7 @@ harmonic number is 4.02.
9122 9122
9123@noindent 9123@noindent
9124The first step is to compute the derivative @expr{f'(x)} and thus 9124The first step is to compute the derivative @expr{f'(x)} and thus
9125the formula 9125the formula
9126@texline @math{\displaystyle{x - {f(x) \over f'(x)}}}. 9126@texline @math{\displaystyle{x - {f(x) \over f'(x)}}}.
9127@infoline @expr{x - f(x)/f'(x)}. 9127@infoline @expr{x - f(x)/f'(x)}.
9128 9128
@@ -9239,12 +9239,12 @@ method (among others) to look for numerical solutions to any equation.
9239@noindent 9239@noindent
9240The first step is to adjust @expr{z} to be greater than 5. A simple 9240The first step is to adjust @expr{z} to be greater than 5. A simple
9241``for'' loop will do the job here. If @expr{z} is less than 5, we 9241``for'' loop will do the job here. If @expr{z} is less than 5, we
9242reduce the problem using 9242reduce the problem using
9243@texline @math{\psi(z) = \psi(z+1) - 1/z}. 9243@texline @math{\psi(z) = \psi(z+1) - 1/z}.
9244@infoline @expr{psi(z) = psi(z+1) - 1/z}. We go 9244@infoline @expr{psi(z) = psi(z+1) - 1/z}. We go
9245on to compute 9245on to compute
9246@texline @math{\psi(z+1)}, 9246@texline @math{\psi(z+1)},
9247@infoline @expr{psi(z+1)}, 9247@infoline @expr{psi(z+1)},
9248and remember to add back a factor of @expr{-1/z} when we're done. This 9248and remember to add back a factor of @expr{-1/z} when we're done. This
9249step is repeated until @expr{z > 5}. 9249step is repeated until @expr{z > 5}.
9250 9250
@@ -9283,7 +9283,7 @@ are exactly equal, not just equal to within the current precision.)
9283@end group 9283@end group
9284@end smallexample 9284@end smallexample
9285 9285
9286Now we compute the initial part of the sum: 9286Now we compute the initial part of the sum:
9287@texline @math{\ln z - {1 \over 2z}} 9287@texline @math{\ln z - {1 \over 2z}}
9288@infoline @expr{ln(z) - 1/2z} 9288@infoline @expr{ln(z) - 1/2z}
9289minus the adjustment factor. 9289minus the adjustment factor.
@@ -9326,9 +9326,9 @@ up the value of @expr{2 n}. (Calc does have a summation command,
9326@end group 9326@end group
9327@end smallexample 9327@end smallexample
9328 9328
9329This is the value of 9329This is the value of
9330@texline @math{-\gamma}, 9330@texline @math{-\gamma},
9331@infoline @expr{- gamma}, 9331@infoline @expr{- gamma},
9332with a slight bit of roundoff error. To get a full 12 digits, let's use 9332with a slight bit of roundoff error. To get a full 12 digits, let's use
9333a higher precision: 9333a higher precision:
9334 9334
@@ -9361,9 +9361,9 @@ C-x )
9361 9361
9362@noindent 9362@noindent
9363Taking the derivative of a term of the form @expr{x^n} will produce 9363Taking the derivative of a term of the form @expr{x^n} will produce
9364a term like 9364a term like
9365@texline @math{n x^{n-1}}. 9365@texline @math{n x^{n-1}}.
9366@infoline @expr{n x^(n-1)}. 9366@infoline @expr{n x^(n-1)}.
9367Taking the derivative of a constant 9367Taking the derivative of a constant
9368produces zero. From this it is easy to see that the @expr{n}th 9368produces zero. From this it is easy to see that the @expr{n}th
9369derivative of a polynomial, evaluated at @expr{x = 0}, will equal the 9369derivative of a polynomial, evaluated at @expr{x = 0}, will equal the
@@ -9652,7 +9652,7 @@ still exists and is updated silently. @xref{Trail Commands}.
9652@mindex @null 9652@mindex @null
9653@end ignore 9653@end ignore
9654In most installations, the @kbd{C-x * c} key sequence is a more 9654In most installations, the @kbd{C-x * c} key sequence is a more
9655convenient way to start the Calculator. Also, @kbd{C-x * *} 9655convenient way to start the Calculator. Also, @kbd{C-x * *}
9656is a synonym for @kbd{C-x * c} unless you last used Calc 9656is a synonym for @kbd{C-x * c} unless you last used Calc
9657in its Keypad mode. 9657in its Keypad mode.
9658 9658
@@ -9908,9 +9908,9 @@ additional notes from the summary that apply to this command.
9908The @kbd{h f} (@code{calc-describe-function}) command looks up an 9908The @kbd{h f} (@code{calc-describe-function}) command looks up an
9909algebraic function or a command name in the Calc manual. Enter an 9909algebraic function or a command name in the Calc manual. Enter an
9910algebraic function name to look up that function in the Function 9910algebraic function name to look up that function in the Function
9911Index or enter a command name beginning with @samp{calc-} to look it 9911Index or enter a command name beginning with @samp{calc-} to look it
9912up in the Command Index. This command will also look up operator 9912up in the Command Index. This command will also look up operator
9913symbols that can appear in algebraic formulas, like @samp{%} and 9913symbols that can appear in algebraic formulas, like @samp{%} and
9914@samp{=>}. 9914@samp{=>}.
9915 9915
9916@kindex h v 9916@kindex h v
@@ -10038,7 +10038,7 @@ During numeric entry, the only editing key available is @key{DEL}.
10038@cindex Formulas, entering 10038@cindex Formulas, entering
10039The @kbd{'} (@code{calc-algebraic-entry}) command can be used to enter 10039The @kbd{'} (@code{calc-algebraic-entry}) command can be used to enter
10040calculations in algebraic form. This is accomplished by typing the 10040calculations in algebraic form. This is accomplished by typing the
10041apostrophe key, ', followed by the expression in standard format: 10041apostrophe key, ', followed by the expression in standard format:
10042 10042
10043@example 10043@example
10044' 2+3*4 @key{RET}. 10044' 2+3*4 @key{RET}.
@@ -10047,7 +10047,7 @@ apostrophe key, ', followed by the expression in standard format:
10047@noindent 10047@noindent
10048This will compute 10048This will compute
10049@texline @math{2+(3\times4) = 14} 10049@texline @math{2+(3\times4) = 14}
10050@infoline @expr{2+(3*4) = 14} 10050@infoline @expr{2+(3*4) = 14}
10051and push it on the stack. If you wish you can 10051and push it on the stack. If you wish you can
10052ignore the RPN aspect of Calc altogether and simply enter algebraic 10052ignore the RPN aspect of Calc altogether and simply enter algebraic
10053expressions in this way. You may want to use @key{DEL} every so often to 10053expressions in this way. You may want to use @key{DEL} every so often to
@@ -10453,9 +10453,9 @@ is greater than this, it will recompute @cpi{} using a series
10453approximation. This value will not need to be recomputed ever again 10453approximation. This value will not need to be recomputed ever again
10454unless you raise the precision still further. Many operations such as 10454unless you raise the precision still further. Many operations such as
10455logarithms and sines make use of similarly cached values such as 10455logarithms and sines make use of similarly cached values such as
10456@cpiover{4} and 10456@cpiover{4} and
10457@texline @math{\ln 2}. 10457@texline @math{\ln 2}.
10458@infoline @expr{ln(2)}. 10458@infoline @expr{ln(2)}.
10459The visible effect of caching is that 10459The visible effect of caching is that
10460high-precision computations may seem to do extra work the first time. 10460high-precision computations may seem to do extra work the first time.
10461Other things cached include powers of two (for the binary arithmetic 10461Other things cached include powers of two (for the binary arithmetic
@@ -10612,10 +10612,10 @@ form). The numerator and denominator always use the same radix.
10612A floating-point number or @dfn{float} is a number stored in scientific 10612A floating-point number or @dfn{float} is a number stored in scientific
10613notation. The number of significant digits in the fractional part is 10613notation. The number of significant digits in the fractional part is
10614governed by the current floating precision (@pxref{Precision}). The 10614governed by the current floating precision (@pxref{Precision}). The
10615range of acceptable values is from 10615range of acceptable values is from
10616@texline @math{10^{-3999999}} 10616@texline @math{10^{-3999999}}
10617@infoline @expr{10^-3999999} 10617@infoline @expr{10^-3999999}
10618(inclusive) to 10618(inclusive) to
10619@texline @math{10^{4000000}} 10619@texline @math{10^{4000000}}
10620@infoline @expr{10^4000000} 10620@infoline @expr{10^4000000}
10621(exclusive), plus the corresponding negative values and zero. 10621(exclusive), plus the corresponding negative values and zero.
@@ -10666,7 +10666,7 @@ and displayed in any radix just like integers and fractions. Since a
10666float that is entered in a radix other that 10 will be converted to 10666float that is entered in a radix other that 10 will be converted to
10667decimal, the number that Calc stores may not be exactly the number that 10667decimal, the number that Calc stores may not be exactly the number that
10668was entered, it will be the closest decimal approximation given the 10668was entered, it will be the closest decimal approximation given the
10669current precison. The notation @samp{@var{radix}#@var{ddd}.@var{ddd}} 10669current precision. The notation @samp{@var{radix}#@var{ddd}.@var{ddd}}
10670is a floating-point number whose digits are in the specified radix. 10670is a floating-point number whose digits are in the specified radix.
10671Note that the @samp{.} is more aptly referred to as a ``radix point'' 10671Note that the @samp{.} is more aptly referred to as a ``radix point''
10672than as a decimal point in this case. The number @samp{8#123.4567} is 10672than as a decimal point in this case. The number @samp{8#123.4567} is
@@ -10690,18 +10690,18 @@ polar. The default format is rectangular, displayed in the form
10690Rectangular complex numbers can also be displayed in @samp{@var{a}+@var{b}i} 10690Rectangular complex numbers can also be displayed in @samp{@var{a}+@var{b}i}
10691notation; @pxref{Complex Formats}. 10691notation; @pxref{Complex Formats}.
10692 10692
10693Polar complex numbers are displayed in the form 10693Polar complex numbers are displayed in the form
10694@texline `@tfn{(}@var{r}@tfn{;}@math{\theta}@tfn{)}' 10694@texline `@tfn{(}@var{r}@tfn{;}@math{\theta}@tfn{)}'
10695@infoline `@tfn{(}@var{r}@tfn{;}@var{theta}@tfn{)}' 10695@infoline `@tfn{(}@var{r}@tfn{;}@var{theta}@tfn{)}'
10696where @var{r} is the nonnegative magnitude and 10696where @var{r} is the nonnegative magnitude and
10697@texline @math{\theta} 10697@texline @math{\theta}
10698@infoline @var{theta} 10698@infoline @var{theta}
10699is the argument or phase angle. The range of 10699is the argument or phase angle. The range of
10700@texline @math{\theta} 10700@texline @math{\theta}
10701@infoline @var{theta} 10701@infoline @var{theta}
10702depends on the current angular mode (@pxref{Angular Modes}); it is 10702depends on the current angular mode (@pxref{Angular Modes}); it is
10703generally between @mathit{-180} and @mathit{+180} degrees or the equivalent range 10703generally between @mathit{-180} and @mathit{+180} degrees or the equivalent range
10704in radians. 10704in radians.
10705 10705
10706Complex numbers are entered in stages using incomplete objects. 10706Complex numbers are entered in stages using incomplete objects.
10707@xref{Incomplete Objects}. 10707@xref{Incomplete Objects}.
@@ -10742,9 +10742,9 @@ really mean is that @expr{1 / x}, as @expr{x} becomes larger and
10742larger, becomes arbitrarily close to zero. So you can imagine 10742larger, becomes arbitrarily close to zero. So you can imagine
10743that if @expr{x} got ``all the way to infinity,'' then @expr{1 / x} 10743that if @expr{x} got ``all the way to infinity,'' then @expr{1 / x}
10744would go all the way to zero. Similarly, when they say that 10744would go all the way to zero. Similarly, when they say that
10745@samp{exp(inf) = inf}, they mean that 10745@samp{exp(inf) = inf}, they mean that
10746@texline @math{e^x} 10746@texline @math{e^x}
10747@infoline @expr{exp(x)} 10747@infoline @expr{exp(x)}
10748grows without bound as @expr{x} grows. The symbol @samp{-inf} likewise 10748grows without bound as @expr{x} grows. The symbol @samp{-inf} likewise
10749stands for an infinitely negative real value; for example, we say that 10749stands for an infinitely negative real value; for example, we say that
10750@samp{exp(-inf) = 0}. You can have an infinity pointing in any 10750@samp{exp(-inf) = 0}. You can have an infinity pointing in any
@@ -10839,7 +10839,7 @@ of its elements.
10839@end ignore 10839@end ignore
10840@tindex vec 10840@tindex vec
10841Algebraic functions for building vectors include @samp{vec(a, b, c)} 10841Algebraic functions for building vectors include @samp{vec(a, b, c)}
10842to build @samp{[a, b, c]}, @samp{cvec(a, n, m)} to build an 10842to build @samp{[a, b, c]}, @samp{cvec(a, n, m)} to build an
10843@texline @math{n\times m} 10843@texline @math{n\times m}
10844@infoline @var{n}x@var{m} 10844@infoline @var{n}x@var{m}
10845matrix of @samp{a}s, and @samp{index(n)} to build a vector of integers 10845matrix of @samp{a}s, and @samp{index(n)} to build a vector of integers
@@ -11184,9 +11184,9 @@ there is no solution to this equation (which can happen only when
11184division is left in symbolic form. Other operations, such as square 11184division is left in symbolic form. Other operations, such as square
11185roots, are not yet supported for modulo forms. (Note that, although 11185roots, are not yet supported for modulo forms. (Note that, although
11186@w{`@tfn{(}@var{a} @tfn{mod} @var{M}@tfn{)^.5}'} will compute a ``modulo square root'' 11186@w{`@tfn{(}@var{a} @tfn{mod} @var{M}@tfn{)^.5}'} will compute a ``modulo square root''
11187in the sense of reducing 11187in the sense of reducing
11188@texline @math{\sqrt a} 11188@texline @math{\sqrt a}
11189@infoline @expr{sqrt(a)} 11189@infoline @expr{sqrt(a)}
11190modulo @expr{M}, this is not a useful definition from the 11190modulo @expr{M}, this is not a useful definition from the
11191number-theoretical point of view.) 11191number-theoretical point of view.)
11192 11192
@@ -11220,11 +11220,11 @@ The algebraic function @samp{makemod(a, m)} builds the modulo form
11220@cindex Standard deviations 11220@cindex Standard deviations
11221An @dfn{error form} is a number with an associated standard 11221An @dfn{error form} is a number with an associated standard
11222deviation, as in @samp{2.3 +/- 0.12}. The notation 11222deviation, as in @samp{2.3 +/- 0.12}. The notation
11223@texline `@var{x} @tfn{+/-} @math{\sigma}' 11223@texline `@var{x} @tfn{+/-} @math{\sigma}'
11224@infoline `@var{x} @tfn{+/-} sigma' 11224@infoline `@var{x} @tfn{+/-} sigma'
11225stands for an uncertain value which follows 11225stands for an uncertain value which follows
11226a normal or Gaussian distribution of mean @expr{x} and standard 11226a normal or Gaussian distribution of mean @expr{x} and standard
11227deviation or ``error'' 11227deviation or ``error''
11228@texline @math{\sigma}. 11228@texline @math{\sigma}.
11229@infoline @expr{sigma}. 11229@infoline @expr{sigma}.
11230Both the mean and the error can be either numbers or 11230Both the mean and the error can be either numbers or
@@ -11235,7 +11235,7 @@ regular number by the Calculator.
11235 11235
11236All arithmetic and transcendental functions accept error forms as input. 11236All arithmetic and transcendental functions accept error forms as input.
11237Operations on the mean-value part work just like operations on regular 11237Operations on the mean-value part work just like operations on regular
11238numbers. The error part for any function @expr{f(x)} (such as 11238numbers. The error part for any function @expr{f(x)} (such as
11239@texline @math{\sin x} 11239@texline @math{\sin x}
11240@infoline @expr{sin(x)}) 11240@infoline @expr{sin(x)})
11241is defined by the error of @expr{x} times the derivative of @expr{f} 11241is defined by the error of @expr{x} times the derivative of @expr{f}
@@ -11267,35 +11267,35 @@ Consult a good text on error analysis for a discussion of the proper use
11267of standard deviations. Actual errors often are neither Gaussian-distributed 11267of standard deviations. Actual errors often are neither Gaussian-distributed
11268nor uncorrelated, and the above formulas are valid only when errors 11268nor uncorrelated, and the above formulas are valid only when errors
11269are small. As an example, the error arising from 11269are small. As an example, the error arising from
11270@texline `@tfn{sin(}@var{x} @tfn{+/-} @math{\sigma}@tfn{)}' 11270@texline `@tfn{sin(}@var{x} @tfn{+/-} @math{\sigma}@tfn{)}'
11271@infoline `@tfn{sin(}@var{x} @tfn{+/-} @var{sigma}@tfn{)}' 11271@infoline `@tfn{sin(}@var{x} @tfn{+/-} @var{sigma}@tfn{)}'
11272is 11272is
11273@texline `@math{\sigma} @tfn{abs(cos(}@var{x}@tfn{))}'. 11273@texline `@math{\sigma} @tfn{abs(cos(}@var{x}@tfn{))}'.
11274@infoline `@var{sigma} @tfn{abs(cos(}@var{x}@tfn{))}'. 11274@infoline `@var{sigma} @tfn{abs(cos(}@var{x}@tfn{))}'.
11275When @expr{x} is close to zero, 11275When @expr{x} is close to zero,
11276@texline @math{\cos x} 11276@texline @math{\cos x}
11277@infoline @expr{cos(x)} 11277@infoline @expr{cos(x)}
11278is close to one so the error in the sine is close to 11278is close to one so the error in the sine is close to
11279@texline @math{\sigma}; 11279@texline @math{\sigma};
11280@infoline @expr{sigma}; 11280@infoline @expr{sigma};
11281this makes sense, since 11281this makes sense, since
11282@texline @math{\sin x} 11282@texline @math{\sin x}
11283@infoline @expr{sin(x)} 11283@infoline @expr{sin(x)}
11284is approximately @expr{x} near zero, so a given error in @expr{x} will 11284is approximately @expr{x} near zero, so a given error in @expr{x} will
11285produce about the same error in the sine. Likewise, near 90 degrees 11285produce about the same error in the sine. Likewise, near 90 degrees
11286@texline @math{\cos x} 11286@texline @math{\cos x}
11287@infoline @expr{cos(x)} 11287@infoline @expr{cos(x)}
11288is nearly zero and so the computed error is 11288is nearly zero and so the computed error is
11289small: The sine curve is nearly flat in that region, so an error in @expr{x} 11289small: The sine curve is nearly flat in that region, so an error in @expr{x}
11290has relatively little effect on the value of 11290has relatively little effect on the value of
11291@texline @math{\sin x}. 11291@texline @math{\sin x}.
11292@infoline @expr{sin(x)}. 11292@infoline @expr{sin(x)}.
11293However, consider @samp{sin(90 +/- 1000)}. The cosine of 90 is zero, so 11293However, consider @samp{sin(90 +/- 1000)}. The cosine of 90 is zero, so
11294Calc will report zero error! We get an obviously wrong result because 11294Calc will report zero error! We get an obviously wrong result because
11295we have violated the small-error approximation underlying the error 11295we have violated the small-error approximation underlying the error
11296analysis. If the error in @expr{x} had been small, the error in 11296analysis. If the error in @expr{x} had been small, the error in
11297@texline @math{\sin x} 11297@texline @math{\sin x}
11298@infoline @expr{sin(x)} 11298@infoline @expr{sin(x)}
11299would indeed have been negligible. 11299would indeed have been negligible.
11300 11300
11301@ignore 11301@ignore
@@ -11402,14 +11402,14 @@ contain zero inside them Calc is forced to give the result,
11402 11402
11403While it may seem that intervals and error forms are similar, they are 11403While it may seem that intervals and error forms are similar, they are
11404based on entirely different concepts of inexact quantities. An error 11404based on entirely different concepts of inexact quantities. An error
11405form 11405form
11406@texline `@var{x} @tfn{+/-} @math{\sigma}' 11406@texline `@var{x} @tfn{+/-} @math{\sigma}'
11407@infoline `@var{x} @tfn{+/-} @var{sigma}' 11407@infoline `@var{x} @tfn{+/-} @var{sigma}'
11408means a variable is random, and its value could 11408means a variable is random, and its value could
11409be anything but is ``probably'' within one 11409be anything but is ``probably'' within one
11410@texline @math{\sigma} 11410@texline @math{\sigma}
11411@infoline @var{sigma} 11411@infoline @var{sigma}
11412of the mean value @expr{x}. An interval 11412of the mean value @expr{x}. An interval
11413`@tfn{[}@var{a} @tfn{..@:} @var{b}@tfn{]}' means a 11413`@tfn{[}@var{a} @tfn{..@:} @var{b}@tfn{]}' means a
11414variable's value is unknown, but guaranteed to lie in the specified 11414variable's value is unknown, but guaranteed to lie in the specified
11415range. Error forms are statistical or ``average case'' approximations; 11415range. Error forms are statistical or ``average case'' approximations;
@@ -11641,7 +11641,7 @@ the C-style ``if'' operator @samp{a?b:c} [@code{if}];
11641@samp{=>} [@code{evalto}]. 11641@samp{=>} [@code{evalto}].
11642 11642
11643Note that, unlike in usual computer notation, multiplication binds more 11643Note that, unlike in usual computer notation, multiplication binds more
11644strongly than division: @samp{a*b/c*d} is equivalent to 11644strongly than division: @samp{a*b/c*d} is equivalent to
11645@texline @math{a b \over c d}. 11645@texline @math{a b \over c d}.
11646@infoline @expr{(a*b)/(c*d)}. 11646@infoline @expr{(a*b)/(c*d)}.
11647 11647
@@ -11858,13 +11858,13 @@ next higher level. For example, with @samp{10 20 30 40 50} on the
11858stack and the point on the line containing @samp{30}, @kbd{C-x C-t} 11858stack and the point on the line containing @samp{30}, @kbd{C-x C-t}
11859creates @samp{10 20 40 30 50}. More generally, @kbd{C-x C-t} acts on 11859creates @samp{10 20 40 30 50}. More generally, @kbd{C-x C-t} acts on
11860the stack objects determined by the current point (and mark) similar 11860the stack objects determined by the current point (and mark) similar
11861to how the text-mode command @code{transpose-lines} acts on 11861to how the text-mode command @code{transpose-lines} acts on
11862lines. With argument @var{n}, @kbd{C-x C-t} will move the stack object 11862lines. With argument @var{n}, @kbd{C-x C-t} will move the stack object
11863at the level above the current point and move it past N other objects; 11863at the level above the current point and move it past N other objects;
11864for example, with @samp{10 20 30 40 50} on the stack and the point on 11864for example, with @samp{10 20 30 40 50} on the stack and the point on
11865the line containing @samp{30}, @kbd{C-u 2 C-x C-t} creates 11865the line containing @samp{30}, @kbd{C-u 2 C-x C-t} creates
11866@samp{10 40 20 30 50}. With an argument of 0, @kbd{C-x C-t} will switch 11866@samp{10 40 20 30 50}. With an argument of 0, @kbd{C-x C-t} will switch
11867the stack objects at the levels determined by the point and the mark. 11867the stack objects at the levels determined by the point and the mark.
11868 11868
11869@node Editing Stack Entries, Trail Commands, Stack Manipulation, Stack and Trail 11869@node Editing Stack Entries, Trail Commands, Stack Manipulation, Stack and Trail
11870@section Editing Stack Entries 11870@section Editing Stack Entries
@@ -12056,7 +12056,7 @@ the stack contains the arguments and the result: @samp{2 3 5}.
12056With the exception of keyboard macros, this works for all commands that 12056With the exception of keyboard macros, this works for all commands that
12057take arguments off the stack. (To avoid potentially unpleasant behavior, 12057take arguments off the stack. (To avoid potentially unpleasant behavior,
12058a @kbd{K} prefix before a keyboard macro will be ignored. A @kbd{K} 12058a @kbd{K} prefix before a keyboard macro will be ignored. A @kbd{K}
12059prefix called @emph{within} the keyboard macro will still take effect.) 12059prefix called @emph{within} the keyboard macro will still take effect.)
12060As another example, @kbd{K a s} simplifies a formula, pushing the 12060As another example, @kbd{K a s} simplifies a formula, pushing the
12061simplified version of the formula onto the stack after the original 12061simplified version of the formula onto the stack after the original
12062formula (rather than replacing the original formula). Note that you 12062formula (rather than replacing the original formula). Note that you
@@ -12064,7 +12064,7 @@ could get the same effect by typing @kbd{@key{RET} a s}, copying the
12064formula and then simplifying the copy. One difference is that for a very 12064formula and then simplifying the copy. One difference is that for a very
12065large formula the time taken to format the intermediate copy in 12065large formula the time taken to format the intermediate copy in
12066@kbd{@key{RET} a s} could be noticeable; @kbd{K a s} would avoid this 12066@kbd{@key{RET} a s} could be noticeable; @kbd{K a s} would avoid this
12067extra work. 12067extra work.
12068 12068
12069Even stack manipulation commands are affected. @key{TAB} works by 12069Even stack manipulation commands are affected. @key{TAB} works by
12070popping two values and pushing them back in the opposite order, 12070popping two values and pushing them back in the opposite order,
@@ -12155,7 +12155,7 @@ discussion of the @code{calc-settings-file} variable; @pxref{Customizing Calc}.
12155If the file name you give is your user init file (typically 12155If the file name you give is your user init file (typically
12156@file{~/.emacs}), @kbd{m F} will not automatically load the new file. This 12156@file{~/.emacs}), @kbd{m F} will not automatically load the new file. This
12157is because your user init file may contain other things you don't want 12157is because your user init file may contain other things you don't want
12158to reread. You can give 12158to reread. You can give
12159a numeric prefix argument of 1 to @kbd{m F} to force it to read the 12159a numeric prefix argument of 1 to @kbd{m F} to force it to read the
12160file no matter what. Conversely, an argument of @mathit{-1} tells 12160file no matter what. Conversely, an argument of @mathit{-1} tells
12161@kbd{m F} @emph{not} to read the new file. An argument of 2 or @mathit{-2} 12161@kbd{m F} @emph{not} to read the new file. An argument of 2 or @mathit{-2}
@@ -12274,7 +12274,7 @@ corresponding base command (@code{calc-sin} in this case).
12274@pindex calc-option 12274@pindex calc-option
12275The @kbd{O} key (@code{calc-option}) sets another flag, the 12275The @kbd{O} key (@code{calc-option}) sets another flag, the
12276@dfn{Option Flag}, which also can alter the subsequent Calc command in 12276@dfn{Option Flag}, which also can alter the subsequent Calc command in
12277various ways. 12277various ways.
12278 12278
12279The Inverse, Hyperbolic and Option flags apply only to the next 12279The Inverse, Hyperbolic and Option flags apply only to the next
12280Calculator command, after which they are automatically cleared. (They 12280Calculator command, after which they are automatically cleared. (They
@@ -12366,7 +12366,7 @@ result cannot be expressed as an integer. In some cases you would
12366rather get an exact fractional answer. One way to accomplish this is 12366rather get an exact fractional answer. One way to accomplish this is
12367to use the @kbd{:} (@code{calc-fdiv}) [@code{fdiv}] command, which 12367to use the @kbd{:} (@code{calc-fdiv}) [@code{fdiv}] command, which
12368divides the two integers on the top of the stack to produce a fraction: 12368divides the two integers on the top of the stack to produce a fraction:
12369@kbd{6 @key{RET} 4 :} produces @expr{3:2} even though 12369@kbd{6 @key{RET} 4 :} produces @expr{3:2} even though
12370@kbd{6 @key{RET} 4 /} produces @expr{1.5}. 12370@kbd{6 @key{RET} 4 /} produces @expr{1.5}.
12371 12371
12372@kindex m f 12372@kindex m f
@@ -13155,11 +13155,11 @@ represent the integer and no more. The @kbd{d z} (@code{calc-leading-zeros})
13155command causes integers to be padded out with leading zeros according to the 13155command causes integers to be padded out with leading zeros according to the
13156current binary word size. (@xref{Binary Functions}, for a discussion of 13156current binary word size. (@xref{Binary Functions}, for a discussion of
13157word size.) If the absolute value of the word size is @expr{w}, all integers 13157word size.) If the absolute value of the word size is @expr{w}, all integers
13158are displayed with at least enough digits to represent 13158are displayed with at least enough digits to represent
13159@texline @math{2^w-1} 13159@texline @math{2^w-1}
13160@infoline @expr{(2^w)-1} 13160@infoline @expr{(2^w)-1}
13161in the current radix. (Larger integers will still be displayed in their 13161in the current radix. (Larger integers will still be displayed in their
13162entirety.) 13162entirety.)
13163 13163
13164@cindex Two's complements 13164@cindex Two's complements
13165Calc can display @expr{w}-bit integers using two's complement 13165Calc can display @expr{w}-bit integers using two's complement
@@ -13181,7 +13181,7 @@ the integers from @expr{0} to
13181are represented by themselves and the integers from 13181are represented by themselves and the integers from
13182@texline @math{-2^{w-1}} 13182@texline @math{-2^{w-1}}
13183@infoline @expr{-2^(w-1)} 13183@infoline @expr{-2^(w-1)}
13184to @expr{-1} are represented by the integers from 13184to @expr{-1} are represented by the integers from
13185@texline @math{2^{w-1}} 13185@texline @math{2^{w-1}}
13186@infoline @expr{2^(w-1)} 13186@infoline @expr{2^(w-1)}
13187to @expr{2^w-1} (the integer @expr{k} is represented by @expr{k+2^w}). 13187to @expr{2^w-1} (the integer @expr{k} is represented by @expr{k+2^w}).
@@ -13190,7 +13190,7 @@ Calc will display a two's complement integer by the radix (either
13190representation (including any leading zeros necessary to include all 13190representation (including any leading zeros necessary to include all
13191@expr{w} bits). In a two's complement display mode, numbers that 13191@expr{w} bits). In a two's complement display mode, numbers that
13192are not displayed in two's complement notation (i.e., that aren't 13192are not displayed in two's complement notation (i.e., that aren't
13193integers from 13193integers from
13194@texline @math{-2^{w-1}} 13194@texline @math{-2^{w-1}}
13195@infoline @expr{-2^(w-1)} 13195@infoline @expr{-2^(w-1)}
13196to 13196to
@@ -14095,13 +14095,13 @@ the @samp{$} sign has the same meaning it always does in algebraic
14095formulas (a reference to an existing entry on the stack). 14095formulas (a reference to an existing entry on the stack).
14096 14096
14097Complex numbers are displayed as in @samp{3 + 4i}. Fractions and 14097Complex numbers are displayed as in @samp{3 + 4i}. Fractions and
14098quotients are written using @code{\over} in @TeX{} mode (as in 14098quotients are written using @code{\over} in @TeX{} mode (as in
14099@code{@{a \over b@}}) and @code{\frac} in La@TeX{} mode (as in 14099@code{@{a \over b@}}) and @code{\frac} in La@TeX{} mode (as in
14100@code{\frac@{a@}@{b@}}); binomial coefficients are written with 14100@code{\frac@{a@}@{b@}}); binomial coefficients are written with
14101@code{\choose} in @TeX{} mode (as in @code{@{a \choose b@}}) and 14101@code{\choose} in @TeX{} mode (as in @code{@{a \choose b@}}) and
14102@code{\binom} in La@TeX{} mode (as in @code{\binom@{a@}@{b@}}). 14102@code{\binom} in La@TeX{} mode (as in @code{\binom@{a@}@{b@}}).
14103Interval forms are written with @code{\ldots}, and error forms are 14103Interval forms are written with @code{\ldots}, and error forms are
14104written with @code{\pm}. Absolute values are written as in 14104written with @code{\pm}. Absolute values are written as in
14105@samp{|x + 1|}, and the floor and ceiling functions are written with 14105@samp{|x + 1|}, and the floor and ceiling functions are written with
14106@code{\lfloor}, @code{\rfloor}, etc. The words @code{\left} and 14106@code{\lfloor}, @code{\rfloor}, etc. The words @code{\left} and
14107@code{\right} are ignored when reading formulas in @TeX{} and La@TeX{} 14107@code{\right} are ignored when reading formulas in @TeX{} and La@TeX{}
@@ -14114,10 +14114,10 @@ and La@TeX{} have special names (like @code{\sin}) will use curly braces
14114instead of parentheses for very simple arguments. During input, curly 14114instead of parentheses for very simple arguments. During input, curly
14115braces and parentheses work equally well for grouping, but when the 14115braces and parentheses work equally well for grouping, but when the
14116document is formatted the curly braces will be invisible. Thus the 14116document is formatted the curly braces will be invisible. Thus the
14117printed result is 14117printed result is
14118@texline @math{\sin{2 x}} 14118@texline @math{\sin{2 x}}
14119@infoline @expr{sin 2x} 14119@infoline @expr{sin 2x}
14120but 14120but
14121@texline @math{\sin(2 + x)}. 14121@texline @math{\sin(2 + x)}.
14122@infoline @expr{sin(2 + x)}. 14122@infoline @expr{sin(2 + x)}.
14123 14123
@@ -14131,7 +14131,7 @@ italic letters in the printed document. If you invoke @kbd{d T} or
14131@kbd{d L} with a positive numeric prefix argument, names of more than 14131@kbd{d L} with a positive numeric prefix argument, names of more than
14132one character will instead be enclosed in a protective commands that 14132one character will instead be enclosed in a protective commands that
14133will prevent them from being typeset in the math italics; they will be 14133will prevent them from being typeset in the math italics; they will be
14134written @samp{\hbox@{@var{name}@}} in @TeX{} mode and 14134written @samp{\hbox@{@var{name}@}} in @TeX{} mode and
14135@samp{\text@{@var{name}@}} in La@TeX{} mode. The 14135@samp{\text@{@var{name}@}} in La@TeX{} mode. The
14136@samp{\hbox@{ @}} and @samp{\text@{ @}} notations are ignored during 14136@samp{\hbox@{ @}} and @samp{\text@{ @}} notations are ignored during
14137reading. If you use a negative prefix argument, such function names are 14137reading. If you use a negative prefix argument, such function names are
@@ -14143,7 +14143,7 @@ any @TeX{} mode.)
14143 14143
14144During reading, text of the form @samp{\matrix@{ ...@: @}} is replaced 14144During reading, text of the form @samp{\matrix@{ ...@: @}} is replaced
14145by @samp{[ ...@: ]}. The same also applies to @code{\pmatrix} and 14145by @samp{[ ...@: ]}. The same also applies to @code{\pmatrix} and
14146@code{\bmatrix}. In La@TeX{} mode this also applies to 14146@code{\bmatrix}. In La@TeX{} mode this also applies to
14147@samp{\begin@{matrix@} ... \end@{matrix@}}, 14147@samp{\begin@{matrix@} ... \end@{matrix@}},
14148@samp{\begin@{bmatrix@} ... \end@{bmatrix@}}, 14148@samp{\begin@{bmatrix@} ... \end@{bmatrix@}},
14149@samp{\begin@{pmatrix@} ... \end@{pmatrix@}}, as well as 14149@samp{\begin@{pmatrix@} ... \end@{pmatrix@}}, as well as
@@ -14151,12 +14151,12 @@ by @samp{[ ...@: ]}. The same also applies to @code{\pmatrix} and
14151The symbol @samp{&} is interpreted as a comma, 14151The symbol @samp{&} is interpreted as a comma,
14152and the symbols @samp{\cr} and @samp{\\} are interpreted as semicolons. 14152and the symbols @samp{\cr} and @samp{\\} are interpreted as semicolons.
14153During output, matrices are displayed in @samp{\matrix@{ a & b \\ c & d@}} 14153During output, matrices are displayed in @samp{\matrix@{ a & b \\ c & d@}}
14154format in @TeX{} mode and in 14154format in @TeX{} mode and in
14155@samp{\begin@{pmatrix@} a & b \\ c & d \end@{pmatrix@}} format in 14155@samp{\begin@{pmatrix@} a & b \\ c & d \end@{pmatrix@}} format in
14156La@TeX{} mode; you may need to edit this afterwards to change to your 14156La@TeX{} mode; you may need to edit this afterwards to change to your
14157preferred matrix form. If you invoke @kbd{d T} or @kbd{d L} with an 14157preferred matrix form. If you invoke @kbd{d T} or @kbd{d L} with an
14158argument of 2 or -2, then matrices will be displayed in two-dimensional 14158argument of 2 or -2, then matrices will be displayed in two-dimensional
14159form, such as 14159form, such as
14160 14160
14161@example 14161@example
14162\begin@{pmatrix@} 14162\begin@{pmatrix@}
@@ -14300,25 +14300,25 @@ in Calc, @TeX{}, La@TeX{} and @dfn{eqn} (described in the next section):
14300@example 14300@example
14301Calc TeX LaTeX eqn 14301Calc TeX LaTeX eqn
14302---- --- ----- --- 14302---- --- ----- ---
14303acute \acute \acute 14303acute \acute \acute
14304Acute \Acute 14304Acute \Acute
14305bar \bar \bar bar 14305bar \bar \bar bar
14306Bar \Bar 14306Bar \Bar
14307breve \breve \breve 14307breve \breve \breve
14308Breve \Breve 14308Breve \Breve
14309check \check \check 14309check \check \check
14310Check \Check 14310Check \Check
14311dddot \dddot 14311dddot \dddot
14312ddddot \ddddot 14312ddddot \ddddot
14313dot \dot \dot dot 14313dot \dot \dot dot
14314Dot \Dot 14314Dot \Dot
14315dotdot \ddot \ddot dotdot 14315dotdot \ddot \ddot dotdot
14316DotDot \Ddot 14316DotDot \Ddot
14317dyad dyad 14317dyad dyad
14318grave \grave \grave 14318grave \grave \grave
14319Grave \Grave 14319Grave \Grave
14320hat \hat \hat hat 14320hat \hat \hat hat
14321Hat \Hat 14321Hat \Hat
14322Prime prime 14322Prime prime
14323tilde \tilde \tilde tilde 14323tilde \tilde \tilde tilde
14324Tilde \Tilde 14324Tilde \Tilde
@@ -14363,7 +14363,7 @@ reading is:
14363 14363
14364Note that, because these symbols are ignored, reading a @TeX{} or 14364Note that, because these symbols are ignored, reading a @TeX{} or
14365La@TeX{} formula into Calc and writing it back out may lose spacing and 14365La@TeX{} formula into Calc and writing it back out may lose spacing and
14366font information. 14366font information.
14367 14367
14368Also, the ``discretionary multiplication sign'' @samp{\*} is read 14368Also, the ``discretionary multiplication sign'' @samp{\*} is read
14369the same as @samp{*}. 14369the same as @samp{*}.
@@ -14542,7 +14542,7 @@ are treated the same as curly braces: @samp{sqrt "1+x"} is equivalent to
14542of quotes in @dfn{eqn}, but it is good enough for most uses. 14542of quotes in @dfn{eqn}, but it is good enough for most uses.
14543 14543
14544Accent codes (@samp{@var{x} dot}) are handled by treating them as 14544Accent codes (@samp{@var{x} dot}) are handled by treating them as
14545function calls (@samp{dot(@var{x})}) internally. 14545function calls (@samp{dot(@var{x})}) internally.
14546@xref{TeX and LaTeX Language Modes}, for a table of these accent 14546@xref{TeX and LaTeX Language Modes}, for a table of these accent
14547functions. The @code{prime} accent is treated specially if it occurs on 14547functions. The @code{prime} accent is treated specially if it occurs on
14548a variable or function name: @samp{f prime prime @w{( x prime )}} is 14548a variable or function name: @samp{f prime prime @w{( x prime )}} is
@@ -14572,7 +14572,7 @@ if the matrix justification mode so specifies.
14572The @kbd{d Y} (@code{calc-yacas-language}) command selects the 14572The @kbd{d Y} (@code{calc-yacas-language}) command selects the
14573conventions of Yacas, a free computer algebra system. While the 14573conventions of Yacas, a free computer algebra system. While the
14574operators and functions in Yacas are similar to those of Calc, the names 14574operators and functions in Yacas are similar to those of Calc, the names
14575of built-in functions in Yacas are capitalized. The Calc formula 14575of built-in functions in Yacas are capitalized. The Calc formula
14576@samp{sin(2 x)}, for example, is entered and displayed @samp{Sin(2 x)} 14576@samp{sin(2 x)}, for example, is entered and displayed @samp{Sin(2 x)}
14577in Yacas mode, and `@samp{arcsin(x^2)} is @samp{ArcSin(x^2)} in Yacas 14577in Yacas mode, and `@samp{arcsin(x^2)} is @samp{ArcSin(x^2)} in Yacas
14578mode. Complex numbers are written are written @samp{3 + 4 I}. 14578mode. Complex numbers are written are written @samp{3 + 4 I}.
@@ -14581,9 +14581,9 @@ The standard special constants are written @code{Pi}, @code{E},
14581represents both @code{inf} and @code{uinf}, and @code{Undefined} 14581represents both @code{inf} and @code{uinf}, and @code{Undefined}
14582represents @code{nan}. 14582represents @code{nan}.
14583 14583
14584Certain operators on functions, such as @code{D} for differentiation 14584Certain operators on functions, such as @code{D} for differentiation
14585and @code{Integrate} for integration, take a prefix form in Yacas. For 14585and @code{Integrate} for integration, take a prefix form in Yacas. For
14586example, the derivative of @w{@samp{e^x sin(x)}} can be computed with 14586example, the derivative of @w{@samp{e^x sin(x)}} can be computed with
14587@w{@samp{D(x) Exp(x)*Sin(x)}}. 14587@w{@samp{D(x) Exp(x)*Sin(x)}}.
14588 14588
14589Other notable differences between Yacas and standard Calc expressions 14589Other notable differences between Yacas and standard Calc expressions
@@ -14602,7 +14602,7 @@ use square brackets. If, for example, @samp{A} represents the list
14602The @kbd{d X} (@code{calc-maxima-language}) command selects the 14602The @kbd{d X} (@code{calc-maxima-language}) command selects the
14603conventions of Maxima, another free computer algebra system. The 14603conventions of Maxima, another free computer algebra system. The
14604function names in Maxima are similar, but not always identical, to Calc. 14604function names in Maxima are similar, but not always identical, to Calc.
14605For example, instead of @samp{arcsin(x)}, Maxima will use 14605For example, instead of @samp{arcsin(x)}, Maxima will use
14606@samp{asin(x)}. Complex numbers are written @samp{3 + 4 %i}. The 14606@samp{asin(x)}. Complex numbers are written @samp{3 + 4 %i}. The
14607standard special constants are written @code{%pi}, @code{%e}, 14607standard special constants are written @code{%pi}, @code{%e},
14608@code{%i}, @code{%phi} and @code{%gamma}. In Maxima, @code{inf} means 14608@code{%i}, @code{%phi} and @code{%gamma}. In Maxima, @code{inf} means
@@ -14610,8 +14610,8 @@ the same as in Calc, but @code{infinity} represents Calc's @code{uinf}.
14610 14610
14611Underscores as well as percent signs are allowed in function and 14611Underscores as well as percent signs are allowed in function and
14612variable names in Maxima mode. The underscore again is equivalent to 14612variable names in Maxima mode. The underscore again is equivalent to
14613the @samp{#} in Normal mode, and the percent sign is equivalent to 14613the @samp{#} in Normal mode, and the percent sign is equivalent to
14614@samp{o'o}. 14614@samp{o'o}.
14615 14615
14616Maxima uses square brackets for lists and vectors, and matrices are 14616Maxima uses square brackets for lists and vectors, and matrices are
14617written as calls to the function @code{matrix}, given the row vectors of 14617written as calls to the function @code{matrix}, given the row vectors of
@@ -14629,7 +14629,7 @@ conventions of Giac, another free computer algebra system. The function
14629names in Giac are similar to Maxima. Complex numbers are written 14629names in Giac are similar to Maxima. Complex numbers are written
14630@samp{3 + 4 i}. The standard special constants in Giac are the same as 14630@samp{3 + 4 i}. The standard special constants in Giac are the same as
14631in Calc, except that @code{infinity} represents both Calc's @code{inf} 14631in Calc, except that @code{infinity} represents both Calc's @code{inf}
14632and @code{uinf}. 14632and @code{uinf}.
14633 14633
14634Underscores are allowed in function and variable names in Giac mode. 14634Underscores are allowed in function and variable names in Giac mode.
14635Brackets are used for subscripts. In Giac, indexing of lists begins at 14635Brackets are used for subscripts. In Giac, indexing of lists begins at
@@ -15786,9 +15786,9 @@ Command is @kbd{m p}.
15786@item 15786@item
15787Matrix/Scalar mode. Default value is @mathit{-1}. Value is 0 for Scalar 15787Matrix/Scalar mode. Default value is @mathit{-1}. Value is 0 for Scalar
15788mode, @mathit{-2} for Matrix mode, @mathit{-3} for square Matrix mode, 15788mode, @mathit{-2} for Matrix mode, @mathit{-3} for square Matrix mode,
15789or @var{N} for 15789or @var{N} for
15790@texline @math{N\times N} 15790@texline @math{N\times N}
15791@infoline @var{N}x@var{N} 15791@infoline @var{N}x@var{N}
15792Matrix mode. Command is @kbd{m v}. 15792Matrix mode. Command is @kbd{m v}.
15793 15793
15794@item 15794@item
@@ -16178,7 +16178,7 @@ whereas @w{@samp{[-2 ..@: 3] ^ 2}} is @samp{[0 ..@: 9]}.
16178@mindex @null 16178@mindex @null
16179@end ignore 16179@end ignore
16180@tindex / 16180@tindex /
16181The @kbd{/} (@code{calc-divide}) command divides two numbers. 16181The @kbd{/} (@code{calc-divide}) command divides two numbers.
16182 16182
16183When combining multiplication and division in an algebraic formula, it 16183When combining multiplication and division in an algebraic formula, it
16184is good style to use parentheses to distinguish between possible 16184is good style to use parentheses to distinguish between possible
@@ -16187,7 +16187,7 @@ interpretations; the expression @samp{a/b*c} should be written
16187parentheses, Calc will interpret @samp{a/b*c} as @samp{a/(b*c)}, since 16187parentheses, Calc will interpret @samp{a/b*c} as @samp{a/(b*c)}, since
16188in algebraic entry Calc gives division a lower precedence than 16188in algebraic entry Calc gives division a lower precedence than
16189multiplication. (This is not standard across all computer languages, and 16189multiplication. (This is not standard across all computer languages, and
16190Calc may change the precedence depending on the language mode being used. 16190Calc may change the precedence depending on the language mode being used.
16191@xref{Language Modes}.) This default ordering can be changed by setting 16191@xref{Language Modes}.) This default ordering can be changed by setting
16192the customizable variable @code{calc-multiplication-has-precedence} to 16192the customizable variable @code{calc-multiplication-has-precedence} to
16193@code{nil} (@pxref{Customizing Calc}); this will give multiplication and 16193@code{nil} (@pxref{Customizing Calc}); this will give multiplication and
@@ -16373,7 +16373,7 @@ all the arguments.)
16373The @kbd{f M} (@code{calc-mant-part}) [@code{mant}] function extracts 16373The @kbd{f M} (@code{calc-mant-part}) [@code{mant}] function extracts
16374the ``mantissa'' part @expr{m} of its floating-point argument; @kbd{f X} 16374the ``mantissa'' part @expr{m} of its floating-point argument; @kbd{f X}
16375(@code{calc-xpon-part}) [@code{xpon}] extracts the ``exponent'' part 16375(@code{calc-xpon-part}) [@code{xpon}] extracts the ``exponent'' part
16376@expr{e}. The original number is equal to 16376@expr{e}. The original number is equal to
16377@texline @math{m \times 10^e}, 16377@texline @math{m \times 10^e},
16378@infoline @expr{m * 10^e}, 16378@infoline @expr{m * 10^e},
16379where @expr{m} is in the interval @samp{[1.0 ..@: 10.0)} except that 16379where @expr{m} is in the interval @samp{[1.0 ..@: 10.0)} except that
@@ -16406,9 +16406,9 @@ floating-point numbers, the change is by one unit in the last place.
16406For example, incrementing @samp{12.3456} when the current precision 16406For example, incrementing @samp{12.3456} when the current precision
16407is 6 digits yields @samp{12.3457}. If the current precision had been 16407is 6 digits yields @samp{12.3457}. If the current precision had been
164088 digits, the result would have been @samp{12.345601}. Incrementing 164088 digits, the result would have been @samp{12.345601}. Incrementing
16409@samp{0.0} produces 16409@samp{0.0} produces
16410@texline @math{10^{-p}}, 16410@texline @math{10^{-p}},
16411@infoline @expr{10^-p}, 16411@infoline @expr{10^-p},
16412where @expr{p} is the current 16412where @expr{p} is the current
16413precision. These operations are defined only on integers and floats. 16413precision. These operations are defined only on integers and floats.
16414With numeric prefix arguments, they change the number by @expr{n} units. 16414With numeric prefix arguments, they change the number by @expr{n} units.
@@ -16852,7 +16852,7 @@ The last two arguments default to zero if omitted.
16852The @kbd{t J} (@code{calc-julian}) [@code{julian}] command converts 16852The @kbd{t J} (@code{calc-julian}) [@code{julian}] command converts
16853a date form into a Julian day count, which is the number of days 16853a date form into a Julian day count, which is the number of days
16854since noon (GMT) on Jan 1, 4713 BC. A pure date is converted to an 16854since noon (GMT) on Jan 1, 4713 BC. A pure date is converted to an
16855integer Julian count representing noon of that day. A date/time form 16855integer Julian count representing noon of that day. A date/time form
16856is converted to an exact floating-point Julian count, adjusted to 16856is converted to an exact floating-point Julian count, adjusted to
16857interpret the date form in the current time zone but the Julian 16857interpret the date form in the current time zone but the Julian
16858day count in Greenwich Mean Time. A numeric prefix argument allows 16858day count in Greenwich Mean Time. A numeric prefix argument allows
@@ -17294,12 +17294,12 @@ With no arguments, @code{calc-time-zone} or @samp{tzone()} will by
17294default get the time zone and daylight saving information from the 17294default get the time zone and daylight saving information from the
17295calendar (@pxref{Daylight Saving,Calendar/Diary,The Calendar and the Diary, 17295calendar (@pxref{Daylight Saving,Calendar/Diary,The Calendar and the Diary,
17296emacs,The GNU Emacs Manual}). To use a different time zone, or if the 17296emacs,The GNU Emacs Manual}). To use a different time zone, or if the
17297calendar does not give the desired result, you can set the Calc variable 17297calendar does not give the desired result, you can set the Calc variable
17298@code{TimeZone} (which is by default @code{nil}) to an appropriate 17298@code{TimeZone} (which is by default @code{nil}) to an appropriate
17299time zone name. (The easiest way to do this is to edit the 17299time zone name. (The easiest way to do this is to edit the
17300@code{TimeZone} variable using Calc's @kbd{s T} command, then use the 17300@code{TimeZone} variable using Calc's @kbd{s T} command, then use the
17301@kbd{s p} (@code{calc-permanent-variable}) command to save the value of 17301@kbd{s p} (@code{calc-permanent-variable}) command to save the value of
17302@code{TimeZone} permanently.) 17302@code{TimeZone} permanently.)
17303If the time zone given by @code{TimeZone} is a generalized time zone, 17303If the time zone given by @code{TimeZone} is a generalized time zone,
17304e.g., @code{EGT}, Calc examines the date being converted to tell whether 17304e.g., @code{EGT}, Calc examines the date being converted to tell whether
17305to use standard or daylight saving time. But if the current time zone 17305to use standard or daylight saving time. But if the current time zone
@@ -17311,12 +17311,12 @@ from the calendar.
17311 17311
17312The @kbd{t J} and @code{t U} commands with no numeric prefix 17312The @kbd{t J} and @code{t U} commands with no numeric prefix
17313arguments do the same thing as @samp{tzone()}; namely, use the 17313arguments do the same thing as @samp{tzone()}; namely, use the
17314information from the calendar if @code{TimeZone} is @code{nil}, 17314information from the calendar if @code{TimeZone} is @code{nil},
17315otherwise use the time zone given by @code{TimeZone}. 17315otherwise use the time zone given by @code{TimeZone}.
17316 17316
17317@vindex math-daylight-savings-hook 17317@vindex math-daylight-savings-hook
17318@findex math-std-daylight-savings 17318@findex math-std-daylight-savings
17319When Calc computes the daylight saving information itself (i.e., when 17319When Calc computes the daylight saving information itself (i.e., when
17320the @code{TimeZone} variable is set), it will by default consider 17320the @code{TimeZone} variable is set), it will by default consider
17321daylight saving time to begin at 2 a.m.@: on the second Sunday of March 17321daylight saving time to begin at 2 a.m.@: on the second Sunday of March
17322(for years from 2007 on) or on the last Sunday in April (for years 17322(for years from 2007 on) or on the last Sunday in April (for years
@@ -17392,7 +17392,7 @@ falls in this hour results in a time value for the following hour,
17392from 3 a.m.@: to 4 a.m. At the end of daylight saving time, the 17392from 3 a.m.@: to 4 a.m. At the end of daylight saving time, the
17393hour from 1 a.m.@: to 2 a.m.@: repeats itself; converting a date/time 17393hour from 1 a.m.@: to 2 a.m.@: repeats itself; converting a date/time
17394form that falls in this hour results in a time value for the first 17394form that falls in this hour results in a time value for the first
17395manifestation of that time (@emph{not} the one that occurs one hour 17395manifestation of that time (@emph{not} the one that occurs one hour
17396later). 17396later).
17397 17397
17398If @code{math-daylight-savings-hook} is @code{nil}, then the 17398If @code{math-daylight-savings-hook} is @code{nil}, then the
@@ -17995,12 +17995,12 @@ particular, negative arguments are converted to positive integers modulo
17995@expr{2^w} by all binary functions. 17995@expr{2^w} by all binary functions.
17996 17996
17997If the word size is negative, binary operations produce twos-complement 17997If the word size is negative, binary operations produce twos-complement
17998integers from 17998integers from
17999@texline @math{-2^{-w-1}} 17999@texline @math{-2^{-w-1}}
18000@infoline @expr{-(2^(-w-1))} 18000@infoline @expr{-(2^(-w-1))}
18001to 18001to
18002@texline @math{2^{-w-1}-1} 18002@texline @math{2^{-w-1}-1}
18003@infoline @expr{2^(-w-1)-1} 18003@infoline @expr{2^(-w-1)-1}
18004inclusive. Either mode accepts inputs in any range; the sign of 18004inclusive. Either mode accepts inputs in any range; the sign of
18005@expr{w} affects only the results produced. 18005@expr{w} affects only the results produced.
18006 18006
@@ -18182,13 +18182,13 @@ flag keys must be used to get some of these functions from the keyboard.
18182One miscellaneous command is shift-@kbd{P} (@code{calc-pi}), which pushes 18182One miscellaneous command is shift-@kbd{P} (@code{calc-pi}), which pushes
18183the value of @cpi{} (at the current precision) onto the stack. With the 18183the value of @cpi{} (at the current precision) onto the stack. With the
18184Hyperbolic flag, it pushes the value @expr{e}, the base of natural logarithms. 18184Hyperbolic flag, it pushes the value @expr{e}, the base of natural logarithms.
18185With the Inverse flag, it pushes Euler's constant 18185With the Inverse flag, it pushes Euler's constant
18186@texline @math{\gamma} 18186@texline @math{\gamma}
18187@infoline @expr{gamma} 18187@infoline @expr{gamma}
18188(about 0.5772). With both Inverse and Hyperbolic, it 18188(about 0.5772). With both Inverse and Hyperbolic, it
18189pushes the ``golden ratio'' 18189pushes the ``golden ratio''
18190@texline @math{\phi} 18190@texline @math{\phi}
18191@infoline @expr{phi} 18191@infoline @expr{phi}
18192(about 1.618). (At present, Euler's constant is not available 18192(about 1.618). (At present, Euler's constant is not available
18193to unlimited precision; Calc knows only the first 100 digits.) 18193to unlimited precision; Calc knows only the first 100 digits.)
18194In Symbolic mode, these commands push the 18194In Symbolic mode, these commands push the
@@ -18266,7 +18266,7 @@ The @kbd{H L} (@code{calc-log10}) [@code{log10}] command computes the common
18266(base-10) logarithm of a number. (With the Inverse flag [@code{exp10}], 18266(base-10) logarithm of a number. (With the Inverse flag [@code{exp10}],
18267it raises ten to a given power.) Note that the common logarithm of a 18267it raises ten to a given power.) Note that the common logarithm of a
18268complex number is computed by taking the natural logarithm and dividing 18268complex number is computed by taking the natural logarithm and dividing
18269by 18269by
18270@texline @math{\ln10}. 18270@texline @math{\ln10}.
18271@infoline @expr{ln(10)}. 18271@infoline @expr{ln(10)}.
18272 18272
@@ -18278,7 +18278,7 @@ by
18278The @kbd{B} (@code{calc-log}) [@code{log}] command computes a logarithm 18278The @kbd{B} (@code{calc-log}) [@code{log}] command computes a logarithm
18279to any base. For example, @kbd{1024 @key{RET} 2 B} produces 10, since 18279to any base. For example, @kbd{1024 @key{RET} 2 B} produces 10, since
18280@texline @math{2^{10} = 1024}. 18280@texline @math{2^{10} = 1024}.
18281@infoline @expr{2^10 = 1024}. 18281@infoline @expr{2^10 = 1024}.
18282In certain cases like @samp{log(3,9)}, the result 18282In certain cases like @samp{log(3,9)}, the result
18283will be either @expr{1:2} or @expr{0.5} depending on the current Fraction 18283will be either @expr{1:2} or @expr{0.5} depending on the current Fraction
18284mode setting. With the Inverse flag [@code{alog}], this command is 18284mode setting. With the Inverse flag [@code{alog}], this command is
@@ -18300,11 +18300,11 @@ integer arithmetic is used; otherwise, this is equivalent to
18300@tindex expm1 18300@tindex expm1
18301The @kbd{f E} (@code{calc-expm1}) [@code{expm1}] command computes 18301The @kbd{f E} (@code{calc-expm1}) [@code{expm1}] command computes
18302@texline @math{e^x - 1}, 18302@texline @math{e^x - 1},
18303@infoline @expr{exp(x)-1}, 18303@infoline @expr{exp(x)-1},
18304but using an algorithm that produces a more accurate 18304but using an algorithm that produces a more accurate
18305answer when the result is close to zero, i.e., when 18305answer when the result is close to zero, i.e., when
18306@texline @math{e^x} 18306@texline @math{e^x}
18307@infoline @expr{exp(x)} 18307@infoline @expr{exp(x)}
18308is close to one. 18308is close to one.
18309 18309
18310@kindex f L 18310@kindex f L
@@ -18312,7 +18312,7 @@ is close to one.
18312@tindex lnp1 18312@tindex lnp1
18313The @kbd{f L} (@code{calc-lnp1}) [@code{lnp1}] command computes 18313The @kbd{f L} (@code{calc-lnp1}) [@code{lnp1}] command computes
18314@texline @math{\ln(x+1)}, 18314@texline @math{\ln(x+1)},
18315@infoline @expr{ln(x+1)}, 18315@infoline @expr{ln(x+1)},
18316producing a more accurate answer when @expr{x} is close to zero. 18316producing a more accurate answer when @expr{x} is close to zero.
18317 18317
18318@node Trigonometric and Hyperbolic Functions, Advanced Math Functions, Logarithmic Functions, Scientific Functions 18318@node Trigonometric and Hyperbolic Functions, Advanced Math Functions, Logarithmic Functions, Scientific Functions
@@ -18515,9 +18515,9 @@ The @kbd{f g} (@code{calc-gamma}) [@code{gamma}] command computes the Euler
18515gamma function. For positive integer arguments, this is related to the 18515gamma function. For positive integer arguments, this is related to the
18516factorial function: @samp{gamma(n+1) = fact(n)}. For general complex 18516factorial function: @samp{gamma(n+1) = fact(n)}. For general complex
18517arguments the gamma function can be defined by the following definite 18517arguments the gamma function can be defined by the following definite
18518integral: 18518integral:
18519@texline @math{\Gamma(a) = \int_0^\infty t^{a-1} e^t dt}. 18519@texline @math{\Gamma(a) = \int_0^\infty t^{a-1} e^t dt}.
18520@infoline @expr{gamma(a) = integ(t^(a-1) exp(t), t, 0, inf)}. 18520@infoline @expr{gamma(a) = integ(t^(a-1) exp(t), t, 0, inf)}.
18521(The actual implementation uses far more efficient computational methods.) 18521(The actual implementation uses far more efficient computational methods.)
18522 18522
18523@kindex f G 18523@kindex f G
@@ -18549,7 +18549,7 @@ integral:
18549@tindex gammaG 18549@tindex gammaG
18550The @kbd{f G} (@code{calc-inc-gamma}) [@code{gammaP}] command computes 18550The @kbd{f G} (@code{calc-inc-gamma}) [@code{gammaP}] command computes
18551the incomplete gamma function, denoted @samp{P(a,x)}. This is defined by 18551the incomplete gamma function, denoted @samp{P(a,x)}. This is defined by
18552the integral, 18552the integral,
18553@texline @math{P(a,x) = \left( \int_0^x t^{a-1} e^t dt \right) / \Gamma(a)}. 18553@texline @math{P(a,x) = \left( \int_0^x t^{a-1} e^t dt \right) / \Gamma(a)}.
18554@infoline @expr{gammaP(a,x) = integ(t^(a-1) exp(t), t, 0, x) / gamma(a)}. 18554@infoline @expr{gammaP(a,x) = integ(t^(a-1) exp(t), t, 0, x) / gamma(a)}.
18555This implies that @samp{gammaP(a,inf) = 1} for any @expr{a} (see the 18555This implies that @samp{gammaP(a,inf) = 1} for any @expr{a} (see the
@@ -18583,7 +18583,7 @@ You can obtain these using the \kbd{H f G} [\code{gammag}] and
18583The @kbd{f b} (@code{calc-beta}) [@code{beta}] command computes the 18583The @kbd{f b} (@code{calc-beta}) [@code{beta}] command computes the
18584Euler beta function, which is defined in terms of the gamma function as 18584Euler beta function, which is defined in terms of the gamma function as
18585@texline @math{B(a,b) = \Gamma(a) \Gamma(b) / \Gamma(a+b)}, 18585@texline @math{B(a,b) = \Gamma(a) \Gamma(b) / \Gamma(a+b)},
18586@infoline @expr{beta(a,b) = gamma(a) gamma(b) / gamma(a+b)}, 18586@infoline @expr{beta(a,b) = gamma(a) gamma(b) / gamma(a+b)},
18587or by 18587or by
18588@texline @math{B(a,b) = \int_0^1 t^{a-1} (1-t)^{b-1} dt}. 18588@texline @math{B(a,b) = \int_0^1 t^{a-1} (1-t)^{b-1} dt}.
18589@infoline @expr{beta(a,b) = integ(t^(a-1) (1-t)^(b-1), t, 0, 1)}. 18589@infoline @expr{beta(a,b) = integ(t^(a-1) (1-t)^(b-1), t, 0, 1)}.
@@ -18606,7 +18606,7 @@ un-normalized version [@code{betaB}].
18606@tindex erf 18606@tindex erf
18607@tindex erfc 18607@tindex erfc
18608The @kbd{f e} (@code{calc-erf}) [@code{erf}] command computes the 18608The @kbd{f e} (@code{calc-erf}) [@code{erf}] command computes the
18609error function 18609error function
18610@texline @math{\hbox{erf}(x) = {2 \over \sqrt{\pi}} \int_0^x e^{-t^2} dt}. 18610@texline @math{\hbox{erf}(x) = {2 \over \sqrt{\pi}} \int_0^x e^{-t^2} dt}.
18611@infoline @expr{erf(x) = 2 integ(exp(-(t^2)), t, 0, x) / sqrt(pi)}. 18611@infoline @expr{erf(x) = 2 integ(exp(-(t^2)), t, 0, x) / sqrt(pi)}.
18612The complementary error function @kbd{I f e} (@code{calc-erfc}) [@code{erfc}] 18612The complementary error function @kbd{I f e} (@code{calc-erfc}) [@code{erfc}]
@@ -18784,9 +18784,9 @@ The @kbd{k r} (@code{calc-random}) [@code{random}] command produces
18784random numbers of various sorts. 18784random numbers of various sorts.
18785 18785
18786Given a positive numeric prefix argument @expr{M}, it produces a random 18786Given a positive numeric prefix argument @expr{M}, it produces a random
18787integer @expr{N} in the range 18787integer @expr{N} in the range
18788@texline @math{0 \le N < M}. 18788@texline @math{0 \le N < M}.
18789@infoline @expr{0 <= N < M}. 18789@infoline @expr{0 <= N < M}.
18790Each possible value @expr{N} appears with equal probability. 18790Each possible value @expr{N} appears with equal probability.
18791 18791
18792With no numeric prefix argument, the @kbd{k r} command takes its argument 18792With no numeric prefix argument, the @kbd{k r} command takes its argument
@@ -18794,17 +18794,17 @@ from the stack instead. Once again, if this is a positive integer @expr{M}
18794the result is a random integer less than @expr{M}. However, note that 18794the result is a random integer less than @expr{M}. However, note that
18795while numeric prefix arguments are limited to six digits or so, an @expr{M} 18795while numeric prefix arguments are limited to six digits or so, an @expr{M}
18796taken from the stack can be arbitrarily large. If @expr{M} is negative, 18796taken from the stack can be arbitrarily large. If @expr{M} is negative,
18797the result is a random integer in the range 18797the result is a random integer in the range
18798@texline @math{M < N \le 0}. 18798@texline @math{M < N \le 0}.
18799@infoline @expr{M < N <= 0}. 18799@infoline @expr{M < N <= 0}.
18800 18800
18801If the value on the stack is a floating-point number @expr{M}, the result 18801If the value on the stack is a floating-point number @expr{M}, the result
18802is a random floating-point number @expr{N} in the range 18802is a random floating-point number @expr{N} in the range
18803@texline @math{0 \le N < M} 18803@texline @math{0 \le N < M}
18804@infoline @expr{0 <= N < M} 18804@infoline @expr{0 <= N < M}
18805or 18805or
18806@texline @math{M < N \le 0}, 18806@texline @math{M < N \le 0},
18807@infoline @expr{M < N <= 0}, 18807@infoline @expr{M < N <= 0},
18808according to the sign of @expr{M}. 18808according to the sign of @expr{M}.
18809 18809
18810If @expr{M} is zero, the result is a Gaussian-distributed random real 18810If @expr{M} is zero, the result is a Gaussian-distributed random real
@@ -18812,14 +18812,14 @@ number; the distribution has a mean of zero and a standard deviation
18812of one. The algorithm used generates random numbers in pairs; thus, 18812of one. The algorithm used generates random numbers in pairs; thus,
18813every other call to this function will be especially fast. 18813every other call to this function will be especially fast.
18814 18814
18815If @expr{M} is an error form 18815If @expr{M} is an error form
18816@texline @math{m} @code{+/-} @math{\sigma} 18816@texline @math{m} @code{+/-} @math{\sigma}
18817@infoline @samp{m +/- s} 18817@infoline @samp{m +/- s}
18818where @var{m} and 18818where @var{m} and
18819@texline @math{\sigma} 18819@texline @math{\sigma}
18820@infoline @var{s} 18820@infoline @var{s}
18821are both real numbers, the result uses a Gaussian distribution with mean 18821are both real numbers, the result uses a Gaussian distribution with mean
18822@var{m} and standard deviation 18822@var{m} and standard deviation
18823@texline @math{\sigma}. 18823@texline @math{\sigma}.
18824@infoline @var{s}. 18824@infoline @var{s}.
18825 18825
@@ -18932,9 +18932,9 @@ generators that are typically used to implement @code{random}.
18932 18932
18933If @code{RandSeed} contains an integer, Calc uses this integer to 18933If @code{RandSeed} contains an integer, Calc uses this integer to
18934seed an ``additive congruential'' method (Knuth's algorithm 3.2.2A, 18934seed an ``additive congruential'' method (Knuth's algorithm 3.2.2A,
18935computing 18935computing
18936@texline @math{X_{n-55} - X_{n-24}}. 18936@texline @math{X_{n-55} - X_{n-24}}.
18937@infoline @expr{X_n-55 - X_n-24}). 18937@infoline @expr{X_n-55 - X_n-24}).
18938This method expands the seed 18938This method expands the seed
18939value into a large table which is maintained internally; the variable 18939value into a large table which is maintained internally; the variable
18940@code{RandSeed} is changed from, e.g., 42 to the vector @expr{[42]} 18940@code{RandSeed} is changed from, e.g., 42 to the vector @expr{[42]}
@@ -18970,18 +18970,18 @@ value.
18970To create a random floating-point number with precision @var{p}, Calc 18970To create a random floating-point number with precision @var{p}, Calc
18971simply creates a random @var{p}-digit integer and multiplies by 18971simply creates a random @var{p}-digit integer and multiplies by
18972@texline @math{10^{-p}}. 18972@texline @math{10^{-p}}.
18973@infoline @expr{10^-p}. 18973@infoline @expr{10^-p}.
18974The resulting random numbers should be very clean, but note 18974The resulting random numbers should be very clean, but note
18975that relatively small numbers will have few significant random digits. 18975that relatively small numbers will have few significant random digits.
18976In other words, with a precision of 12, you will occasionally get 18976In other words, with a precision of 12, you will occasionally get
18977numbers on the order of 18977numbers on the order of
18978@texline @math{10^{-9}} 18978@texline @math{10^{-9}}
18979@infoline @expr{10^-9} 18979@infoline @expr{10^-9}
18980or 18980or
18981@texline @math{10^{-10}}, 18981@texline @math{10^{-10}},
18982@infoline @expr{10^-10}, 18982@infoline @expr{10^-10},
18983but those numbers will only have two or three random digits since they 18983but those numbers will only have two or three random digits since they
18984correspond to small integers times 18984correspond to small integers times
18985@texline @math{10^{-12}}. 18985@texline @math{10^{-12}}.
18986@infoline @expr{10^-12}. 18986@infoline @expr{10^-12}.
18987 18987
@@ -19032,7 +19032,7 @@ numbers.
19032@tindex egcd 19032@tindex egcd
19033The @kbd{k E} (@code{calc-extended-gcd}) [@code{egcd}] command computes 19033The @kbd{k E} (@code{calc-extended-gcd}) [@code{egcd}] command computes
19034the GCD of two integers @expr{x} and @expr{y} and returns a vector 19034the GCD of two integers @expr{x} and @expr{y} and returns a vector
19035@expr{[g, a, b]} where 19035@expr{[g, a, b]} where
19036@texline @math{g = \gcd(x,y) = a x + b y}. 19036@texline @math{g = \gcd(x,y) = a x + b y}.
19037@infoline @expr{g = gcd(x,y) = a x + b y}. 19037@infoline @expr{g = gcd(x,y) = a x + b y}.
19038 19038
@@ -19119,11 +19119,11 @@ functions.
19119@tindex stir1 19119@tindex stir1
19120@tindex stir2 19120@tindex stir2
19121The @kbd{k s} (@code{calc-stirling-number}) [@code{stir1}] command 19121The @kbd{k s} (@code{calc-stirling-number}) [@code{stir1}] command
19122computes a Stirling number of the first 19122computes a Stirling number of the first
19123@texline kind@tie{}@math{n \brack m}, 19123@texline kind@tie{}@math{n \brack m},
19124@infoline kind, 19124@infoline kind,
19125given two integers @expr{n} and @expr{m} on the stack. The @kbd{H k s} 19125given two integers @expr{n} and @expr{m} on the stack. The @kbd{H k s}
19126[@code{stir2}] command computes a Stirling number of the second 19126[@code{stir2}] command computes a Stirling number of the second
19127@texline kind@tie{}@math{n \brace m}. 19127@texline kind@tie{}@math{n \brace m}.
19128@infoline kind. 19128@infoline kind.
19129These are the number of @expr{m}-cycle permutations of @expr{n} objects, 19129These are the number of @expr{m}-cycle permutations of @expr{n} objects,
@@ -19202,7 +19202,7 @@ analogously finds the next prime less than a given number.
19202@pindex calc-totient 19202@pindex calc-totient
19203@tindex totient 19203@tindex totient
19204The @kbd{k t} (@code{calc-totient}) [@code{totient}] command computes the 19204The @kbd{k t} (@code{calc-totient}) [@code{totient}] command computes the
19205Euler ``totient'' 19205Euler ``totient''
19206@texline function@tie{}@math{\phi(n)}, 19206@texline function@tie{}@math{\phi(n)},
19207@infoline function, 19207@infoline function,
19208the number of integers less than @expr{n} which 19208the number of integers less than @expr{n} which
@@ -19277,7 +19277,7 @@ recover the original arguments but substitute a new value for @expr{x}.)
19277@tindex ltpc 19277@tindex ltpc
19278The @samp{utpc(x,v)} function uses the chi-square distribution with 19278The @samp{utpc(x,v)} function uses the chi-square distribution with
19279@texline @math{\nu} 19279@texline @math{\nu}
19280@infoline @expr{v} 19280@infoline @expr{v}
19281degrees of freedom. It is the probability that a model is 19281degrees of freedom. It is the probability that a model is
19282correct if its chi-square statistic is @expr{x}. 19282correct if its chi-square statistic is @expr{x}.
19283 19283
@@ -19293,10 +19293,10 @@ correct if its chi-square statistic is @expr{x}.
19293@end ignore 19293@end ignore
19294@tindex ltpf 19294@tindex ltpf
19295The @samp{utpf(F,v1,v2)} function uses the F distribution, used in 19295The @samp{utpf(F,v1,v2)} function uses the F distribution, used in
19296various statistical tests. The parameters 19296various statistical tests. The parameters
19297@texline @math{\nu_1} 19297@texline @math{\nu_1}
19298@infoline @expr{v1} 19298@infoline @expr{v1}
19299and 19299and
19300@texline @math{\nu_2} 19300@texline @math{\nu_2}
19301@infoline @expr{v2} 19301@infoline @expr{v2}
19302are the degrees of freedom in the numerator and denominator, 19302are the degrees of freedom in the numerator and denominator,
@@ -19314,9 +19314,9 @@ respectively, used in computing the statistic @expr{F}.
19314@end ignore 19314@end ignore
19315@tindex ltpn 19315@tindex ltpn
19316The @samp{utpn(x,m,s)} function uses a normal (Gaussian) distribution 19316The @samp{utpn(x,m,s)} function uses a normal (Gaussian) distribution
19317with mean @expr{m} and standard deviation 19317with mean @expr{m} and standard deviation
19318@texline @math{\sigma}. 19318@texline @math{\sigma}.
19319@infoline @expr{s}. 19319@infoline @expr{s}.
19320It is the probability that such a normal-distributed random variable 19320It is the probability that such a normal-distributed random variable
19321would exceed @expr{x}. 19321would exceed @expr{x}.
19322 19322
@@ -19347,20 +19347,20 @@ Poisson random events will occur.
19347@end ignore 19347@end ignore
19348@tindex ltpt 19348@tindex ltpt
19349The @samp{utpt(t,v)} function uses the Student's ``t'' distribution 19349The @samp{utpt(t,v)} function uses the Student's ``t'' distribution
19350with 19350with
19351@texline @math{\nu} 19351@texline @math{\nu}
19352@infoline @expr{v} 19352@infoline @expr{v}
19353degrees of freedom. It is the probability that a 19353degrees of freedom. It is the probability that a
19354t-distributed random variable will be greater than @expr{t}. 19354t-distributed random variable will be greater than @expr{t}.
19355(Note: This computes the distribution function 19355(Note: This computes the distribution function
19356@texline @math{A(t|\nu)} 19356@texline @math{A(t|\nu)}
19357@infoline @expr{A(t|v)} 19357@infoline @expr{A(t|v)}
19358where 19358where
19359@texline @math{A(0|\nu) = 1} 19359@texline @math{A(0|\nu) = 1}
19360@infoline @expr{A(0|v) = 1} 19360@infoline @expr{A(0|v) = 1}
19361and 19361and
19362@texline @math{A(\infty|\nu) \to 0}. 19362@texline @math{A(\infty|\nu) \to 0}.
19363@infoline @expr{A(inf|v) -> 0}. 19363@infoline @expr{A(inf|v) -> 0}.
19364The @code{UTPT} operation on the HP-48 uses a different definition which 19364The @code{UTPT} operation on the HP-48 uses a different definition which
19365returns half of Calc's value: @samp{UTPT(t,v) = .5*utpt(t,v)}.) 19365returns half of Calc's value: @samp{UTPT(t,v) = .5*utpt(t,v)}.)
19366 19366
@@ -19670,7 +19670,7 @@ prefix, if specified, must match the size of the vector. If the value on
19670the stack is a scalar, it is used for each element on the diagonal, and 19670the stack is a scalar, it is used for each element on the diagonal, and
19671the prefix argument is required. 19671the prefix argument is required.
19672 19672
19673To build a constant square matrix, e.g., a 19673To build a constant square matrix, e.g., a
19674@texline @math{3\times3} 19674@texline @math{3\times3}
19675@infoline 3x3 19675@infoline 3x3
19676matrix filled with ones, use @kbd{0 M-3 v d 1 +}, i.e., build a zero 19676matrix filled with ones, use @kbd{0 M-3 v d 1 +}, i.e., build a zero
@@ -19911,7 +19911,7 @@ command.
19911With the Hyperbolic flag, @kbd{H v l} [@code{mdims}] computes a vector 19911With the Hyperbolic flag, @kbd{H v l} [@code{mdims}] computes a vector
19912of the dimensions of a vector, matrix, or higher-order object. For 19912of the dimensions of a vector, matrix, or higher-order object. For
19913example, @samp{mdims([[a,b,c],[d,e,f]])} returns @samp{[2, 3]} since 19913example, @samp{mdims([[a,b,c],[d,e,f]])} returns @samp{[2, 3]} since
19914its argument is a 19914its argument is a
19915@texline @math{2\times3} 19915@texline @math{2\times3}
19916@infoline 2x3 19916@infoline 2x3
19917matrix. 19917matrix.
@@ -19945,17 +19945,17 @@ If the number of columns does not evenly divide the number of elements
19945in the vector, the last row will be short and the result will not be 19945in the vector, the last row will be short and the result will not be
19946suitable for use as a matrix. For example, with the matrix 19946suitable for use as a matrix. For example, with the matrix
19947@samp{[[1, 2], @w{[3, 4]}]} on the stack, @kbd{v a 4} produces 19947@samp{[[1, 2], @w{[3, 4]}]} on the stack, @kbd{v a 4} produces
19948@samp{[[1, 2, 3, 4]]} (a 19948@samp{[[1, 2, 3, 4]]} (a
19949@texline @math{1\times4} 19949@texline @math{1\times4}
19950@infoline 1x4 19950@infoline 1x4
19951matrix), @kbd{v a 1} produces @samp{[[1], [2], [3], [4]]} (a 19951matrix), @kbd{v a 1} produces @samp{[[1], [2], [3], [4]]} (a
19952@texline @math{4\times1} 19952@texline @math{4\times1}
19953@infoline 4x1 19953@infoline 4x1
19954matrix), @kbd{v a 2} produces @samp{[[1, 2], [3, 4]]} (the original 19954matrix), @kbd{v a 2} produces @samp{[[1, 2], [3, 4]]} (the original
19955@texline @math{2\times2} 19955@texline @math{2\times2}
19956@infoline 2x2 19956@infoline 2x2
19957matrix), @w{@kbd{v a 3}} produces @samp{[[1, 2, 3], [4]]} (not a 19957matrix), @w{@kbd{v a 3}} produces @samp{[[1, 2, 3], [4]]} (not a
19958matrix), and @kbd{v a 0} produces the flattened list 19958matrix), and @kbd{v a 0} produces the flattened list
19959@samp{[1, 2, @w{3, 4}]}. 19959@samp{[1, 2, @w{3, 4}]}.
19960 19960
19961@cindex Sorting data 19961@cindex Sorting data
@@ -20040,9 +20040,9 @@ If no prefix is given, then you will be prompted for a vector which
20040will be used to determine the bins. (If a positive integer is given at 20040will be used to determine the bins. (If a positive integer is given at
20041this prompt, it will be still treated as if it were given as a 20041this prompt, it will be still treated as if it were given as a
20042prefix.) Each bin will consist of the interval of numbers closest to 20042prefix.) Each bin will consist of the interval of numbers closest to
20043the corresponding number of this new vector; if the vector 20043the corresponding number of this new vector; if the vector
20044@expr{[a, b, c, ...]} is entered at the prompt, the bins will be 20044@expr{[a, b, c, ...]} is entered at the prompt, the bins will be
20045@expr{(-inf, (a+b)/2]}, @expr{((a+b)/2, (b+c)/2]}, etc. The result of 20045@expr{(-inf, (a+b)/2]}, @expr{((a+b)/2, (b+c)/2]}, etc. The result of
20046this command will be a vector counting how many elements of the 20046this command will be a vector counting how many elements of the
20047original vector are in each bin. 20047original vector are in each bin.
20048 20048
@@ -20313,10 +20313,10 @@ and only if it is in both of the input sets. Thus if the input
20313sets are disjoint, i.e., if they share no common elements, the result 20313sets are disjoint, i.e., if they share no common elements, the result
20314will be the empty vector @samp{[]}. Note that the characters @kbd{V} 20314will be the empty vector @samp{[]}. Note that the characters @kbd{V}
20315and @kbd{^} were chosen to be close to the conventional mathematical 20315and @kbd{^} were chosen to be close to the conventional mathematical
20316notation for set 20316notation for set
20317@texline union@tie{}(@math{A \cup B}) 20317@texline union@tie{}(@math{A \cup B})
20318@infoline union 20318@infoline union
20319and 20319and
20320@texline intersection@tie{}(@math{A \cap B}). 20320@texline intersection@tie{}(@math{A \cap B}).
20321@infoline intersection. 20321@infoline intersection.
20322 20322
@@ -20432,7 +20432,7 @@ the same set. The set may include positive infinity, but must
20432not include any negative numbers. The input is interpreted as a 20432not include any negative numbers. The input is interpreted as a
20433set of integers in the sense of @kbd{V F} (@code{vfloor}). Beware 20433set of integers in the sense of @kbd{V F} (@code{vfloor}). Beware
20434that a simple input like @samp{[100]} can result in a huge integer 20434that a simple input like @samp{[100]} can result in a huge integer
20435representation 20435representation
20436@texline (@math{2^{100}}, a 31-digit integer, in this case). 20436@texline (@math{2^{100}}, a 31-digit integer, in this case).
20437@infoline (@expr{2^100}, a 31-digit integer, in this case). 20437@infoline (@expr{2^100}, a 31-digit integer, in this case).
20438 20438
@@ -20544,10 +20544,10 @@ plus or minus infinity.
20544@cindex Mean of data values 20544@cindex Mean of data values
20545The @kbd{u M} (@code{calc-vector-mean}) [@code{vmean}] command 20545The @kbd{u M} (@code{calc-vector-mean}) [@code{vmean}] command
20546computes the average (arithmetic mean) of the data values. 20546computes the average (arithmetic mean) of the data values.
20547If the inputs are error forms 20547If the inputs are error forms
20548@texline @math{x \pm \sigma}, 20548@texline @math{x \pm \sigma},
20549@infoline @samp{x +/- s}, 20549@infoline @samp{x +/- s},
20550this is the weighted mean of the @expr{x} values with weights 20550this is the weighted mean of the @expr{x} values with weights
20551@texline @math{1 /\sigma^2}. 20551@texline @math{1 /\sigma^2}.
20552@infoline @expr{1 / s^2}. 20552@infoline @expr{1 / s^2}.
20553@tex 20553@tex
@@ -20558,9 +20558,9 @@ If the inputs are not error forms, this is simply the sum of the
20558values divided by the count of the values. 20558values divided by the count of the values.
20559 20559
20560Note that a plain number can be considered an error form with 20560Note that a plain number can be considered an error form with
20561error 20561error
20562@texline @math{\sigma = 0}. 20562@texline @math{\sigma = 0}.
20563@infoline @expr{s = 0}. 20563@infoline @expr{s = 0}.
20564If the input to @kbd{u M} is a mixture of 20564If the input to @kbd{u M} is a mixture of
20565plain numbers and error forms, the result is the mean of the 20565plain numbers and error forms, the result is the mean of the
20566plain numbers, ignoring all values with non-zero errors. (By the 20566plain numbers, ignoring all values with non-zero errors. (By the
@@ -20662,7 +20662,7 @@ for a vector of numbers simply by using the @kbd{A} command.
20662@cindex Standard deviation 20662@cindex Standard deviation
20663@cindex Sample statistics 20663@cindex Sample statistics
20664The @kbd{u S} (@code{calc-vector-sdev}) [@code{vsdev}] command 20664The @kbd{u S} (@code{calc-vector-sdev}) [@code{vsdev}] command
20665computes the standard 20665computes the standard
20666@texline deviation@tie{}@math{\sigma} 20666@texline deviation@tie{}@math{\sigma}
20667@infoline deviation 20667@infoline deviation
20668of the data values. If the values are error forms, the errors are used 20668of the data values. If the values are error forms, the errors are used
@@ -20677,9 +20677,9 @@ $$ \sigma^2 = {1 \over N - 1} \sum (x_i - \mu)^2 $$
20677This function also applies to distributions. The standard deviation 20677This function also applies to distributions. The standard deviation
20678of a single error form is simply the error part. The standard deviation 20678of a single error form is simply the error part. The standard deviation
20679of a continuous interval happens to equal the difference between the 20679of a continuous interval happens to equal the difference between the
20680limits, divided by 20680limits, divided by
20681@texline @math{\sqrt{12}}. 20681@texline @math{\sqrt{12}}.
20682@infoline @expr{sqrt(12)}. 20682@infoline @expr{sqrt(12)}.
20683The standard deviation of an integer interval is the same as the 20683The standard deviation of an integer interval is the same as the
20684standard deviation of a vector of those integers. 20684standard deviation of a vector of those integers.
20685 20685
@@ -20714,7 +20714,7 @@ population standard deviation of the equivalent vector of integers.
20714The @kbd{H u S} (@code{calc-vector-variance}) [@code{vvar}] and 20714The @kbd{H u S} (@code{calc-vector-variance}) [@code{vvar}] and
20715@kbd{H I u S} (@code{calc-vector-pop-variance}) [@code{vpvar}] 20715@kbd{H I u S} (@code{calc-vector-pop-variance}) [@code{vpvar}]
20716commands compute the variance of the data values. The variance 20716commands compute the variance of the data values. The variance
20717is the 20717is the
20718@texline square@tie{}@math{\sigma^2} 20718@texline square@tie{}@math{\sigma^2}
20719@infoline square 20719@infoline square
20720of the standard deviation, i.e., the sum of the 20720of the standard deviation, i.e., the sum of the
@@ -20738,7 +20738,7 @@ The functions in this section take two arguments, which must be
20738vectors of equal size. The vectors are each flattened in the same 20738vectors of equal size. The vectors are each flattened in the same
20739way as by the single-variable statistical functions. Given a numeric 20739way as by the single-variable statistical functions. Given a numeric
20740prefix argument of 1, these functions instead take one object from 20740prefix argument of 1, these functions instead take one object from
20741the stack, which must be an 20741the stack, which must be an
20742@texline @math{N\times2} 20742@texline @math{N\times2}
20743@infoline Nx2 20743@infoline Nx2
20744matrix of data values. Once again, variable names can be used in place 20744matrix of data values. Once again, variable names can be used in place
@@ -20996,7 +20996,7 @@ be prompted for the number of arguments to use.
20996If any argument to @kbd{V M} is a matrix, the operator is normally mapped 20996If any argument to @kbd{V M} is a matrix, the operator is normally mapped
20997across all elements of the matrix. For example, given the matrix 20997across all elements of the matrix. For example, given the matrix
20998@expr{[[1, -2, 3], [-4, 5, -6]]}, @kbd{V M A} takes six absolute values to 20998@expr{[[1, -2, 3], [-4, 5, -6]]}, @kbd{V M A} takes six absolute values to
20999produce another 20999produce another
21000@texline @math{3\times2} 21000@texline @math{3\times2}
21001@infoline 3x2 21001@infoline 3x2
21002matrix, @expr{[[1, 2, 3], [4, 5, 6]]}. 21002matrix, @expr{[[1, 2, 3], [4, 5, 6]]}.
@@ -21612,8 +21612,8 @@ entire four-term sum.
21612@pindex calc-break-selections 21612@pindex calc-break-selections
21613The @kbd{j b} (@code{calc-break-selections}) command controls a mode 21613The @kbd{j b} (@code{calc-break-selections}) command controls a mode
21614in which the ``deep structure'' of these associative formulas shows 21614in which the ``deep structure'' of these associative formulas shows
21615through. Calc actually stores the above formulas as 21615through. Calc actually stores the above formulas as
21616@samp{((a + b) - c) + d} and @samp{x * (y * z)}. (Note that for certain 21616@samp{((a + b) - c) + d} and @samp{x * (y * z)}. (Note that for certain
21617obscure reasons, by default Calc treats multiplication as 21617obscure reasons, by default Calc treats multiplication as
21618right-associative.) Once you have enabled @kbd{j b} mode, selecting 21618right-associative.) Once you have enabled @kbd{j b} mode, selecting
21619with the cursor on the @samp{-} sign would only select the @samp{a + b - 21619with the cursor on the @samp{-} sign would only select the @samp{a + b -
@@ -22098,7 +22098,7 @@ of a quotient you can call it with a zero prefix: @kbd{C-u 0 j *}. For
22098example, if the formula on the stack is @samp{1 / (sqrt(a) + 1)}, you may 22098example, if the formula on the stack is @samp{1 / (sqrt(a) + 1)}, you may
22099wish to eliminate the square root in the denominator by multiplying 22099wish to eliminate the square root in the denominator by multiplying
22100the top and bottom by @samp{sqrt(a) - 1}. If you did this simply by using 22100the top and bottom by @samp{sqrt(a) - 1}. If you did this simply by using
22101a simple @kbd{j *} command, you would get 22101a simple @kbd{j *} command, you would get
22102@samp{(sqrt(a)-1)/ (sqrt(a) (sqrt(a) - 1) + sqrt(a) - 1)}. Instead, 22102@samp{(sqrt(a)-1)/ (sqrt(a) (sqrt(a) - 1) + sqrt(a) - 1)}. Instead,
22103you would probably want to use @kbd{C-u 0 j *}, which would expand the 22103you would probably want to use @kbd{C-u 0 j *}, which would expand the
22104bottom and give you the desired result @samp{(sqrt(a)-1)/(a-1)}. More 22104bottom and give you the desired result @samp{(sqrt(a)-1)/(a-1)}. More
@@ -22405,7 +22405,7 @@ The most basic default simplification is the evaluation of functions.
22405For example, @expr{2 + 3} is evaluated to @expr{5}, and @expr{@tfn{sqrt}(9)} 22405For example, @expr{2 + 3} is evaluated to @expr{5}, and @expr{@tfn{sqrt}(9)}
22406is evaluated to @expr{3}. Evaluation does not occur if the arguments 22406is evaluated to @expr{3}. Evaluation does not occur if the arguments
22407to a function are somehow of the wrong type @expr{@tfn{tan}([2,3,4])}), 22407to a function are somehow of the wrong type @expr{@tfn{tan}([2,3,4])}),
22408range (@expr{@tfn{tan}(90)}), or number (@expr{@tfn{tan}(3,5)}), 22408range (@expr{@tfn{tan}(90)}), or number (@expr{@tfn{tan}(3,5)}),
22409or if the function name is not recognized (@expr{@tfn{f}(5)}), or if 22409or if the function name is not recognized (@expr{@tfn{f}(5)}), or if
22410Symbolic mode (@pxref{Symbolic Mode}) prevents evaluation 22410Symbolic mode (@pxref{Symbolic Mode}) prevents evaluation
22411(@expr{@tfn{sqrt}(2)}). 22411(@expr{@tfn{sqrt}(2)}).
@@ -22452,7 +22452,7 @@ Arithmetic operators like @kbd{+} and @kbd{*} always take two
22452arguments in Calc's internal form. Sums and products of three or 22452arguments in Calc's internal form. Sums and products of three or
22453more terms are arranged by the associative law of algebra into 22453more terms are arranged by the associative law of algebra into
22454a left-associative form for sums, @expr{((a + b) + c) + d}, and 22454a left-associative form for sums, @expr{((a + b) + c) + d}, and
22455(by default) a right-associative form for products, 22455(by default) a right-associative form for products,
22456@expr{a * (b * (c * d))}. Formulas like @expr{(a + b) + (c + d)} are 22456@expr{a * (b * (c * d))}. Formulas like @expr{(a + b) + (c + d)} are
22457rearranged to left-associative form, though this rarely matters since 22457rearranged to left-associative form, though this rarely matters since
22458Calc's algebra commands are designed to hide the inner structure of sums 22458Calc's algebra commands are designed to hide the inner structure of sums
@@ -22533,7 +22533,7 @@ The product @expr{a (b + c)} is distributed over the sum only if
22533rewritten to @expr{a (c - b)}. 22533rewritten to @expr{a (c - b)}.
22534 22534
22535The distributive law of products and powers is used for adjacent 22535The distributive law of products and powers is used for adjacent
22536terms of the product: @expr{x^a x^b} goes to 22536terms of the product: @expr{x^a x^b} goes to
22537@texline @math{x^{a+b}} 22537@texline @math{x^{a+b}}
22538@infoline @expr{x^(a+b)} 22538@infoline @expr{x^(a+b)}
22539where @expr{a} is a number, or an implicit 1 (as in @expr{x}), 22539where @expr{a} is a number, or an implicit 1 (as in @expr{x}),
@@ -22544,9 +22544,9 @@ If the sum of the powers is zero, the product is simplified to
22544@expr{1} or to @samp{idn(1)} if Matrix mode is enabled. 22544@expr{1} or to @samp{idn(1)} if Matrix mode is enabled.
22545 22545
22546The product of a negative power times anything but another negative 22546The product of a negative power times anything but another negative
22547power is changed to use division: 22547power is changed to use division:
22548@texline @math{x^{-2} y} 22548@texline @math{x^{-2} y}
22549@infoline @expr{x^(-2) y} 22549@infoline @expr{x^(-2) y}
22550goes to @expr{y / x^2} unless Matrix mode is 22550goes to @expr{y / x^2} unless Matrix mode is
22551in effect and neither @expr{x} nor @expr{y} are scalar (in which 22551in effect and neither @expr{x} nor @expr{y} are scalar (in which
22552case it is considered unsafe to rearrange the order of the terms). 22552case it is considered unsafe to rearrange the order of the terms).
@@ -22568,13 +22568,13 @@ The quotient @expr{x / 0} is left unsimplified or changed to an
22568infinite quantity, as directed by the current infinite mode. 22568infinite quantity, as directed by the current infinite mode.
22569@xref{Infinite Mode}. 22569@xref{Infinite Mode}.
22570 22570
22571The expression 22571The expression
22572@texline @math{a / b^{-c}} 22572@texline @math{a / b^{-c}}
22573@infoline @expr{a / b^(-c)} 22573@infoline @expr{a / b^(-c)}
22574is changed to @expr{a b^c}, where @expr{-c} is any negative-looking 22574is changed to @expr{a b^c}, where @expr{-c} is any negative-looking
22575power. Also, @expr{1 / b^c} is changed to 22575power. Also, @expr{1 / b^c} is changed to
22576@texline @math{b^{-c}} 22576@texline @math{b^{-c}}
22577@infoline @expr{b^(-c)} 22577@infoline @expr{b^(-c)}
22578for any power @expr{c}. 22578for any power @expr{c}.
22579 22579
22580Also, @expr{(-a) / b} and @expr{a / (-b)} go to @expr{-(a/b)}; 22580Also, @expr{(-a) / b} and @expr{a / (-b)} go to @expr{-(a/b)};
@@ -22614,22 +22614,22 @@ are distributed to @expr{a^c b^c}, @expr{a^c / b^c} only if @expr{c}
22614is an integer, or if either @expr{a} or @expr{b} are nonnegative 22614is an integer, or if either @expr{a} or @expr{b} are nonnegative
22615real numbers. Powers of powers @expr{(a^b)^c} are simplified to 22615real numbers. Powers of powers @expr{(a^b)^c} are simplified to
22616@texline @math{a^{b c}} 22616@texline @math{a^{b c}}
22617@infoline @expr{a^(b c)} 22617@infoline @expr{a^(b c)}
22618only when @expr{c} is an integer and @expr{b c} also 22618only when @expr{c} is an integer and @expr{b c} also
22619evaluates to an integer. Without these restrictions these simplifications 22619evaluates to an integer. Without these restrictions these simplifications
22620would not be safe because of problems with principal values. 22620would not be safe because of problems with principal values.
22621(In other words, 22621(In other words,
22622@texline @math{((-3)^{1/2})^2} 22622@texline @math{((-3)^{1/2})^2}
22623@infoline @expr{((-3)^1:2)^2} 22623@infoline @expr{((-3)^1:2)^2}
22624is safe to simplify, but 22624is safe to simplify, but
22625@texline @math{((-3)^2)^{1/2}} 22625@texline @math{((-3)^2)^{1/2}}
22626@infoline @expr{((-3)^2)^1:2} 22626@infoline @expr{((-3)^2)^1:2}
22627is not.) @xref{Declarations}, for ways to inform Calc that your 22627is not.) @xref{Declarations}, for ways to inform Calc that your
22628variables satisfy these requirements. 22628variables satisfy these requirements.
22629 22629
22630As a special case of this rule, @expr{@tfn{sqrt}(x)^n} is simplified to 22630As a special case of this rule, @expr{@tfn{sqrt}(x)^n} is simplified to
22631@texline @math{x^{n/2}} 22631@texline @math{x^{n/2}}
22632@infoline @expr{x^(n/2)} 22632@infoline @expr{x^(n/2)}
22633only for even integers @expr{n}. 22633only for even integers @expr{n}.
22634 22634
22635If @expr{a} is known to be real, @expr{b} is an even integer, and 22635If @expr{a} is known to be real, @expr{b} is an even integer, and
@@ -22642,13 +22642,13 @@ for any negative-looking expression @expr{-a}.
22642 22642
22643Square roots @expr{@tfn{sqrt}(x)} generally act like one-half powers 22643Square roots @expr{@tfn{sqrt}(x)} generally act like one-half powers
22644@texline @math{x^{1:2}} 22644@texline @math{x^{1:2}}
22645@infoline @expr{x^1:2} 22645@infoline @expr{x^1:2}
22646for the purposes of the above-listed simplifications. 22646for the purposes of the above-listed simplifications.
22647 22647
22648Also, note that 22648Also, note that
22649@texline @math{1 / x^{1:2}} 22649@texline @math{1 / x^{1:2}}
22650@infoline @expr{1 / x^1:2} 22650@infoline @expr{1 / x^1:2}
22651is changed to 22651is changed to
22652@texline @math{x^{-1:2}}, 22652@texline @math{x^{-1:2}},
22653@infoline @expr{x^(-1:2)}, 22653@infoline @expr{x^(-1:2)},
22654but @expr{1 / @tfn{sqrt}(x)} is left alone. 22654but @expr{1 / @tfn{sqrt}(x)} is left alone.
@@ -22660,9 +22660,9 @@ but @expr{1 / @tfn{sqrt}(x)} is left alone.
22660Generic identity matrices (@pxref{Matrix Mode}) are simplified by the 22660Generic identity matrices (@pxref{Matrix Mode}) are simplified by the
22661following rules: @expr{@tfn{idn}(a) + b} to @expr{a + b} if @expr{b} 22661following rules: @expr{@tfn{idn}(a) + b} to @expr{a + b} if @expr{b}
22662is provably scalar, or expanded out if @expr{b} is a matrix; 22662is provably scalar, or expanded out if @expr{b} is a matrix;
22663@expr{@tfn{idn}(a) + @tfn{idn}(b)} to @expr{@tfn{idn}(a + b)}; 22663@expr{@tfn{idn}(a) + @tfn{idn}(b)} to @expr{@tfn{idn}(a + b)};
22664@expr{-@tfn{idn}(a)} to @expr{@tfn{idn}(-a)}; @expr{a @tfn{idn}(b)} to 22664@expr{-@tfn{idn}(a)} to @expr{@tfn{idn}(-a)}; @expr{a @tfn{idn}(b)} to
22665@expr{@tfn{idn}(a b)} if @expr{a} is provably scalar, or to @expr{a b} 22665@expr{@tfn{idn}(a b)} if @expr{a} is provably scalar, or to @expr{a b}
22666if @expr{a} is provably non-scalar; @expr{@tfn{idn}(a) @tfn{idn}(b)} to 22666if @expr{a} is provably non-scalar; @expr{@tfn{idn}(a) @tfn{idn}(b)} to
22667@expr{@tfn{idn}(a b)}; analogous simplifications for quotients involving 22667@expr{@tfn{idn}(a b)}; analogous simplifications for quotients involving
22668@code{idn}; and @expr{@tfn{idn}(a)^n} to @expr{@tfn{idn}(a^n)} where 22668@code{idn}; and @expr{@tfn{idn}(a)^n} to @expr{@tfn{idn}(a^n)} where
@@ -22683,7 +22683,7 @@ The expression @expr{@tfn{abs}(-x)} changes to @expr{@tfn{abs}(x)}.
22683The expression @expr{@tfn{abs}(@tfn{abs}(x))} changes to 22683The expression @expr{@tfn{abs}(@tfn{abs}(x))} changes to
22684@expr{@tfn{abs}(x)}; in fact, @expr{@tfn{abs}(x)} changes to @expr{x} or 22684@expr{@tfn{abs}(x)}; in fact, @expr{@tfn{abs}(x)} changes to @expr{x} or
22685@expr{-x} if @expr{x} is provably nonnegative or nonpositive 22685@expr{-x} if @expr{x} is provably nonnegative or nonpositive
22686(@pxref{Declarations}). 22686(@pxref{Declarations}).
22687 22687
22688While most functions do not recognize the variable @code{i} as an 22688While most functions do not recognize the variable @code{i} as an
22689imaginary number, the @code{arg} function does handle the two cases 22689imaginary number, the @code{arg} function does handle the two cases
@@ -22693,7 +22693,7 @@ The expression @expr{@tfn{conj}(@tfn{conj}(x))} simplifies to @expr{x}.
22693Various other expressions involving @code{conj}, @code{re}, and 22693Various other expressions involving @code{conj}, @code{re}, and
22694@code{im} are simplified, especially if some of the arguments are 22694@code{im} are simplified, especially if some of the arguments are
22695provably real or involve the constant @code{i}. For example, 22695provably real or involve the constant @code{i}. For example,
22696@expr{@tfn{conj}(a + b i)} is changed to 22696@expr{@tfn{conj}(a + b i)} is changed to
22697@expr{@tfn{conj}(a) - @tfn{conj}(b) i}, or to @expr{a - b i} if @expr{a} 22697@expr{@tfn{conj}(a) - @tfn{conj}(b) i}, or to @expr{a - b i} if @expr{a}
22698and @expr{b} are known to be real. 22698and @expr{b} are known to be real.
22699 22699
@@ -22836,7 +22836,7 @@ several ways. (Note that these will be left unevaluated only in
22836Symbolic mode.) First, square integer or rational factors are 22836Symbolic mode.) First, square integer or rational factors are
22837pulled out so that @expr{@tfn{sqrt}(8)} is rewritten as 22837pulled out so that @expr{@tfn{sqrt}(8)} is rewritten as
22838@texline @math{2\,@tfn{sqrt}(2)}. 22838@texline @math{2\,@tfn{sqrt}(2)}.
22839@infoline @expr{2 sqrt(2)}. 22839@infoline @expr{2 sqrt(2)}.
22840Conceptually speaking this implies factoring the argument into primes 22840Conceptually speaking this implies factoring the argument into primes
22841and moving pairs of primes out of the square root, but for reasons of 22841and moving pairs of primes out of the square root, but for reasons of
22842efficiency Calc only looks for primes up to 29. 22842efficiency Calc only looks for primes up to 29.
@@ -22879,7 +22879,7 @@ declared to be an integer.
22879Trigonometric functions are simplified in several ways. Whenever a 22879Trigonometric functions are simplified in several ways. Whenever a
22880products of two trigonometric functions can be replaced by a single 22880products of two trigonometric functions can be replaced by a single
22881function, the replacement is made; for example, 22881function, the replacement is made; for example,
22882@expr{@tfn{tan}(x) @tfn{cos}(x)} is simplified to @expr{@tfn{sin}(x)}. 22882@expr{@tfn{tan}(x) @tfn{cos}(x)} is simplified to @expr{@tfn{sin}(x)}.
22883Reciprocals of trigonometric functions are replaced by their reciprocal 22883Reciprocals of trigonometric functions are replaced by their reciprocal
22884function; for example, @expr{1/@tfn{sec}(x)} is simplified to 22884function; for example, @expr{1/@tfn{sec}(x)} is simplified to
22885@expr{@tfn{cos}(x)}. The corresponding simplifications for the 22885@expr{@tfn{cos}(x)}. The corresponding simplifications for the
@@ -22887,7 +22887,7 @@ hyperbolic functions are also handled.
22887 22887
22888Trigonometric functions of their inverse functions are 22888Trigonometric functions of their inverse functions are
22889simplified. The expression @expr{@tfn{sin}(@tfn{arcsin}(x))} is 22889simplified. The expression @expr{@tfn{sin}(@tfn{arcsin}(x))} is
22890simplified to @expr{x}, and similarly for @code{cos} and @code{tan}. 22890simplified to @expr{x}, and similarly for @code{cos} and @code{tan}.
22891Trigonometric functions of inverses of different trigonometric 22891Trigonometric functions of inverses of different trigonometric
22892functions can also be simplified, as in @expr{@tfn{sin}(@tfn{arccos}(x))} 22892functions can also be simplified, as in @expr{@tfn{sin}(@tfn{arccos}(x))}
22893to @expr{@tfn{sqrt}(1 - x^2)}. 22893to @expr{@tfn{sqrt}(1 - x^2)}.
@@ -22905,30 +22905,30 @@ No simplifications for inverse trigonometric and hyperbolic
22905functions are known, except for negative arguments of @code{arcsin}, 22905functions are known, except for negative arguments of @code{arcsin},
22906@code{arctan}, @code{arcsinh}, and @code{arctanh}. Note that 22906@code{arctan}, @code{arcsinh}, and @code{arctanh}. Note that
22907@expr{@tfn{arcsin}(@tfn{sin}(x))} can @emph{not} safely change to 22907@expr{@tfn{arcsin}(@tfn{sin}(x))} can @emph{not} safely change to
22908@expr{x}, since this only correct within an integer multiple of 22908@expr{x}, since this only correct within an integer multiple of
22909@texline @math{2 \pi} 22909@texline @math{2 \pi}
22910@infoline @expr{2 pi} 22910@infoline @expr{2 pi}
22911radians or 360 degrees. However, @expr{@tfn{arcsinh}(@tfn{sinh}(x))} is 22911radians or 360 degrees. However, @expr{@tfn{arcsinh}(@tfn{sinh}(x))} is
22912simplified to @expr{x} if @expr{x} is known to be real. 22912simplified to @expr{x} if @expr{x} is known to be real.
22913 22913
22914Several simplifications that apply to logarithms and exponentials 22914Several simplifications that apply to logarithms and exponentials
22915are that @expr{@tfn{exp}(@tfn{ln}(x))}, 22915are that @expr{@tfn{exp}(@tfn{ln}(x))},
22916@texline @tfn{e}@math{^{\ln(x)}}, 22916@texline @tfn{e}@math{^{\ln(x)}},
22917@infoline @expr{e^@tfn{ln}(x)}, 22917@infoline @expr{e^@tfn{ln}(x)},
22918and 22918and
22919@texline @math{10^{{\rm log10}(x)}} 22919@texline @math{10^{{\rm log10}(x)}}
22920@infoline @expr{10^@tfn{log10}(x)} 22920@infoline @expr{10^@tfn{log10}(x)}
22921all reduce to @expr{x}. Also, @expr{@tfn{ln}(@tfn{exp}(x))}, etc., can 22921all reduce to @expr{x}. Also, @expr{@tfn{ln}(@tfn{exp}(x))}, etc., can
22922reduce to @expr{x} if @expr{x} is provably real. The form 22922reduce to @expr{x} if @expr{x} is provably real. The form
22923@expr{@tfn{exp}(x)^y} is simplified to @expr{@tfn{exp}(x y)}. If @expr{x} 22923@expr{@tfn{exp}(x)^y} is simplified to @expr{@tfn{exp}(x y)}. If @expr{x}
22924is a suitable multiple of 22924is a suitable multiple of
22925@texline @math{\pi i} 22925@texline @math{\pi i}
22926@infoline @expr{pi i} 22926@infoline @expr{pi i}
22927(as described above for the trigonometric functions), then 22927(as described above for the trigonometric functions), then
22928@expr{@tfn{exp}(x)} or @expr{e^x} will be expanded. Finally, 22928@expr{@tfn{exp}(x)} or @expr{e^x} will be expanded. Finally,
22929@expr{@tfn{ln}(x)} is simplified to a form involving @code{pi} and 22929@expr{@tfn{ln}(x)} is simplified to a form involving @code{pi} and
22930@code{i} where @expr{x} is provably negative, positive imaginary, or 22930@code{i} where @expr{x} is provably negative, positive imaginary, or
22931negative imaginary. 22931negative imaginary.
22932 22932
22933The error functions @code{erf} and @code{erfc} are simplified when 22933The error functions @code{erf} and @code{erfc} are simplified when
22934their arguments are negative-looking or are calls to the @code{conj} 22934their arguments are negative-looking or are calls to the @code{conj}
@@ -23006,18 +23006,18 @@ values of @expr{x} in a certain range; outside that range, values
23006are folded down to the 360-degree range that the inverse trigonometric 23006are folded down to the 360-degree range that the inverse trigonometric
23007functions always produce. 23007functions always produce.
23008 23008
23009Powers of powers @expr{(x^a)^b} are simplified to 23009Powers of powers @expr{(x^a)^b} are simplified to
23010@texline @math{x^{a b}} 23010@texline @math{x^{a b}}
23011@infoline @expr{x^(a b)} 23011@infoline @expr{x^(a b)}
23012for all @expr{a} and @expr{b}. These results will be valid only 23012for all @expr{a} and @expr{b}. These results will be valid only
23013in a restricted range of @expr{x}; for example, in 23013in a restricted range of @expr{x}; for example, in
23014@texline @math{(x^2)^{1:2}} 23014@texline @math{(x^2)^{1:2}}
23015@infoline @expr{(x^2)^1:2} 23015@infoline @expr{(x^2)^1:2}
23016the powers cancel to get @expr{x}, which is valid for positive values 23016the powers cancel to get @expr{x}, which is valid for positive values
23017of @expr{x} but not for negative or complex values. 23017of @expr{x} but not for negative or complex values.
23018 23018
23019Similarly, @expr{@tfn{sqrt}(x^a)} and @expr{@tfn{sqrt}(x)^a} are both 23019Similarly, @expr{@tfn{sqrt}(x^a)} and @expr{@tfn{sqrt}(x)^a} are both
23020simplified (possibly unsafely) to 23020simplified (possibly unsafely) to
23021@texline @math{x^{a/2}}. 23021@texline @math{x^{a/2}}.
23022@infoline @expr{x^(a/2)}. 23022@infoline @expr{x^(a/2)}.
23023 23023
@@ -23027,7 +23027,7 @@ Forms like @expr{@tfn{sqrt}(1 - sin(x)^2)} are simplified to, e.g.,
23027 23027
23028Arguments of square roots are partially factored to look for 23028Arguments of square roots are partially factored to look for
23029squared terms that can be extracted. For example, 23029squared terms that can be extracted. For example,
23030@expr{@tfn{sqrt}(a^2 b^3 + a^3 b^2)} simplifies to 23030@expr{@tfn{sqrt}(a^2 b^3 + a^3 b^2)} simplifies to
23031@expr{a b @tfn{sqrt}(a+b)}. 23031@expr{a b @tfn{sqrt}(a+b)}.
23032 23032
23033The simplifications of @expr{@tfn{ln}(@tfn{exp}(x))}, 23033The simplifications of @expr{@tfn{ln}(@tfn{exp}(x))},
@@ -23093,9 +23093,9 @@ number for an answer, then the quotient simplifies to that number.
23093 23093
23094For powers and square roots, the ``unsafe'' simplifications 23094For powers and square roots, the ``unsafe'' simplifications
23095@expr{(a b)^c} to @expr{a^c b^c}, @expr{(a/b)^c} to @expr{a^c / b^c}, 23095@expr{(a b)^c} to @expr{a^c b^c}, @expr{(a/b)^c} to @expr{a^c / b^c},
23096and @expr{(a^b)^c} to 23096and @expr{(a^b)^c} to
23097@texline @math{a^{b c}} 23097@texline @math{a^{b c}}
23098@infoline @expr{a^(b c)} 23098@infoline @expr{a^(b c)}
23099are done if the powers are real numbers. (These are safe in the context 23099are done if the powers are real numbers. (These are safe in the context
23100of units because all numbers involved can reasonably be assumed to be 23100of units because all numbers involved can reasonably be assumed to be
23101real.) 23101real.)
@@ -23108,12 +23108,12 @@ according to the previous paragraph. For example, @samp{acre^1.5}
23108is simplified by noting that @expr{1.5 = 3:2}, that @samp{acre} 23108is simplified by noting that @expr{1.5 = 3:2}, that @samp{acre}
23109is defined in terms of @samp{m^2}, and that the 2 in the power of 23109is defined in terms of @samp{m^2}, and that the 2 in the power of
23110@code{m} is a multiple of 2 in @expr{3:2}. Thus, @code{acre^1.5} is 23110@code{m} is a multiple of 2 in @expr{3:2}. Thus, @code{acre^1.5} is
23111replaced by approximately 23111replaced by approximately
23112@texline @math{(4046 m^2)^{1.5}} 23112@texline @math{(4046 m^2)^{1.5}}
23113@infoline @expr{(4046 m^2)^1.5}, 23113@infoline @expr{(4046 m^2)^1.5},
23114which is then changed to 23114which is then changed to
23115@texline @math{4046^{1.5} \, (m^2)^{1.5}}, 23115@texline @math{4046^{1.5} \, (m^2)^{1.5}},
23116@infoline @expr{4046^1.5 (m^2)^1.5}, 23116@infoline @expr{4046^1.5 (m^2)^1.5},
23117then to @expr{257440 m^3}. 23117then to @expr{257440 m^3}.
23118 23118
23119The functions @code{float}, @code{frac}, @code{clean}, @code{abs}, 23119The functions @code{float}, @code{frac}, @code{clean}, @code{abs},
@@ -23401,7 +23401,7 @@ answer!
23401 23401
23402If you use the @code{deriv} function directly in an algebraic formula, 23402If you use the @code{deriv} function directly in an algebraic formula,
23403you can write @samp{deriv(f,x,x0)} which represents the derivative 23403you can write @samp{deriv(f,x,x0)} which represents the derivative
23404of @expr{f} with respect to @expr{x}, evaluated at the point 23404of @expr{f} with respect to @expr{x}, evaluated at the point
23405@texline @math{x=x_0}. 23405@texline @math{x=x_0}.
23406@infoline @expr{x=x0}. 23406@infoline @expr{x=x0}.
23407 23407
@@ -23441,7 +23441,7 @@ respect to a prompted-for variable. The integrator is not guaranteed to
23441work for all integrable functions, but it is able to integrate several 23441work for all integrable functions, but it is able to integrate several
23442large classes of formulas. In particular, any polynomial or rational 23442large classes of formulas. In particular, any polynomial or rational
23443function (a polynomial divided by a polynomial) is acceptable. 23443function (a polynomial divided by a polynomial) is acceptable.
23444(Rational functions don't have to be in explicit quotient form, however; 23444(Rational functions don't have to be in explicit quotient form, however;
23445@texline @math{x/(1+x^{-2})} 23445@texline @math{x/(1+x^{-2})}
23446@infoline @expr{x/(1+x^-2)} 23446@infoline @expr{x/(1+x^-2)}
23447is not strictly a quotient of polynomials, but it is equivalent to 23447is not strictly a quotient of polynomials, but it is equivalent to
@@ -23472,7 +23472,7 @@ integral $\int_a^b f(x) \, dx$.
23472 23472
23473Please note that the current implementation of Calc's integrator sometimes 23473Please note that the current implementation of Calc's integrator sometimes
23474produces results that are significantly more complex than they need to 23474produces results that are significantly more complex than they need to
23475be. For example, the integral Calc finds for 23475be. For example, the integral Calc finds for
23476@texline @math{1/(x+\sqrt{x^2+1})} 23476@texline @math{1/(x+\sqrt{x^2+1})}
23477@infoline @expr{1/(x+sqrt(x^2+1))} 23477@infoline @expr{1/(x+sqrt(x^2+1))}
23478is several times more complicated than the answer Mathematica 23478is several times more complicated than the answer Mathematica
@@ -23480,11 +23480,11 @@ returns for the same input, although the two forms are numerically
23480equivalent. Also, any indefinite integral should be considered to have 23480equivalent. Also, any indefinite integral should be considered to have
23481an arbitrary constant of integration added to it, although Calc does not 23481an arbitrary constant of integration added to it, although Calc does not
23482write an explicit constant of integration in its result. For example, 23482write an explicit constant of integration in its result. For example,
23483Calc's solution for 23483Calc's solution for
23484@texline @math{1/(1+\tan x)} 23484@texline @math{1/(1+\tan x)}
23485@infoline @expr{1/(1+tan(x))} 23485@infoline @expr{1/(1+tan(x))}
23486differs from the solution given in the @emph{CRC Math Tables} by a 23486differs from the solution given in the @emph{CRC Math Tables} by a
23487constant factor of 23487constant factor of
23488@texline @math{\pi i / 2} 23488@texline @math{\pi i / 2}
23489@infoline @expr{pi i / 2}, 23489@infoline @expr{pi i / 2},
23490due to a different choice of constant of integration. 23490due to a different choice of constant of integration.
@@ -23544,9 +23544,9 @@ in your @code{IntegRules}.
23544@tindex Ei 23544@tindex Ei
23545As a more serious example, the expression @samp{exp(x)/x} cannot be 23545As a more serious example, the expression @samp{exp(x)/x} cannot be
23546integrated in terms of the standard functions, so the ``exponential 23546integrated in terms of the standard functions, so the ``exponential
23547integral'' function 23547integral'' function
23548@texline @math{{\rm Ei}(x)} 23548@texline @math{{\rm Ei}(x)}
23549@infoline @expr{Ei(x)} 23549@infoline @expr{Ei(x)}
23550was invented to describe it. 23550was invented to describe it.
23551We can get Calc to do this integral in terms of a made-up @code{Ei} 23551We can get Calc to do this integral in terms of a made-up @code{Ei}
23552function by adding the rule @samp{[integtry(exp(x)/x, x) := Ei(x)]} 23552function by adding the rule @samp{[integtry(exp(x)/x, x) := Ei(x)]}
@@ -23717,18 +23717,18 @@ form @expr{X = 0}.
23717 23717
23718This command also works for inequalities, as in @expr{y < 3x + 6}. 23718This command also works for inequalities, as in @expr{y < 3x + 6}.
23719Some inequalities cannot be solved where the analogous equation could 23719Some inequalities cannot be solved where the analogous equation could
23720be; for example, solving 23720be; for example, solving
23721@texline @math{a < b \, c} 23721@texline @math{a < b \, c}
23722@infoline @expr{a < b c} 23722@infoline @expr{a < b c}
23723for @expr{b} is impossible 23723for @expr{b} is impossible
23724without knowing the sign of @expr{c}. In this case, @kbd{a S} will 23724without knowing the sign of @expr{c}. In this case, @kbd{a S} will
23725produce the result 23725produce the result
23726@texline @math{b \mathbin{\hbox{\code{!=}}} a/c} 23726@texline @math{b \mathbin{\hbox{\code{!=}}} a/c}
23727@infoline @expr{b != a/c} 23727@infoline @expr{b != a/c}
23728(using the not-equal-to operator) to signify that the direction of the 23728(using the not-equal-to operator) to signify that the direction of the
23729inequality is now unknown. The inequality 23729inequality is now unknown. The inequality
23730@texline @math{a \le b \, c} 23730@texline @math{a \le b \, c}
23731@infoline @expr{a <= b c} 23731@infoline @expr{a <= b c}
23732is not even partially solved. @xref{Declarations}, for a way to tell 23732is not even partially solved. @xref{Declarations}, for a way to tell
23733Calc that the signs of the variables in a formula are in fact known. 23733Calc that the signs of the variables in a formula are in fact known.
23734 23734
@@ -24186,13 +24186,13 @@ value of the variable which minimizes the formula's value, along
24186with the minimum value itself. 24186with the minimum value itself.
24187 24187
24188Note that this command looks for a @emph{local} minimum. Many functions 24188Note that this command looks for a @emph{local} minimum. Many functions
24189have more than one minimum; some, like 24189have more than one minimum; some, like
24190@texline @math{x \sin x}, 24190@texline @math{x \sin x},
24191@infoline @expr{x sin(x)}, 24191@infoline @expr{x sin(x)},
24192have infinitely many. In fact, there is no easy way to define the 24192have infinitely many. In fact, there is no easy way to define the
24193``global'' minimum of 24193``global'' minimum of
24194@texline @math{x \sin x} 24194@texline @math{x \sin x}
24195@infoline @expr{x sin(x)} 24195@infoline @expr{x sin(x)}
24196but Calc can still locate any particular local minimum 24196but Calc can still locate any particular local minimum
24197for you. Calc basically goes downhill from the initial guess until it 24197for you. Calc basically goes downhill from the initial guess until it
24198finds a point at which the function's value is greater both to the left 24198finds a point at which the function's value is greater both to the left
@@ -24271,7 +24271,7 @@ to be determined. For a typical set of measured data there will be
24271no single @expr{m} and @expr{b} that exactly fit the data; in this 24271no single @expr{m} and @expr{b} that exactly fit the data; in this
24272case, Calc chooses values of the parameters that provide the closest 24272case, Calc chooses values of the parameters that provide the closest
24273possible fit. The model formula can be entered in various ways after 24273possible fit. The model formula can be entered in various ways after
24274the key sequence @kbd{a F} is pressed. 24274the key sequence @kbd{a F} is pressed.
24275 24275
24276If the letter @kbd{P} is pressed after @kbd{a F} but before the model 24276If the letter @kbd{P} is pressed after @kbd{a F} but before the model
24277description is entered, the data as well as the model formula will be 24277description is entered, the data as well as the model formula will be
@@ -24319,7 +24319,7 @@ the @dfn{parameters} of the model.
24319 24319
24320The @kbd{a F} command takes the data set to be fitted from the stack. 24320The @kbd{a F} command takes the data set to be fitted from the stack.
24321By default, it expects the data in the form of a matrix. For example, 24321By default, it expects the data in the form of a matrix. For example,
24322for a linear or polynomial fit, this would be a 24322for a linear or polynomial fit, this would be a
24323@texline @math{2\times N} 24323@texline @math{2\times N}
24324@infoline 2xN 24324@infoline 2xN
24325matrix where the first row is a list of @expr{x} values and the second 24325matrix where the first row is a list of @expr{x} values and the second
@@ -24327,10 +24327,10 @@ row has the corresponding @expr{y} values. For the multilinear fit
24327shown above, the matrix would have four rows (@expr{x_1}, @expr{x_2}, 24327shown above, the matrix would have four rows (@expr{x_1}, @expr{x_2},
24328@expr{x_3}, and @expr{y}, respectively). 24328@expr{x_3}, and @expr{y}, respectively).
24329 24329
24330If you happen to have an 24330If you happen to have an
24331@texline @math{N\times2} 24331@texline @math{N\times2}
24332@infoline Nx2 24332@infoline Nx2
24333matrix instead of a 24333matrix instead of a
24334@texline @math{2\times N} 24334@texline @math{2\times N}
24335@infoline 2xN 24335@infoline 2xN
24336matrix, just press @kbd{v t} first to transpose the matrix. 24336matrix, just press @kbd{v t} first to transpose the matrix.
@@ -24425,13 +24425,13 @@ $$ \chi^2 = \sum_{i=1}^N (y_i - (a + b x_i))^2 $$
24425which is clearly zero if @expr{a + b x} exactly fits all data points, 24425which is clearly zero if @expr{a + b x} exactly fits all data points,
24426and increases as various @expr{a + b x_i} values fail to match the 24426and increases as various @expr{a + b x_i} values fail to match the
24427corresponding @expr{y_i} values. There are several reasons why the 24427corresponding @expr{y_i} values. There are several reasons why the
24428summand is squared, one of them being to ensure that 24428summand is squared, one of them being to ensure that
24429@texline @math{\chi^2 \ge 0}. 24429@texline @math{\chi^2 \ge 0}.
24430@infoline @expr{chi^2 >= 0}. 24430@infoline @expr{chi^2 >= 0}.
24431Least-squares fitting simply chooses the values of @expr{a} and @expr{b} 24431Least-squares fitting simply chooses the values of @expr{a} and @expr{b}
24432for which the error 24432for which the error
24433@texline @math{\chi^2} 24433@texline @math{\chi^2}
24434@infoline @expr{chi^2} 24434@infoline @expr{chi^2}
24435is as small as possible. 24435is as small as possible.
24436 24436
24437Other kinds of models do the same thing but with a different model 24437Other kinds of models do the same thing but with a different model
@@ -24593,9 +24593,9 @@ contain error forms. The data values must either all include errors
24593or all be plain numbers. Error forms can go anywhere but generally 24593or all be plain numbers. Error forms can go anywhere but generally
24594go on the numbers in the last row of the data matrix. If the last 24594go on the numbers in the last row of the data matrix. If the last
24595row contains error forms 24595row contains error forms
24596@texline `@var{y_i}@w{ @tfn{+/-} }@math{\sigma_i}', 24596@texline `@var{y_i}@w{ @tfn{+/-} }@math{\sigma_i}',
24597@infoline `@var{y_i}@w{ @tfn{+/-} }@var{sigma_i}', 24597@infoline `@var{y_i}@w{ @tfn{+/-} }@var{sigma_i}',
24598then the 24598then the
24599@texline @math{\chi^2} 24599@texline @math{\chi^2}
24600@infoline @expr{chi^2} 24600@infoline @expr{chi^2}
24601statistic is now, 24601statistic is now,
@@ -24617,9 +24617,9 @@ the fitting operation.
24617 24617
24618If there are error forms on other rows of the data matrix, all the 24618If there are error forms on other rows of the data matrix, all the
24619errors for a given data point are combined; the square root of the 24619errors for a given data point are combined; the square root of the
24620sum of the squares of the errors forms the 24620sum of the squares of the errors forms the
24621@texline @math{\sigma_i} 24621@texline @math{\sigma_i}
24622@infoline @expr{sigma_i} 24622@infoline @expr{sigma_i}
24623used for the data point. 24623used for the data point.
24624 24624
24625Both @kbd{a F} and @kbd{H a F} can accept error forms in the input 24625Both @kbd{a F} and @kbd{H a F} can accept error forms in the input
@@ -24627,19 +24627,19 @@ matrix, although if you are concerned about error analysis you will
24627probably use @kbd{H a F} so that the output also contains error 24627probably use @kbd{H a F} so that the output also contains error
24628estimates. 24628estimates.
24629 24629
24630If the input contains error forms but all the 24630If the input contains error forms but all the
24631@texline @math{\sigma_i} 24631@texline @math{\sigma_i}
24632@infoline @expr{sigma_i} 24632@infoline @expr{sigma_i}
24633values are the same, it is easy to see that the resulting fitted model 24633values are the same, it is easy to see that the resulting fitted model
24634will be the same as if the input did not have error forms at all 24634will be the same as if the input did not have error forms at all
24635@texline (@math{\chi^2} 24635@texline (@math{\chi^2}
24636@infoline (@expr{chi^2} 24636@infoline (@expr{chi^2}
24637is simply scaled uniformly by 24637is simply scaled uniformly by
24638@texline @math{1 / \sigma^2}, 24638@texline @math{1 / \sigma^2},
24639@infoline @expr{1 / sigma^2}, 24639@infoline @expr{1 / sigma^2},
24640which doesn't affect where it has a minimum). But there @emph{will} be 24640which doesn't affect where it has a minimum). But there @emph{will} be
24641a difference in the estimated errors of the coefficients reported by 24641a difference in the estimated errors of the coefficients reported by
24642@kbd{H a F}. 24642@kbd{H a F}.
24643 24643
24644Consult any text on statistical modeling of data for a discussion 24644Consult any text on statistical modeling of data for a discussion
24645of where these error estimates come from and how they should be 24645of where these error estimates come from and how they should be
@@ -24671,18 +24671,18 @@ will have length @expr{M = d+1} with the constant term first.
24671The covariance matrix @expr{C} computed from the fit. This is 24671The covariance matrix @expr{C} computed from the fit. This is
24672an @var{m}x@var{m} symmetric matrix; the diagonal elements 24672an @var{m}x@var{m} symmetric matrix; the diagonal elements
24673@texline @math{C_{jj}} 24673@texline @math{C_{jj}}
24674@infoline @expr{C_j_j} 24674@infoline @expr{C_j_j}
24675are the variances 24675are the variances
24676@texline @math{\sigma_j^2} 24676@texline @math{\sigma_j^2}
24677@infoline @expr{sigma_j^2} 24677@infoline @expr{sigma_j^2}
24678of the parameters. The other elements are covariances 24678of the parameters. The other elements are covariances
24679@texline @math{\sigma_{ij}^2} 24679@texline @math{\sigma_{ij}^2}
24680@infoline @expr{sigma_i_j^2} 24680@infoline @expr{sigma_i_j^2}
24681that describe the correlation between pairs of parameters. (A related 24681that describe the correlation between pairs of parameters. (A related
24682set of numbers, the @dfn{linear correlation coefficients} 24682set of numbers, the @dfn{linear correlation coefficients}
24683@texline @math{r_{ij}}, 24683@texline @math{r_{ij}},
24684@infoline @expr{r_i_j}, 24684@infoline @expr{r_i_j},
24685are defined as 24685are defined as
24686@texline @math{\sigma_{ij}^2 / \sigma_i \, \sigma_j}.) 24686@texline @math{\sigma_{ij}^2 / \sigma_i \, \sigma_j}.)
24687@infoline @expr{sigma_i_j^2 / sigma_i sigma_j}.) 24687@infoline @expr{sigma_i_j^2 / sigma_i sigma_j}.)
24688 24688
@@ -24693,35 +24693,35 @@ will instead be an empty vector; this is always the case for the
24693polynomial and multilinear fits described so far. 24693polynomial and multilinear fits described so far.
24694 24694
24695@item 24695@item
24696The value of 24696The value of
24697@texline @math{\chi^2} 24697@texline @math{\chi^2}
24698@infoline @expr{chi^2} 24698@infoline @expr{chi^2}
24699for the fit, calculated by the formulas shown above. This gives a 24699for the fit, calculated by the formulas shown above. This gives a
24700measure of the quality of the fit; statisticians consider 24700measure of the quality of the fit; statisticians consider
24701@texline @math{\chi^2 \approx N - M} 24701@texline @math{\chi^2 \approx N - M}
24702@infoline @expr{chi^2 = N - M} 24702@infoline @expr{chi^2 = N - M}
24703to indicate a moderately good fit (where again @expr{N} is the number of 24703to indicate a moderately good fit (where again @expr{N} is the number of
24704data points and @expr{M} is the number of parameters). 24704data points and @expr{M} is the number of parameters).
24705 24705
24706@item 24706@item
24707A measure of goodness of fit expressed as a probability @expr{Q}. 24707A measure of goodness of fit expressed as a probability @expr{Q}.
24708This is computed from the @code{utpc} probability distribution 24708This is computed from the @code{utpc} probability distribution
24709function using 24709function using
24710@texline @math{\chi^2} 24710@texline @math{\chi^2}
24711@infoline @expr{chi^2} 24711@infoline @expr{chi^2}
24712with @expr{N - M} degrees of freedom. A 24712with @expr{N - M} degrees of freedom. A
24713value of 0.5 implies a good fit; some texts recommend that often 24713value of 0.5 implies a good fit; some texts recommend that often
24714@expr{Q = 0.1} or even 0.001 can signify an acceptable fit. In 24714@expr{Q = 0.1} or even 0.001 can signify an acceptable fit. In
24715particular, 24715particular,
24716@texline @math{\chi^2} 24716@texline @math{\chi^2}
24717@infoline @expr{chi^2} 24717@infoline @expr{chi^2}
24718statistics assume the errors in your inputs 24718statistics assume the errors in your inputs
24719follow a normal (Gaussian) distribution; if they don't, you may 24719follow a normal (Gaussian) distribution; if they don't, you may
24720have to accept smaller values of @expr{Q}. 24720have to accept smaller values of @expr{Q}.
24721 24721
24722The @expr{Q} value is computed only if the input included error 24722The @expr{Q} value is computed only if the input included error
24723estimates. Otherwise, Calc will report the symbol @code{nan} 24723estimates. Otherwise, Calc will report the symbol @code{nan}
24724for @expr{Q}. The reason is that in this case the 24724for @expr{Q}. The reason is that in this case the
24725@texline @math{\chi^2} 24725@texline @math{\chi^2}
24726@infoline @expr{chi^2} 24726@infoline @expr{chi^2}
24727value has effectively been used to estimate the original errors 24727value has effectively been used to estimate the original errors
@@ -24763,7 +24763,7 @@ Power law. @mathit{a x^b y^c}.
24763@item q 24763@item q
24764Quadratic. @mathit{a + b (x-c)^2 + d (x-e)^2}. 24764Quadratic. @mathit{a + b (x-c)^2 + d (x-e)^2}.
24765@item g 24765@item g
24766Gaussian. 24766Gaussian.
24767@texline @math{{a \over b \sqrt{2 \pi}} \exp\left( -{1 \over 2} \left( x - c \over b \right)^2 \right)}. 24767@texline @math{{a \over b \sqrt{2 \pi}} \exp\left( -{1 \over 2} \left( x - c \over b \right)^2 \right)}.
24768@infoline @mathit{(a / b sqrt(2 pi)) exp(-0.5*((x-c)/b)^2)}. 24768@infoline @mathit{(a / b sqrt(2 pi)) exp(-0.5*((x-c)/b)^2)}.
24769@item s 24769@item s
@@ -24788,7 +24788,7 @@ the parameter values from the vector that is placed in the trail.)
24788 24788
24789All models except Gaussian, logistics, Hubbert and polynomials can 24789All models except Gaussian, logistics, Hubbert and polynomials can
24790generalize as shown to any number of independent variables. Also, all 24790generalize as shown to any number of independent variables. Also, all
24791the built-in models except for the logistic and Hubbert curves have an 24791the built-in models except for the logistic and Hubbert curves have an
24792additive or multiplicative parameter shown as @expr{a} in the above table 24792additive or multiplicative parameter shown as @expr{a} in the above table
24793which can be replaced by zero or one, as appropriate, by typing @kbd{h} 24793which can be replaced by zero or one, as appropriate, by typing @kbd{h}
24794before the model key. 24794before the model key.
@@ -24893,9 +24893,9 @@ form @samp{arcsin(y) = a t + b}. The @code{arcsin} function always
24893returns results in the range from @mathit{-90} to 90 degrees (or the 24893returns results in the range from @mathit{-90} to 90 degrees (or the
24894equivalent range in radians). Suppose you had data that you 24894equivalent range in radians). Suppose you had data that you
24895believed to represent roughly three oscillations of a sine wave, 24895believed to represent roughly three oscillations of a sine wave,
24896so that the argument of the sine might go from zero to 24896so that the argument of the sine might go from zero to
24897@texline @math{3\times360} 24897@texline @math{3\times360}
24898@infoline @mathit{3*360} 24898@infoline @mathit{3*360}
24899degrees. 24899degrees.
24900The above model would appear to be a good way to determine the 24900The above model would appear to be a good way to determine the
24901true frequency and phase of the sine wave, but in practice it 24901true frequency and phase of the sine wave, but in practice it
@@ -24955,18 +24955,18 @@ ln(y) = ln(a) + b ln(x)
24955@end example 24955@end example
24956 24956
24957@noindent 24957@noindent
24958which matches the desired form with 24958which matches the desired form with
24959@texline @math{Y = \ln(y)}, 24959@texline @math{Y = \ln(y)},
24960@infoline @expr{Y = ln(y)}, 24960@infoline @expr{Y = ln(y)},
24961@texline @math{A = \ln(a)}, 24961@texline @math{A = \ln(a)},
24962@infoline @expr{A = ln(a)}, 24962@infoline @expr{A = ln(a)},
24963@expr{F = 1}, @expr{B = b}, and 24963@expr{F = 1}, @expr{B = b}, and
24964@texline @math{G = \ln(x)}. 24964@texline @math{G = \ln(x)}.
24965@infoline @expr{G = ln(x)}. 24965@infoline @expr{G = ln(x)}.
24966Calc thus computes the logarithms of your @expr{y} and @expr{x} values, 24966Calc thus computes the logarithms of your @expr{y} and @expr{x} values,
24967does a linear fit for @expr{A} and @expr{B}, then solves to get 24967does a linear fit for @expr{A} and @expr{B}, then solves to get
24968@texline @math{a = \exp(A)} 24968@texline @math{a = \exp(A)}
24969@infoline @expr{a = exp(A)} 24969@infoline @expr{a = exp(A)}
24970and @expr{b = B}. 24970and @expr{b = B}.
24971 24971
24972Another interesting example is the ``quadratic'' model, which can 24972Another interesting example is the ``quadratic'' model, which can
@@ -25015,7 +25015,7 @@ from the list of parameters when you answer the variables prompt.
25015 25015
25016A last desperate step would be to use the general-purpose 25016A last desperate step would be to use the general-purpose
25017@code{minimize} function rather than @code{fit}. After all, both 25017@code{minimize} function rather than @code{fit}. After all, both
25018functions solve the problem of minimizing an expression (the 25018functions solve the problem of minimizing an expression (the
25019@texline @math{\chi^2} 25019@texline @math{\chi^2}
25020@infoline @expr{chi^2} 25020@infoline @expr{chi^2}
25021sum) by adjusting certain parameters in the expression. The @kbd{a F} 25021sum) by adjusting certain parameters in the expression. The @kbd{a F}
@@ -25026,9 +25026,9 @@ command can do the same thing by brute force.
25026A compromise would be to pick out a few parameters without which the 25026A compromise would be to pick out a few parameters without which the
25027fit is linearizable, and use @code{minimize} on a call to @code{fit} 25027fit is linearizable, and use @code{minimize} on a call to @code{fit}
25028which efficiently takes care of the rest of the parameters. The thing 25028which efficiently takes care of the rest of the parameters. The thing
25029to be minimized would be the value of 25029to be minimized would be the value of
25030@texline @math{\chi^2} 25030@texline @math{\chi^2}
25031@infoline @expr{chi^2} 25031@infoline @expr{chi^2}
25032returned as the fifth result of the @code{xfit} function: 25032returned as the fifth result of the @code{xfit} function:
25033 25033
25034@smallexample 25034@smallexample
@@ -25086,13 +25086,13 @@ of the sum of the squares of the errors. It then changes @expr{x}
25086and @expr{y} to be plain numbers, and makes @expr{z} into an error 25086and @expr{y} to be plain numbers, and makes @expr{z} into an error
25087form with this combined error. The @expr{Y(x,y,z)} part of the 25087form with this combined error. The @expr{Y(x,y,z)} part of the
25088linearized model is evaluated, and the result should be an error 25088linearized model is evaluated, and the result should be an error
25089form. The error part of that result is used for 25089form. The error part of that result is used for
25090@texline @math{\sigma_i} 25090@texline @math{\sigma_i}
25091@infoline @expr{sigma_i} 25091@infoline @expr{sigma_i}
25092for the data point. If for some reason @expr{Y(x,y,z)} does not return 25092for the data point. If for some reason @expr{Y(x,y,z)} does not return
25093an error form, the combined error from @expr{z} is used directly for 25093an error form, the combined error from @expr{z} is used directly for
25094@texline @math{\sigma_i}. 25094@texline @math{\sigma_i}.
25095@infoline @expr{sigma_i}. 25095@infoline @expr{sigma_i}.
25096Finally, @expr{z} is also stripped of its error 25096Finally, @expr{z} is also stripped of its error
25097for use in computing @expr{F(x,y,z)}, @expr{G(x,y,z)} and so on; 25097for use in computing @expr{F(x,y,z)}, @expr{G(x,y,z)} and so on;
25098the righthand side of the linearized model is computed in regular 25098the righthand side of the linearized model is computed in regular
@@ -25104,7 +25104,7 @@ depends only on the dependent variable @expr{z}, and in fact is
25104often simply equal to @expr{z}. For common cases like polynomials 25104often simply equal to @expr{z}. For common cases like polynomials
25105and multilinear models, the combined error is simply used as the 25105and multilinear models, the combined error is simply used as the
25106@texline @math{\sigma} 25106@texline @math{\sigma}
25107@infoline @expr{sigma} 25107@infoline @expr{sigma}
25108for the data point with no further ado.) 25108for the data point with no further ado.)
25109 25109
25110@tex 25110@tex
@@ -25481,7 +25481,7 @@ this would be a division by zero. But at @expr{k = k_0}, this
25481formula works out to the indeterminate form @expr{0 / 0}, which 25481formula works out to the indeterminate form @expr{0 / 0}, which
25482Calc will not assume is zero. Better would be to use 25482Calc will not assume is zero. Better would be to use
25483@samp{(k != k_0) ? 1/(k-k_0) : 0}; the @samp{? :} operator does 25483@samp{(k != k_0) ? 1/(k-k_0) : 0}; the @samp{? :} operator does
25484an ``if-then-else'' test: This expression says, ``if 25484an ``if-then-else'' test: This expression says, ``if
25485@texline @math{k \ne k_0}, 25485@texline @math{k \ne k_0},
25486@infoline @expr{k != k_0}, 25486@infoline @expr{k != k_0},
25487then @expr{1/(k-k_0)}, else zero.'' Now the formula @expr{1/(k-k_0)} 25487then @expr{1/(k-k_0)}, else zero.'' Now the formula @expr{1/(k-k_0)}
@@ -26496,16 +26496,16 @@ f(a b) := a f(b) :: real(a)]} is stored in variable @samp{linearF},
26496then the rule set @samp{[f(0) := 0, import(linearF)]} will apply 26496then the rule set @samp{[f(0) := 0, import(linearF)]} will apply
26497all three rules. It is possible to modify the imported rules 26497all three rules. It is possible to modify the imported rules
26498slightly: @samp{import(x, v1, x1, v2, x2, @dots{})} imports 26498slightly: @samp{import(x, v1, x1, v2, x2, @dots{})} imports
26499the rule set @expr{x} with all occurrences of 26499the rule set @expr{x} with all occurrences of
26500@texline @math{v_1}, 26500@texline @math{v_1},
26501@infoline @expr{v1}, 26501@infoline @expr{v1},
26502as either a variable name or a function name, replaced with 26502as either a variable name or a function name, replaced with
26503@texline @math{x_1} 26503@texline @math{x_1}
26504@infoline @expr{x1} 26504@infoline @expr{x1}
26505and so on. (If 26505and so on. (If
26506@texline @math{v_1} 26506@texline @math{v_1}
26507@infoline @expr{v1} 26507@infoline @expr{v1}
26508is used as a function name, then 26508is used as a function name, then
26509@texline @math{x_1} 26509@texline @math{x_1}
26510@infoline @expr{x1} 26510@infoline @expr{x1}
26511must be either a function name itself or a @w{@samp{< >}} nameless 26511must be either a function name itself or a @w{@samp{< >}} nameless
@@ -27609,7 +27609,7 @@ the keyboard macro @kbd{' tri($) @key{RET}} to make a command that applies
27609@code{tri} to the value on the top of the stack. @xref{Programming}. 27609@code{tri} to the value on the top of the stack. @xref{Programming}.
27610 27610
27611@cindex Quaternions 27611@cindex Quaternions
27612The following rule set, contributed by 27612The following rule set, contributed by
27613@texline Fran\c cois 27613@texline Fran\c cois
27614@infoline Francois 27614@infoline Francois
27615Pinard, implements @dfn{quaternions}, a generalization of the concept of 27615Pinard, implements @dfn{quaternions}, a generalization of the concept of
@@ -27764,9 +27764,9 @@ equivalent temperature on the Fahrenheit scale.
27764While many of Calc's conversion factors are exact, some are necessarily 27764While many of Calc's conversion factors are exact, some are necessarily
27765approximate. If Calc is in fraction mode (@pxref{Fraction Mode}), then 27765approximate. If Calc is in fraction mode (@pxref{Fraction Mode}), then
27766unit conversions will try to give exact, rational conversions, but it 27766unit conversions will try to give exact, rational conversions, but it
27767isn't always possible. Given @samp{55 mph} in fraction mode, typing 27767isn't always possible. Given @samp{55 mph} in fraction mode, typing
27768@kbd{u c m/s @key{RET}} produces @samp{15367:625 m/s}, for example, 27768@kbd{u c m/s @key{RET}} produces @samp{15367:625 m/s}, for example,
27769while typing @kbd{u c au/yr @key{RET}} produces 27769while typing @kbd{u c au/yr @key{RET}} produces
27770@samp{5.18665819999e-3 au/yr}. 27770@samp{5.18665819999e-3 au/yr}.
27771 27771
27772If the units you request are inconsistent with the original units, the 27772If the units you request are inconsistent with the original units, the
@@ -27994,7 +27994,7 @@ defined by the @TeX{} typesetting system: @samp{72.27 texpt = 1 in}.
27994Other units used by @TeX{} are available; they are @code{texpc} (a pica), 27994Other units used by @TeX{} are available; they are @code{texpc} (a pica),
27995@code{texbp} (a ``big point'', equal to a standard point which is larger 27995@code{texbp} (a ``big point'', equal to a standard point which is larger
27996than the point used by @TeX{}), @code{texdd} (a Didot point), 27996than the point used by @TeX{}), @code{texdd} (a Didot point),
27997@code{texcc} (a Cicero) and @code{texsp} (a scaled @TeX{} point, 27997@code{texcc} (a Cicero) and @code{texsp} (a scaled @TeX{} point,
27998all dimensions representable in @TeX{} are multiples of this value). 27998all dimensions representable in @TeX{} are multiples of this value).
27999 27999
28000When Calc is using the @TeX{} or La@TeX{} language mode (@pxref{TeX 28000When Calc is using the @TeX{} or La@TeX{} language mode (@pxref{TeX
@@ -28131,17 +28131,17 @@ The units @code{dB} (decibels) and @code{Np} (nepers) are logarithmic
28131units which are manipulated differently than standard units. Calc 28131units which are manipulated differently than standard units. Calc
28132provides commands to work with these logarithmic units. 28132provides commands to work with these logarithmic units.
28133 28133
28134Decibels and nepers are used to measure power quantities as well as 28134Decibels and nepers are used to measure power quantities as well as
28135field quantities (quantities whose squares are proportional to power); 28135field quantities (quantities whose squares are proportional to power);
28136these two types of quantities are handled slightly different from each 28136these two types of quantities are handled slightly different from each
28137other. By default the Calc commands work as if power quantities are 28137other. By default the Calc commands work as if power quantities are
28138being used; with the @kbd{H} prefix the Calc commands work as if field 28138being used; with the @kbd{H} prefix the Calc commands work as if field
28139quantities are being used. 28139quantities are being used.
28140 28140
28141The decibel level of a power 28141The decibel level of a power
28142@infoline @math{P1}, 28142@infoline @math{P1},
28143@texline @math{P_1}, 28143@texline @math{P_1},
28144relative to a reference power 28144relative to a reference power
28145@infoline @math{P0}, 28145@infoline @math{P0},
28146@texline @math{P_0}, 28146@texline @math{P_0},
28147is defined to be 28147is defined to be
@@ -28151,10 +28151,10 @@ is defined to be
28151one-tenth of a bel. The bel, named after Alexander Graham Bell, was 28151one-tenth of a bel. The bel, named after Alexander Graham Bell, was
28152considered to be too large of a unit and was effectively replaced by 28152considered to be too large of a unit and was effectively replaced by
28153the decibel.) If @math{F} is a field quantity with power 28153the decibel.) If @math{F} is a field quantity with power
28154@math{P=k F^2}, then a reference quantity of 28154@math{P=k F^2}, then a reference quantity of
28155@infoline @math{F0} 28155@infoline @math{F0}
28156@texline @math{F_0} 28156@texline @math{F_0}
28157would correspond to a power of 28157would correspond to a power of
28158@infoline @math{P0=k F0^2}. 28158@infoline @math{P0=k F0^2}.
28159@texline @math{P_{0}=kF_{0}^2}. 28159@texline @math{P_{0}=kF_{0}^2}.
28160If 28160If
@@ -28163,7 +28163,7 @@ If
28163then 28163then
28164 28164
28165@ifnottex 28165@ifnottex
28166@example 28166@example
2816710 log10(P1/P0) = 10 log10(F1^2/F0^2) = 20 log10(F1/F0). 2816710 log10(P1/P0) = 10 log10(F1^2/F0^2) = 20 log10(F1/F0).
28168@end example 28168@end example
28169@end ifnottex 28169@end ifnottex
@@ -28175,42 +28175,42 @@ $$ 10 \log_{10}(P_1/P_0) = 10 \log_{10}(F_1^2/F_0^2) = 20
28175@noindent 28175@noindent
28176In order to get the same decibel level regardless of whether a field 28176In order to get the same decibel level regardless of whether a field
28177quantity or the corresponding power quantity is used, the decibel 28177quantity or the corresponding power quantity is used, the decibel
28178level of a field quantity 28178level of a field quantity
28179@infoline @math{F1}, 28179@infoline @math{F1},
28180@texline @math{F_1}, 28180@texline @math{F_1},
28181relative to a reference 28181relative to a reference
28182@infoline @math{F0}, 28182@infoline @math{F0},
28183@texline @math{F_0}, 28183@texline @math{F_0},
28184is defined as 28184is defined as
28185@infoline @math{20 log10(F1/F0) dB}. 28185@infoline @math{20 log10(F1/F0) dB}.
28186@texline @math{20 \log_{10}(F_{1}/F_{0}) {\rm dB}}. 28186@texline @math{20 \log_{10}(F_{1}/F_{0}) {\rm dB}}.
28187For example, the decibel value of a sound pressure level of 28187For example, the decibel value of a sound pressure level of
28188@infoline @math{60 uPa} 28188@infoline @math{60 uPa}
28189@texline @math{60 \mu{\rm Pa}} 28189@texline @math{60 \mu{\rm Pa}}
28190relative to 28190relative to
28191@infoline @math{20 uPa} 28191@infoline @math{20 uPa}
28192@texline @math{20 \mu{\rm Pa}} 28192@texline @math{20 \mu{\rm Pa}}
28193(the threshhold of human hearing) is 28193(the threshold of human hearing) is
28194@infoline @math{20 log10(60 uPa/ 20 uPa) dB = 20 log10(3) dB}, 28194@infoline @math{20 log10(60 uPa/ 20 uPa) dB = 20 log10(3) dB},
28195@texline @math{20 \log_{10}(60 \mu{\rm Pa}/20 \mu{\rm Pa}) {\rm dB} = 20 \log_{10}(3) {\rm dB}}, 28195@texline @math{20 \log_{10}(60 \mu{\rm Pa}/20 \mu{\rm Pa}) {\rm dB} = 20 \log_{10}(3) {\rm dB}},
28196which is about 28196which is about
28197@infoline @math{9.54 dB}. 28197@infoline @math{9.54 dB}.
28198@texline @math{9.54 {\rm dB}}. 28198@texline @math{9.54 {\rm dB}}.
28199Note that in taking the ratio, the original units cancel and so these 28199Note that in taking the ratio, the original units cancel and so these
28200logarithmic units are dimensionless. 28200logarithmic units are dimensionless.
28201 28201
28202Nepers (named after John Napier, who is credited with inventing the 28202Nepers (named after John Napier, who is credited with inventing the
28203logarithm) are similar to bels except they use natural logarithms instead 28203logarithm) are similar to bels except they use natural logarithms instead
28204of common logarithms. The neper level of a power 28204of common logarithms. The neper level of a power
28205@infoline @math{P1}, 28205@infoline @math{P1},
28206@texline @math{P_1}, 28206@texline @math{P_1},
28207relative to a reference power 28207relative to a reference power
28208@infoline @math{P0}, 28208@infoline @math{P0},
28209@texline @math{P_0}, 28209@texline @math{P_0},
28210is 28210is
28211@infoline @math{(1/2) ln(P1/P0) Np}. 28211@infoline @math{(1/2) ln(P1/P0) Np}.
28212@texline @math{(1/2) \ln(P_1/P_0) {\rm Np}}. 28212@texline @math{(1/2) \ln(P_1/P_0) {\rm Np}}.
28213The neper level of a field 28213The neper level of a field
28214@infoline @math{F1}, 28214@infoline @math{F1},
28215@texline @math{F_1}, 28215@texline @math{F_1},
28216relative to a reference field 28216relative to a reference field
@@ -28223,13 +28223,13 @@ is
28223@vindex calc-lu-power-reference 28223@vindex calc-lu-power-reference
28224@vindex calc-lu-field-reference 28224@vindex calc-lu-field-reference
28225For power quantities, Calc uses 28225For power quantities, Calc uses
28226@infoline @math{1 mW} 28226@infoline @math{1 mW}
28227@texline @math{1 {\rm mW}} 28227@texline @math{1 {\rm mW}}
28228as the default reference quantity; this default can be changed by changing 28228as the default reference quantity; this default can be changed by changing
28229the value of the customizable variable 28229the value of the customizable variable
28230@code{calc-lu-power-reference} (@pxref{Customizing Calc}). 28230@code{calc-lu-power-reference} (@pxref{Customizing Calc}).
28231For field quantities, Calc uses 28231For field quantities, Calc uses
28232@infoline @math{20 uPa} 28232@infoline @math{20 uPa}
28233@texline @math{20 \mu{\rm Pa}} 28233@texline @math{20 \mu{\rm Pa}}
28234as the default reference quantity; this is the value used in acoustics 28234as the default reference quantity; this is the value used in acoustics
28235which is where decibels are commonly encountered. This default can be 28235which is where decibels are commonly encountered. This default can be
@@ -28247,9 +28247,9 @@ command computes the power quantity corresponding to a given number of
28247logarithmic units. With the capital @kbd{O} prefix, @kbd{O l q}, the 28247logarithmic units. With the capital @kbd{O} prefix, @kbd{O l q}, the
28248reference level will be read from the top of the stack. (In an 28248reference level will be read from the top of the stack. (In an
28249algebraic formula, @code{lupquant} can be given an optional second 28249algebraic formula, @code{lupquant} can be given an optional second
28250argument which will be used for the reference level.) For example, 28250argument which will be used for the reference level.) For example,
28251@code{20 dB @key{RET} l q} will return @code{100 mW}; 28251@code{20 dB @key{RET} l q} will return @code{100 mW};
28252@code{20 dB @key{RET} 4 W @key{RET} O l q} will return @code{400 W}. 28252@code{20 dB @key{RET} 4 W @key{RET} O l q} will return @code{400 W}.
28253The @kbd{H l q} [@code{lufquant}] command behaves like @kbd{l q} but 28253The @kbd{H l q} [@code{lufquant}] command behaves like @kbd{l q} but
28254computes field quantities instead of power quantities. 28254computes field quantities instead of power quantities.
28255 28255
@@ -28288,13 +28288,13 @@ the reference level can be given as an optional second argument.
28288@tindex lufdiv 28288@tindex lufdiv
28289The sum of two power or field quantities doesn't correspond to the sum 28289The sum of two power or field quantities doesn't correspond to the sum
28290of the corresponding decibel or neper levels. If the powers 28290of the corresponding decibel or neper levels. If the powers
28291corresponding to decibel levels 28291corresponding to decibel levels
28292@infoline @math{D1} 28292@infoline @math{D1}
28293@texline @math{D_1} 28293@texline @math{D_1}
28294and 28294and
28295@infoline @math{D2} 28295@infoline @math{D2}
28296@texline @math{D_2} 28296@texline @math{D_2}
28297are added, the corresponding decibel level ``sum'' will be 28297are added, the corresponding decibel level ``sum'' will be
28298 28298
28299@ifnottex 28299@ifnottex
28300@example 28300@example
@@ -28338,7 +28338,7 @@ $$ D + 10 \log_{10}(N) {\rm dB},$$
28338 28338
28339@noindent 28339@noindent
28340if a field quantity is multiplied by @math{N} the corresponding decibel level 28340if a field quantity is multiplied by @math{N} the corresponding decibel level
28341will be 28341will be
28342 28342
28343@ifnottex 28343@ifnottex
28344@example 28344@example
@@ -28375,31 +28375,31 @@ operating on notes.
28375Scientific pitch notation refers to a note by giving a letter 28375Scientific pitch notation refers to a note by giving a letter
28376A through G, possibly followed by a flat or sharp) with a subscript 28376A through G, possibly followed by a flat or sharp) with a subscript
28377indicating an octave number. Each octave starts with C and ends with 28377indicating an octave number. Each octave starts with C and ends with
28378B and 28378B and
28379@c increasing each note by a semitone will result 28379@c increasing each note by a semitone will result
28380@c in the sequence @expr{C}, @expr{C} sharp, @expr{D}, @expr{E} flat, @expr{E}, 28380@c in the sequence @expr{C}, @expr{C} sharp, @expr{D}, @expr{E} flat, @expr{E},
28381@c @expr{F}, @expr{F} sharp, @expr{G}, @expr{A} flat, @expr{A}, @expr{B} 28381@c @expr{F}, @expr{F} sharp, @expr{G}, @expr{A} flat, @expr{A}, @expr{B}
28382@c flat and @expr{B}. 28382@c flat and @expr{B}.
28383the octave numbered 0 was chosen to correspond to the lowest 28383the octave numbered 0 was chosen to correspond to the lowest
28384audible frequency. Using this system, middle C (about 261.625 Hz) 28384audible frequency. Using this system, middle C (about 261.625 Hz)
28385corresponds to the note @expr{C} in octave 4 and is denoted 28385corresponds to the note @expr{C} in octave 4 and is denoted
28386@expr{C_4}. Any frequency can be described by giving a note plus an 28386@expr{C_4}. Any frequency can be described by giving a note plus an
28387offset in cents (where a cent is a ratio of frequencies so that a 28387offset in cents (where a cent is a ratio of frequencies so that a
28388semitone consists of 100 cents). 28388semitone consists of 100 cents).
28389 28389
28390The midi note number system assigns numbers to notes so that 28390The midi note number system assigns numbers to notes so that
28391@expr{C_(-1)} corresponds to the midi note number 0 and @expr{G_9} 28391@expr{C_(-1)} corresponds to the midi note number 0 and @expr{G_9}
28392corresponds to the midi note number 127. A midi controller can have 28392corresponds to the midi note number 127. A midi controller can have
28393up to 128 keys and each midi note number from 0 to 127 corresponds to 28393up to 128 keys and each midi note number from 0 to 127 corresponds to
28394a possible key. 28394a possible key.
28395 28395
28396@kindex l s 28396@kindex l s
28397@pindex calc-spn 28397@pindex calc-spn
28398@tindex spn 28398@tindex spn
28399The @kbd{l s} (@code{calc-spn}) [@code{spn}] command converts either 28399The @kbd{l s} (@code{calc-spn}) [@code{spn}] command converts either
28400a frequency or a midi number to scientific pitch notation. For 28400a frequency or a midi number to scientific pitch notation. For
28401example, @code{500 Hz} gets converted to 28401example, @code{500 Hz} gets converted to
28402@code{B_4 + 21.3094853649 cents} and @code{84} to @code{C_6}. 28402@code{B_4 + 21.3094853649 cents} and @code{84} to @code{C_6}.
28403 28403
28404 28404
28405@kindex l m 28405@kindex l m
@@ -28464,7 +28464,7 @@ The @kbd{s s} (@code{calc-store}) command stores the value at the top of
28464the stack into a specified variable. It prompts you to enter the 28464the stack into a specified variable. It prompts you to enter the
28465name of the variable. If you press a single digit, the value is stored 28465name of the variable. If you press a single digit, the value is stored
28466immediately in one of the ``quick'' variables @code{q0} through 28466immediately in one of the ``quick'' variables @code{q0} through
28467@code{q9}. Or you can enter any variable name. 28467@code{q9}. Or you can enter any variable name.
28468 28468
28469@kindex s t 28469@kindex s t
28470@pindex calc-store-into 28470@pindex calc-store-into
@@ -28554,12 +28554,12 @@ and @kbd{s ]} which decrease or increase a variable by one.
28554All the arithmetic stores accept the Inverse prefix to reverse the 28554All the arithmetic stores accept the Inverse prefix to reverse the
28555order of the operands. If @expr{v} represents the contents of the 28555order of the operands. If @expr{v} represents the contents of the
28556variable, and @expr{a} is the value drawn from the stack, then regular 28556variable, and @expr{a} is the value drawn from the stack, then regular
28557@w{@kbd{s -}} assigns 28557@w{@kbd{s -}} assigns
28558@texline @math{v \coloneq v - a}, 28558@texline @math{v \coloneq v - a},
28559@infoline @expr{v := v - a}, 28559@infoline @expr{v := v - a},
28560but @kbd{I s -} assigns 28560but @kbd{I s -} assigns
28561@texline @math{v \coloneq a - v}. 28561@texline @math{v \coloneq a - v}.
28562@infoline @expr{v := a - v}. 28562@infoline @expr{v := a - v}.
28563While @kbd{I s *} might seem pointless, it is 28563While @kbd{I s *} might seem pointless, it is
28564useful if matrix multiplication is involved. Actually, all the 28564useful if matrix multiplication is involved. Actually, all the
28565arithmetic stores use formulas designed to behave usefully both 28565arithmetic stores use formulas designed to behave usefully both
@@ -28668,7 +28668,7 @@ magic property is preserved, however, when a variable is copied with
28668@kindex s k 28668@kindex s k
28669@pindex calc-copy-special-constant 28669@pindex calc-copy-special-constant
28670If one of the ``special constants'' is redefined (or undefined) so that 28670If one of the ``special constants'' is redefined (or undefined) so that
28671it no longer has its magic property, the property can be restored with 28671it no longer has its magic property, the property can be restored with
28672@kbd{s k} (@code{calc-copy-special-constant}). This command will prompt 28672@kbd{s k} (@code{calc-copy-special-constant}). This command will prompt
28673for a special constant and a variable to store it in, and so a special 28673for a special constant and a variable to store it in, and so a special
28674constant can be stored in any variable. Here, the special constant that 28674constant can be stored in any variable. Here, the special constant that
@@ -28850,7 +28850,7 @@ explicitly naming them in an @kbd{s p} command.)
28850The @kbd{s i} (@code{calc-insert-variables}) command writes 28850The @kbd{s i} (@code{calc-insert-variables}) command writes
28851the values of all Calc variables into a specified buffer. 28851the values of all Calc variables into a specified buffer.
28852The variables are written with the prefix @code{var-} in the form of 28852The variables are written with the prefix @code{var-} in the form of
28853Lisp @code{setq} commands 28853Lisp @code{setq} commands
28854which store the values in string form. You can place these commands 28854which store the values in string form. You can place these commands
28855in your Calc init file (or @file{.emacs}) if you wish, though in this case it 28855in your Calc init file (or @file{.emacs}) if you wish, though in this case it
28856would be easier to use @kbd{s p @key{RET}}. (Note that @kbd{s i} 28856would be easier to use @kbd{s p @key{RET}}. (Note that @kbd{s i}
@@ -29159,9 +29159,9 @@ In the first case, ``x'' and ``y'' are each vectors (not necessarily of
29159the same length); either or both may instead be interval forms. The 29159the same length); either or both may instead be interval forms. The
29160``z'' value must be a matrix with the same number of rows as elements 29160``z'' value must be a matrix with the same number of rows as elements
29161in ``x'', and the same number of columns as elements in ``y''. The 29161in ``x'', and the same number of columns as elements in ``y''. The
29162result is a surface plot where 29162result is a surface plot where
29163@texline @math{z_{ij}} 29163@texline @math{z_{ij}}
29164@infoline @expr{z_ij} 29164@infoline @expr{z_ij}
29165is the height of the point 29165is the height of the point
29166at coordinate @expr{(x_i, y_j)} on the surface. The 3D graph will 29166at coordinate @expr{(x_i, y_j)} on the surface. The 3D graph will
29167be displayed from a certain default viewpoint; you can change this 29167be displayed from a certain default viewpoint; you can change this
@@ -29270,9 +29270,9 @@ that don't have common ``x'' values. (Of course, the range of ``x''
29270values covered by all the curves ought to be roughly the same if 29270values covered by all the curves ought to be roughly the same if
29271they are to look nice on the same graph.) 29271they are to look nice on the same graph.)
29272 29272
29273For example, to plot 29273For example, to plot
29274@texline @math{\sin n x} 29274@texline @math{\sin n x}
29275@infoline @expr{sin(n x)} 29275@infoline @expr{sin(n x)}
29276for integers @expr{n} 29276for integers @expr{n}
29277from 1 to 5, you could use @kbd{v x} to create a vector of integers 29277from 1 to 5, you could use @kbd{v x} to create a vector of integers
29278(@expr{n}), then @kbd{V M '} or @kbd{V M $} to map @samp{sin(n x)} 29278(@expr{n}), then @kbd{V M '} or @kbd{V M $} to map @samp{sin(n x)}
@@ -29510,8 +29510,8 @@ available for any device.
29510The @kbd{g S} (@code{calc-graph-point-style}) command similarly turns 29510The @kbd{g S} (@code{calc-graph-point-style}) command similarly turns
29511the symbols at the data points on or off, or sets the point style. 29511the symbols at the data points on or off, or sets the point style.
29512If you turn both lines and points off, the data points will show as 29512If you turn both lines and points off, the data points will show as
29513tiny dots. If the ``y'' values being plotted contain error forms and 29513tiny dots. If the ``y'' values being plotted contain error forms and
29514the connecting lines are turned off, then this command will also turn 29514the connecting lines are turned off, then this command will also turn
29515the error bars on or off. 29515the error bars on or off.
29516 29516
29517@cindex @code{LineStyles} variable 29517@cindex @code{LineStyles} variable
@@ -29563,7 +29563,7 @@ terminals with no special graphics facilities. It writes a crude
29563picture of the graph composed of characters like @code{-} and @code{|} 29563picture of the graph composed of characters like @code{-} and @code{|}
29564to a buffer called @samp{*Gnuplot Trail*}, which Calc then displays. 29564to a buffer called @samp{*Gnuplot Trail*}, which Calc then displays.
29565The graph is made the same size as the Emacs screen, which on most 29565The graph is made the same size as the Emacs screen, which on most
29566dumb terminals will be 29566dumb terminals will be
29567@texline @math{80\times24} 29567@texline @math{80\times24}
29568@infoline 80x24 29568@infoline 80x24
29569characters. The graph is displayed in 29569characters. The graph is displayed in
@@ -29820,7 +29820,7 @@ difference.)
29820@pindex calc-prepend-to-register 29820@pindex calc-prepend-to-register
29821@pindex calc-append-to-register 29821@pindex calc-append-to-register
29822@cindex Registers 29822@cindex Registers
29823An alternative to killing and yanking stack entries is using 29823An alternative to killing and yanking stack entries is using
29824registers in Calc. Saving stack entries in registers is like 29824registers in Calc. Saving stack entries in registers is like
29825saving text in normal Emacs registers; although, like Calc's kill 29825saving text in normal Emacs registers; although, like Calc's kill
29826commands, register commands always operate on whole stack 29826commands, register commands always operate on whole stack
@@ -29935,7 +29935,7 @@ separately as a matrix element. If a line contained
29935would correctly split the line into two error forms. 29935would correctly split the line into two error forms.
29936 29936
29937@xref{Matrix Functions}, to see how to pull the matrix apart into its 29937@xref{Matrix Functions}, to see how to pull the matrix apart into its
29938constituent rows and columns. (If it is a 29938constituent rows and columns. (If it is a
29939@texline @math{1\times1} 29939@texline @math{1\times1}
29940@infoline 1x1 29940@infoline 1x1
29941matrix, just hit @kbd{v u} (@code{calc-unpack}) twice.) 29941matrix, just hit @kbd{v u} (@code{calc-unpack}) twice.)
@@ -30273,7 +30273,7 @@ same limit as last time.
30273 30273
30274@key{INV GCD} computes the LCM (least common multiple) function. 30274@key{INV GCD} computes the LCM (least common multiple) function.
30275 30275
30276@key{INV FACT} is the gamma function. 30276@key{INV FACT} is the gamma function.
30277@texline @math{\Gamma(x) = (x-1)!}. 30277@texline @math{\Gamma(x) = (x-1)!}.
30278@infoline @expr{gamma(x) = (x-1)!}. 30278@infoline @expr{gamma(x) = (x-1)!}.
30279 30279
@@ -30490,7 +30490,7 @@ Similarly, Calc will use @TeX{} language for @code{tex-mode},
30490@code{plain-tex-mode} and @code{context-mode}, C language for 30490@code{plain-tex-mode} and @code{context-mode}, C language for
30491@code{c-mode} and @code{c++-mode}, FORTRAN language for 30491@code{c-mode} and @code{c++-mode}, FORTRAN language for
30492@code{fortran-mode} and @code{f90-mode}, Pascal for @code{pascal-mode}, 30492@code{fortran-mode} and @code{f90-mode}, Pascal for @code{pascal-mode},
30493and eqn for @code{nroff-mode} (@pxref{Customizing Calc}). 30493and eqn for @code{nroff-mode} (@pxref{Customizing Calc}).
30494These can be overridden with Calc's mode 30494These can be overridden with Calc's mode
30495changing commands (@pxref{Mode Settings in Embedded Mode}). If no 30495changing commands (@pxref{Mode Settings in Embedded Mode}). If no
30496suitable language is available, Calc will continue with its current language. 30496suitable language is available, Calc will continue with its current language.
@@ -30670,13 +30670,13 @@ version.
30670 30670
30671Plain formulas are preceded and followed by @samp{%%%} signs 30671Plain formulas are preceded and followed by @samp{%%%} signs
30672by default. This notation has the advantage that the @samp{%} 30672by default. This notation has the advantage that the @samp{%}
30673character begins a comment in @TeX{} and La@TeX{}, so if your formula is 30673character begins a comment in @TeX{} and La@TeX{}, so if your formula is
30674embedded in a @TeX{} or La@TeX{} document its plain version will be 30674embedded in a @TeX{} or La@TeX{} document its plain version will be
30675invisible in the final printed copy. Certain major modes have different 30675invisible in the final printed copy. Certain major modes have different
30676delimiters to ensure that the ``plain'' version will be 30676delimiters to ensure that the ``plain'' version will be
30677in a comment for those modes, also. 30677in a comment for those modes, also.
30678See @ref{Customizing Embedded Mode} to see how to change the ``plain'' 30678See @ref{Customizing Embedded Mode} to see how to change the ``plain''
30679formula delimiters. 30679formula delimiters.
30680 30680
30681There are several notations which Calc's parser for ``big'' 30681There are several notations which Calc's parser for ``big''
30682formatted formulas can't yet recognize. In particular, it can't 30682formatted formulas can't yet recognize. In particular, it can't
@@ -31178,7 +31178,7 @@ We would have to go down to the other formula and press @kbd{C-x * u}
31178on it in order to get it to notice the new annotation. 31178on it in order to get it to notice the new annotation.
31179 31179
31180Two more mode-recording modes selectable by @kbd{m R} are available 31180Two more mode-recording modes selectable by @kbd{m R} are available
31181which are also available outside of Embedded mode. 31181which are also available outside of Embedded mode.
31182(@pxref{General Mode Commands}.) They are @code{Save}, in which mode 31182(@pxref{General Mode Commands}.) They are @code{Save}, in which mode
31183settings are recorded permanently in your Calc init file (the file given 31183settings are recorded permanently in your Calc init file (the file given
31184by the variable @code{calc-settings-file}, typically @file{~/.emacs.d/calc.el}) 31184by the variable @code{calc-settings-file}, typically @file{~/.emacs.d/calc.el})
@@ -31195,11 +31195,11 @@ for @code{Save} have no effect.
31195 31195
31196@noindent 31196@noindent
31197You can modify Embedded mode's behavior by setting various Lisp 31197You can modify Embedded mode's behavior by setting various Lisp
31198variables described here. These variables are customizable 31198variables described here. These variables are customizable
31199(@pxref{Customizing Calc}), or you can use @kbd{M-x set-variable} 31199(@pxref{Customizing Calc}), or you can use @kbd{M-x set-variable}
31200or @kbd{M-x edit-options} to adjust a variable on the fly. 31200or @kbd{M-x edit-options} to adjust a variable on the fly.
31201(Another possibility would be to use a file-local variable annotation at 31201(Another possibility would be to use a file-local variable annotation at
31202the end of the file; 31202the end of the file;
31203@pxref{File Variables, , Local Variables in Files, emacs, the Emacs manual}.) 31203@pxref{File Variables, , Local Variables in Files, emacs, the Emacs manual}.)
31204Many of the variables given mentioned here can be set to depend on the 31204Many of the variables given mentioned here can be set to depend on the
31205major mode of the editing buffer (@pxref{Customizing Calc}). 31205major mode of the editing buffer (@pxref{Customizing Calc}).
@@ -31334,7 +31334,7 @@ Calc never scans for this string; Calc always looks for the
31334annotation itself. But this is the string that is inserted before 31334annotation itself. But this is the string that is inserted before
31335the opening bracket when Calc adds an annotation on its own. 31335the opening bracket when Calc adds an annotation on its own.
31336The default is @code{"% "}, but may be different for different major 31336The default is @code{"% "}, but may be different for different major
31337modes. 31337modes.
31338 31338
31339@vindex calc-embedded-close-mode 31339@vindex calc-embedded-close-mode
31340The @code{calc-embedded-close-mode} variable is a string which 31340The @code{calc-embedded-close-mode} variable is a string which
@@ -31459,7 +31459,7 @@ without its key binding, type @kbd{M-x} and enter a function name. (The
31459(If the command you give implies a function, the function will be saved, 31459(If the command you give implies a function, the function will be saved,
31460and if the function has any display formats, those will be saved, but 31460and if the function has any display formats, those will be saved, but
31461not the other way around: Saving a function will not save any commands 31461not the other way around: Saving a function will not save any commands
31462or key bindings associated with the function.) 31462or key bindings associated with the function.)
31463 31463
31464@kindex Z E 31464@kindex Z E
31465@pindex calc-user-define-edit 31465@pindex calc-user-define-edit
@@ -31542,7 +31542,7 @@ Once you have bound your keyboard macro to a key, you can use
31542@cindex Keyboard macros, editing 31542@cindex Keyboard macros, editing
31543The @kbd{Z E} (@code{calc-user-define-edit}) command on a key that has 31543The @kbd{Z E} (@code{calc-user-define-edit}) command on a key that has
31544been defined by a keyboard macro tries to use the @code{edmacro} package 31544been defined by a keyboard macro tries to use the @code{edmacro} package
31545edit the macro. Type @kbd{C-c C-c} to finish editing and update 31545edit the macro. Type @kbd{C-c C-c} to finish editing and update
31546the definition stored on the key, or, to cancel the edit, kill the 31546the definition stored on the key, or, to cancel the edit, kill the
31547buffer with @kbd{C-x k}. 31547buffer with @kbd{C-x k}.
31548The special characters @code{RET}, @code{LFD}, @code{TAB}, @code{SPC}, 31548The special characters @code{RET}, @code{LFD}, @code{TAB}, @code{SPC},
@@ -31552,7 +31552,7 @@ sequences, written in all uppercase, as must the prefixes @code{C-} and
31552copied verbatim into the keyboard macro. Basically, the notation is the 31552copied verbatim into the keyboard macro. Basically, the notation is the
31553same as is used in all of this manual's examples, except that the manual 31553same as is used in all of this manual's examples, except that the manual
31554takes some liberties with spaces: When we say @kbd{' [1 2 3] @key{RET}}, 31554takes some liberties with spaces: When we say @kbd{' [1 2 3] @key{RET}},
31555we take it for granted that it is clear we really mean 31555we take it for granted that it is clear we really mean
31556@kbd{' [1 @key{SPC} 2 @key{SPC} 3] @key{RET}}. 31556@kbd{' [1 @key{SPC} 2 @key{SPC} 3] @key{RET}}.
31557 31557
31558@kindex C-x * m 31558@kindex C-x * m
@@ -31823,7 +31823,7 @@ prompt for the @kbd{Z #} command; it will not play any role in any
31823subsequent calculations.) This command allows your keyboard macros to 31823subsequent calculations.) This command allows your keyboard macros to
31824accept numbers or formulas as interactive input. 31824accept numbers or formulas as interactive input.
31825 31825
31826As an example, 31826As an example,
31827@kbd{2 @key{RET} "Power: " @key{RET} Z # 3 @key{RET} ^} will prompt for 31827@kbd{2 @key{RET} "Power: " @key{RET} Z # 3 @key{RET} ^} will prompt for
31828input with ``Power: '' in the minibuffer, then return 2 to the provided 31828input with ``Power: '' in the minibuffer, then return 2 to the provided
31829power. (The response to the prompt that's given, 3 in this example, 31829power. (The response to the prompt that's given, 3 in this example,
@@ -31900,7 +31900,7 @@ The third prompt is for an algebraic function name. The default is to
31900use the same name as the command name but without the @samp{calc-} 31900use the same name as the command name but without the @samp{calc-}
31901prefix. (If this is of the form @samp{User-m}, the hyphen is removed so 31901prefix. (If this is of the form @samp{User-m}, the hyphen is removed so
31902it won't be taken for a minus sign in algebraic formulas.) 31902it won't be taken for a minus sign in algebraic formulas.)
31903This is the name you will use if you want to enter your 31903This is the name you will use if you want to enter your
31904new function in an algebraic formula. Suppose we enter @kbd{yow @key{RET}}. 31904new function in an algebraic formula. Suppose we enter @kbd{yow @key{RET}}.
31905Then the new function can be invoked by pushing two numbers on the 31905Then the new function can be invoked by pushing two numbers on the
31906stack and typing @kbd{z m} or @kbd{x spam}, or by entering the algebraic 31906stack and typing @kbd{z m} or @kbd{x spam}, or by entering the algebraic
@@ -32695,7 +32695,7 @@ same thing with a single division by 512.
32695@end ignore 32695@end ignore
32696@tindex mysin 32696@tindex mysin
32697A somewhat limited sine function could be defined as follows, using the 32697A somewhat limited sine function could be defined as follows, using the
32698well-known Taylor series expansion for 32698well-known Taylor series expansion for
32699@texline @math{\sin x}: 32699@texline @math{\sin x}:
32700@infoline @samp{sin(x)}: 32700@infoline @samp{sin(x)}:
32701 32701
@@ -35241,7 +35241,7 @@ to use a different prefix, you can put
35241@end example 35241@end example
35242 35242
35243@noindent 35243@noindent
35244in your .emacs file. 35244in your .emacs file.
35245(@xref{Key Bindings,,Customizing Key Bindings,emacs, 35245(@xref{Key Bindings,,Customizing Key Bindings,emacs,
35246The GNU Emacs Manual}, for more information on binding keys.) 35246The GNU Emacs Manual}, for more information on binding keys.)
35247A convenient way to start Calc is with @kbd{C-x * *}; to make it equally 35247A convenient way to start Calc is with @kbd{C-x * *}; to make it equally
@@ -35269,7 +35269,7 @@ to see how regular expressions work.
35269@defvar calc-settings-file 35269@defvar calc-settings-file
35270The variable @code{calc-settings-file} holds the file name in 35270The variable @code{calc-settings-file} holds the file name in
35271which commands like @kbd{m m} and @kbd{Z P} store ``permanent'' 35271which commands like @kbd{m m} and @kbd{Z P} store ``permanent''
35272definitions. 35272definitions.
35273If @code{calc-settings-file} is not your user init file (typically 35273If @code{calc-settings-file} is not your user init file (typically
35274@file{~/.emacs}) and if the variable @code{calc-loaded-settings-file} is 35274@file{~/.emacs}) and if the variable @code{calc-loaded-settings-file} is
35275@code{nil}, then Calc will automatically load your settings file (if it 35275@code{nil}, then Calc will automatically load your settings file (if it
@@ -35314,7 +35314,7 @@ enabled, it will try to use the current major mode to
35314determine what language should be used. (This can be overridden using 35314determine what language should be used. (This can be overridden using
35315Calc's mode changing commands, @xref{Mode Settings in Embedded Mode}.) 35315Calc's mode changing commands, @xref{Mode Settings in Embedded Mode}.)
35316The variable @code{calc-language-alist} consists of a list of pairs of 35316The variable @code{calc-language-alist} consists of a list of pairs of
35317the form @code{(@var{MAJOR-MODE} . @var{LANGUAGE})}; for example, 35317the form @code{(@var{MAJOR-MODE} . @var{LANGUAGE})}; for example,
35318@code{(latex-mode . latex)} is one such pair. If Calc embedded is 35318@code{(latex-mode . latex)} is one such pair. If Calc embedded is
35319activated in a buffer whose major mode is @var{MAJOR-MODE}, it will set itself 35319activated in a buffer whose major mode is @var{MAJOR-MODE}, it will set itself
35320to use the language @var{LANGUAGE}. 35320to use the language @var{LANGUAGE}.
@@ -35342,7 +35342,7 @@ what formulas @kbd{C-x * a} will activate in a buffer. It is a
35342regular expression, and when activating embedded formulas with 35342regular expression, and when activating embedded formulas with
35343@kbd{C-x * a}, it will tell Calc that what follows is a formula to be 35343@kbd{C-x * a}, it will tell Calc that what follows is a formula to be
35344activated. (Calc also uses other patterns to find formulas, such as 35344activated. (Calc also uses other patterns to find formulas, such as
35345@samp{=>} and @samp{:=}.) 35345@samp{=>} and @samp{:=}.)
35346 35346
35347The default pattern is @code{"%Embed\n\\(% .*\n\\)*"}, which checks 35347The default pattern is @code{"%Embed\n\\(% .*\n\\)*"}, which checks
35348for @samp{%Embed} followed by any number of lines beginning with 35348for @samp{%Embed} followed by any number of lines beginning with
@@ -35367,7 +35367,7 @@ It consists of a list of pairs of the form @code{(@var{MAJOR-MODE} .
35367 (texinfo-mode . "@@c Embed\n\\(@@c .*\n\\)*")) 35367 (texinfo-mode . "@@c Embed\n\\(@@c .*\n\\)*"))
35368@end example 35368@end example
35369Any major modes added to @code{calc-embedded-announce-formula-alist} 35369Any major modes added to @code{calc-embedded-announce-formula-alist}
35370should also be added to @code{calc-embedded-open-close-plain-alist} 35370should also be added to @code{calc-embedded-open-close-plain-alist}
35371and @code{calc-embedded-open-close-mode-alist}. 35371and @code{calc-embedded-open-close-mode-alist}.
35372@end defvar 35372@end defvar
35373 35373
@@ -35378,7 +35378,7 @@ See @ref{Customizing Embedded Mode}.@*
35378The variables @code{calc-embedded-open-formula} and 35378The variables @code{calc-embedded-open-formula} and
35379@code{calc-embedded-close-formula} control the region that Calc will 35379@code{calc-embedded-close-formula} control the region that Calc will
35380activate as a formula when Embedded mode is entered with @kbd{C-x * e}. 35380activate as a formula when Embedded mode is entered with @kbd{C-x * e}.
35381They are regular expressions; 35381They are regular expressions;
35382Calc normally scans backward and forward in the buffer for the 35382Calc normally scans backward and forward in the buffer for the
35383nearest text matching these regular expressions to be the ``formula 35383nearest text matching these regular expressions to be the ``formula
35384delimiters''. 35384delimiters''.
@@ -35403,7 +35403,7 @@ The variable @code{calc-embedded-open-close-formula-alist} is used to
35403set @code{calc-embedded-open-formula} and 35403set @code{calc-embedded-open-formula} and
35404@code{calc-embedded-close-formula} to different regular 35404@code{calc-embedded-close-formula} to different regular
35405expressions depending on the major mode of the editing buffer. 35405expressions depending on the major mode of the editing buffer.
35406It consists of a list of lists of the form 35406It consists of a list of lists of the form
35407@code{(@var{MAJOR-MODE} @var{OPEN-FORMULA-REGEXP} 35407@code{(@var{MAJOR-MODE} @var{OPEN-FORMULA-REGEXP}
35408@var{CLOSE-FORMULA-REGEXP})}, and its default value is 35408@var{CLOSE-FORMULA-REGEXP})}, and its default value is
35409@code{nil}. 35409@code{nil}.
@@ -35422,7 +35422,7 @@ The default value of @code{calc-embedded-word-regexp} is
35422The variable @code{calc-embedded-word-regexp-alist} is used to 35422The variable @code{calc-embedded-word-regexp-alist} is used to
35423set @code{calc-embedded-word-regexp} to a different regular 35423set @code{calc-embedded-word-regexp} to a different regular
35424expression depending on the major mode of the editing buffer. 35424expression depending on the major mode of the editing buffer.
35425It consists of a list of lists of the form 35425It consists of a list of lists of the form
35426@code{(@var{MAJOR-MODE} @var{WORD-REGEXP})}, and its default value is 35426@code{(@var{MAJOR-MODE} @var{WORD-REGEXP})}, and its default value is
35427@code{nil}. 35427@code{nil}.
35428@end defvar 35428@end defvar
@@ -35437,8 +35437,8 @@ formulas. Note that these are actual strings, not regular
35437expressions, because Calc must be able to write these string into a 35437expressions, because Calc must be able to write these string into a
35438buffer as well as to recognize them. 35438buffer as well as to recognize them.
35439 35439
35440The default string for @code{calc-embedded-open-plain} is 35440The default string for @code{calc-embedded-open-plain} is
35441@code{"%%% "}, note the trailing space. The default string for 35441@code{"%%% "}, note the trailing space. The default string for
35442@code{calc-embedded-close-plain} is @code{" %%%\n"}, without 35442@code{calc-embedded-close-plain} is @code{" %%%\n"}, without
35443the trailing newline here, the first line of a Big mode formula 35443the trailing newline here, the first line of a Big mode formula
35444that followed might be shifted over with respect to the other lines. 35444that followed might be shifted over with respect to the other lines.
@@ -35447,7 +35447,7 @@ The variable @code{calc-embedded-open-close-plain-alist} is used to
35447set @code{calc-embedded-open-plain} and 35447set @code{calc-embedded-open-plain} and
35448@code{calc-embedded-close-plain} to different strings 35448@code{calc-embedded-close-plain} to different strings
35449depending on the major mode of the editing buffer. 35449depending on the major mode of the editing buffer.
35450It consists of a list of lists of the form 35450It consists of a list of lists of the form
35451@code{(@var{MAJOR-MODE} @var{OPEN-PLAIN-STRING} 35451@code{(@var{MAJOR-MODE} @var{OPEN-PLAIN-STRING}
35452@var{CLOSE-PLAIN-STRING})}, and its default value is 35452@var{CLOSE-PLAIN-STRING})}, and its default value is
35453@example 35453@example
@@ -35490,7 +35490,7 @@ The variable @code{calc-embedded-open-close-new-formula-alist} is used to
35490set @code{calc-embedded-open-new-formula} and 35490set @code{calc-embedded-open-new-formula} and
35491@code{calc-embedded-close-new-formula} to different strings 35491@code{calc-embedded-close-new-formula} to different strings
35492depending on the major mode of the editing buffer. 35492depending on the major mode of the editing buffer.
35493It consists of a list of lists of the form 35493It consists of a list of lists of the form
35494@code{(@var{MAJOR-MODE} @var{OPEN-NEW-FORMULA-STRING} 35494@code{(@var{MAJOR-MODE} @var{OPEN-NEW-FORMULA-STRING}
35495@var{CLOSE-NEW-FORMULA-STRING})}, and its default value is 35495@var{CLOSE-NEW-FORMULA-STRING})}, and its default value is
35496@code{nil}. 35496@code{nil}.
@@ -35508,7 +35508,7 @@ necessary to add them to user-written annotations.
35508 35508
35509The default value of @code{calc-embedded-open-mode} is @code{"% "} 35509The default value of @code{calc-embedded-open-mode} is @code{"% "}
35510and the default value of @code{calc-embedded-close-mode} is 35510and the default value of @code{calc-embedded-close-mode} is
35511@code{"\n"}. 35511@code{"\n"}.
35512If you change the value of @code{calc-embedded-close-mode}, it is a good 35512If you change the value of @code{calc-embedded-close-mode}, it is a good
35513idea still to end with a newline so that mode annotations will appear on 35513idea still to end with a newline so that mode annotations will appear on
35514lines by themselves. 35514lines by themselves.
@@ -35517,7 +35517,7 @@ The variable @code{calc-embedded-open-close-mode-alist} is used to
35517set @code{calc-embedded-open-mode} and 35517set @code{calc-embedded-open-mode} and
35518@code{calc-embedded-close-mode} to different strings 35518@code{calc-embedded-close-mode} to different strings
35519expressions depending on the major mode of the editing buffer. 35519expressions depending on the major mode of the editing buffer.
35520It consists of a list of lists of the form 35520It consists of a list of lists of the form
35521@code{(@var{MAJOR-MODE} @var{OPEN-MODE-STRING} 35521@code{(@var{MAJOR-MODE} @var{OPEN-MODE-STRING}
35522@var{CLOSE-MODE-STRING})}, and its default value is 35522@var{CLOSE-MODE-STRING})}, and its default value is
35523@example 35523@example
@@ -35548,7 +35548,7 @@ units.
35548 35548
35549The default value of @code{calc-lu-power-reference} is @code{"mW"} 35549The default value of @code{calc-lu-power-reference} is @code{"mW"}
35550and the default value of @code{calc-lu-field-reference} is 35550and the default value of @code{calc-lu-field-reference} is
35551@code{"20 uPa"}. 35551@code{"20 uPa"}.
35552@end defvar 35552@end defvar
35553 35553
35554@defvar calc-note-threshold 35554@defvar calc-note-threshold
@@ -35564,15 +35564,15 @@ The default value of @code{calc-note-threshold} is 1.
35564@defvarx calc-selected-face 35564@defvarx calc-selected-face
35565@defvarx calc-nonselected-face 35565@defvarx calc-nonselected-face
35566See @ref{Displaying Selections}.@* 35566See @ref{Displaying Selections}.@*
35567The variable @code{calc-highlight-selections-with-faces} 35567The variable @code{calc-highlight-selections-with-faces}
35568determines how selected sub-formulas are distinguished. 35568determines how selected sub-formulas are distinguished.
35569If @code{calc-highlight-selections-with-faces} is nil, then 35569If @code{calc-highlight-selections-with-faces} is nil, then
35570a selected sub-formula is distinguished either by changing every 35570a selected sub-formula is distinguished either by changing every
35571character not part of the sub-formula with a dot or by changing every 35571character not part of the sub-formula with a dot or by changing every
35572character in the sub-formula with a @samp{#} sign. 35572character in the sub-formula with a @samp{#} sign.
35573If @code{calc-highlight-selections-with-faces} is t, 35573If @code{calc-highlight-selections-with-faces} is t,
35574then a selected sub-formula is distinguished either by displaying the 35574then a selected sub-formula is distinguished either by displaying the
35575non-selected portion of the formula with @code{calc-nonselected-face} 35575non-selected portion of the formula with @code{calc-nonselected-face}
35576or by displaying the selected sub-formula with 35576or by displaying the selected sub-formula with
35577@code{calc-nonselected-face}. 35577@code{calc-nonselected-face}.
35578@end defvar 35578@end defvar
@@ -36651,9 +36651,9 @@ input data set. Each entry may be a single value or a vector of values.
36651 36651
36652@c 20 36652@c 20
36653@item 36653@item
36654With a prefix argument of 1, take a single 36654With a prefix argument of 1, take a single
36655@texline @var{n}@math{\times2} 36655@texline @var{n}@math{\times2}
36656@infoline @mathit{@var{N}x2} 36656@infoline @mathit{@var{N}x2}
36657matrix from the stack instead of two separate data vectors. 36657matrix from the stack instead of two separate data vectors.
36658 36658
36659@c 21 36659@c 21
@@ -36754,7 +36754,7 @@ Variable name may be a single digit or a full name.
36754 36754
36755@c 30 36755@c 30
36756@item 36756@item
36757Editing occurs in a separate buffer. Press @kbd{C-c C-c} (or 36757Editing occurs in a separate buffer. Press @kbd{C-c C-c} (or
36758@key{LFD}, or in some cases @key{RET}) to finish the edit, or kill the 36758@key{LFD}, or in some cases @key{RET}) to finish the edit, or kill the
36759buffer with @kbd{C-x k} to cancel the edit. The @key{LFD} key prevents evaluation 36759buffer with @kbd{C-x k} to cancel the edit. The @key{LFD} key prevents evaluation
36760of the result of the edit. 36760of the result of the edit.
@@ -36854,7 +36854,7 @@ to evaluate variables.
36854@item 36854@item
36855The variable is replaced by the formula shown on the right. The 36855The variable is replaced by the formula shown on the right. The
36856Inverse flag reverses the order of the operands, e.g., @kbd{I s - x} 36856Inverse flag reverses the order of the operands, e.g., @kbd{I s - x}
36857assigns 36857assigns
36858@texline @math{x \coloneq a-x}. 36858@texline @math{x \coloneq a-x}.
36859@infoline @expr{x := a-x}. 36859@infoline @expr{x := a-x}.
36860 36860
diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi
index 55c2c4c0ae8..d5f403e5cdb 100644
--- a/doc/misc/cc-mode.texi
+++ b/doc/misc/cc-mode.texi
@@ -912,7 +912,7 @@ construct, should the point start inside it. If @ccmode fails to find
912function beginnings or ends inside the current declaration scope, it 912function beginnings or ends inside the current declaration scope, it
913will search the enclosing scopes. If you want @ccmode to recognize 913will search the enclosing scopes. If you want @ccmode to recognize
914functions only at the top level@footnote{this was @ccmode{}'s 914functions only at the top level@footnote{this was @ccmode{}'s
915behavior prior to version 5.32.}, set @code{c-defun-tatic} to 915behavior prior to version 5.32.}, set @code{c-defun-tactic} to
916@code{t}. 916@code{t}.
917 917
918These functions are analogous to the Emacs built-in commands 918These functions are analogous to the Emacs built-in commands
diff --git a/doc/misc/dbus.texi b/doc/misc/dbus.texi
index 79c7ada3b0b..88b068ccd5b 100644
--- a/doc/misc/dbus.texi
+++ b/doc/misc/dbus.texi
@@ -332,7 +332,7 @@ Example:
332@code{method}, @code{signal}, and @code{property} elements. Unlike 332@code{method}, @code{signal}, and @code{property} elements. Unlike
333properties, which can change their values during lifetime of a D-Bus 333properties, which can change their values during lifetime of a D-Bus
334object, annotations are static. Often they are used for code 334object, annotations are static. Often they are used for code
335generators of D-Bus langugae bindings. Example: 335generators of D-Bus language bindings. Example:
336 336
337@example 337@example
338<annotation name="de.berlios.Pinot.GetStatistics" value="pinotDBus"/> 338<annotation name="de.berlios.Pinot.GetStatistics" value="pinotDBus"/>
diff --git a/doc/misc/dired-x.texi b/doc/misc/dired-x.texi
index 99530e6356d..a026c63e25b 100644
--- a/doc/misc/dired-x.texi
+++ b/doc/misc/dired-x.texi
@@ -476,7 +476,7 @@ in your @code{dired-mode-hook}.
476This Dired-X feature is obsolete as of Emacs 24.1. The standard Emacs 476This Dired-X feature is obsolete as of Emacs 24.1. The standard Emacs
477directory local variables mechanism (@pxref{Directory 477directory local variables mechanism (@pxref{Directory
478Variables,,,emacs,The Gnu Emacs manual}) replaces it. For an example of 478Variables,,,emacs,The Gnu Emacs manual}) replaces it. For an example of
479the new mechanims, @pxref{Omitting Variables}. 479the new mechanisms, @pxref{Omitting Variables}.
480 480
481When Dired visits a directory, it looks for a file whose name is the 481When Dired visits a directory, it looks for a file whose name is the
482value of variable @code{dired-local-variables-file} (default: @file{.dired}). 482value of variable @code{dired-local-variables-file} (default: @file{.dired}).
diff --git a/doc/misc/ede.texi b/doc/misc/ede.texi
index 55dc7f9a822..f8d757c2d87 100644
--- a/doc/misc/ede.texi
+++ b/doc/misc/ede.texi
@@ -3526,7 +3526,7 @@ use the same autoconf form.
3526@item :objectextention 3526@item :objectextention
3527Type: @code{string} 3527Type: @code{string}
3528 3528
3529A string which is the extention used for object files. 3529A string which is the extension used for object files.
3530For example, C code uses .o on unix, and Emacs Lisp uses .elc. 3530For example, C code uses .o on unix, and Emacs Lisp uses .elc.
3531@refill 3531@refill
3532 3532
@@ -3634,7 +3634,7 @@ it's rule definition.
3634@item :objectextention 3634@item :objectextention
3635Type: @code{string} 3635Type: @code{string}
3636 3636
3637A string which is the extention used for object files. 3637A string which is the extension used for object files.
3638For example, C code uses .o on unix, and Emacs Lisp uses .elc. 3638For example, C code uses .o on unix, and Emacs Lisp uses .elc.
3639@refill 3639@refill
3640 3640
@@ -3782,7 +3782,7 @@ it's rule definition.
3782@item :objectextention 3782@item :objectextention
3783Type: @code{string} 3783Type: @code{string}
3784 3784
3785A string which is the extention used for object files. 3785A string which is the extension used for object files.
3786For example, C code uses .o on unix, and Emacs Lisp uses .elc. 3786For example, C code uses .o on unix, and Emacs Lisp uses .elc.
3787@refill 3787@refill
3788 3788
diff --git a/doc/misc/eieio.texi b/doc/misc/eieio.texi
index 8ee40288fe0..7b4945027d3 100644
--- a/doc/misc/eieio.texi
+++ b/doc/misc/eieio.texi
@@ -1212,9 +1212,9 @@ This method does nothing by default, but that may change in the future.
1212This would be the best way to make your objects persistent when using 1212This would be the best way to make your objects persistent when using
1213in-place editing. 1213in-place editing.
1214 1214
1215@section Widget extention 1215@section Widget extension
1216 1216
1217When widgets are being created, one new widget extention has been added, 1217When widgets are being created, one new widget extension has been added,
1218called the @code{:slotofchoices}. When this occurs in a widget 1218called the @code{:slotofchoices}. When this occurs in a widget
1219definition, all elements after it are removed, and the slot is specifies 1219definition, all elements after it are removed, and the slot is specifies
1220is queried and converted into a series of constants. 1220is queried and converted into a series of constants.
diff --git a/doc/misc/eshell.texi b/doc/misc/eshell.texi
index d2705155887..b0090f0fb84 100644
--- a/doc/misc/eshell.texi
+++ b/doc/misc/eshell.texi
@@ -61,7 +61,7 @@ developing GNU and promoting software freedom.''
61@node Top, What is Eshell?, (dir), (dir) 61@node Top, What is Eshell?, (dir), (dir)
62@top Eshell 62@top Eshell
63 63
64Eshell is a shell-like command interpretor 64Eshell is a shell-like command interpreter
65implemented in Emacs Lisp. It invokes no external processes except for 65implemented in Emacs Lisp. It invokes no external processes except for
66those requested by the user. It is intended to be a functional 66those requested by the user. It is intended to be a functional
67replacement for command shells such as @command{bash}, @command{zsh}, 67replacement for command shells such as @command{bash}, @command{zsh},
diff --git a/doc/misc/faq.texi b/doc/misc/faq.texi
index 262c3d734fe..15c9232d4b6 100644
--- a/doc/misc/faq.texi
+++ b/doc/misc/faq.texi
@@ -627,7 +627,7 @@ translations of the reference card into several languages; look for
627files named @file{etc/refcards/@var{lang}-refcard.*}, where @var{lang} 627files named @file{etc/refcards/@var{lang}-refcard.*}, where @var{lang}
628is a two-letter code of the language. For example, the German version 628is a two-letter code of the language. For example, the German version
629of the reference card is in the files @file{etc/refcards/de-refcard.tex} 629of the reference card is in the files @file{etc/refcards/de-refcard.tex}
630and @file{etc/recards/de-refcard.pdf}. 630and @file{etc/refcards/de-refcard.pdf}.
631 631
632@item 632@item
633There are many other commands in Emacs for getting help and 633There are many other commands in Emacs for getting help and
diff --git a/doc/misc/gnus-coding.texi b/doc/misc/gnus-coding.texi
index ab9c0232d3d..a79c68f0123 100644
--- a/doc/misc/gnus-coding.texi
+++ b/doc/misc/gnus-coding.texi
@@ -1,7 +1,7 @@
1\input texinfo 1\input texinfo
2 2
3@setfilename gnus-coding 3@setfilename gnus-coding
4@settitle Gnus Coding Style and Maintainance Guide 4@settitle Gnus Coding Style and Maintenance Guide
5@syncodeindex fn cp 5@syncodeindex fn cp
6@syncodeindex vr cp 6@syncodeindex vr cp
7@syncodeindex pg cp 7@syncodeindex pg cp
@@ -45,7 +45,7 @@ license to the document, as described in section 6 of the license.
45 45
46@ifnottex 46@ifnottex
47@node Top 47@node Top
48@top Gnus Coding Style and Maintainance Guide 48@top Gnus Coding Style and Maintenance Guide
49This manual describes @dots{} 49This manual describes @dots{}
50 50
51@insertcopying 51@insertcopying
@@ -53,7 +53,7 @@ This manual describes @dots{}
53 53
54@menu 54@menu
55* Gnus Coding Style:: Gnus Coding Style 55* Gnus Coding Style:: Gnus Coding Style
56* Gnus Maintainance Guide:: Gnus Maintainance Guide 56* Gnus Maintenance Guide:: Gnus Maintenance Guide
57@end menu 57@end menu
58 58
59@c @ref{Gnus Reference Guide, ,Gnus Reference Guide, gnus, The Gnus Newsreader} 59@c @ref{Gnus Reference Guide, ,Gnus Reference Guide, gnus, The Gnus Newsreader}
@@ -250,8 +250,8 @@ Emacs 20.7 and up.
250XEmacs 21.1 and up. 250XEmacs 21.1 and up.
251@end itemize 251@end itemize
252 252
253@node Gnus Maintainance Guide 253@node Gnus Maintenance Guide
254@chapter Gnus Maintainance Guide 254@chapter Gnus Maintenance Guide
255 255
256@section Stable and development versions 256@section Stable and development versions
257 257
diff --git a/doc/misc/gnus-news.texi b/doc/misc/gnus-news.texi
index 62c1663508b..612ea14e2cf 100644
--- a/doc/misc/gnus-news.texi
+++ b/doc/misc/gnus-news.texi
@@ -107,7 +107,7 @@ EasyPG is included in Emacs 23 and available separately as well.
107@itemize @bullet 107@itemize @bullet
108 108
109@item 109@item
110Symbols like @code{gcc-self} now has the same presedence rules in 110Symbols like @code{gcc-self} now have the same precedence rules in
111@code{gnus-parameters} as other ``real'' variables: The last match 111@code{gnus-parameters} as other ``real'' variables: The last match
112wins instead of the first match. 112wins instead of the first match.
113 113
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index a3a93c6ef61..f099dfd36d0 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -4491,23 +4491,6 @@ news.
4491@table @kbd 4491@table @kbd
4492 4492
4493 4493
4494@item H f
4495@kindex H f (Group)
4496@findex gnus-group-fetch-faq
4497@vindex gnus-group-faq-directory
4498@cindex FAQ
4499@cindex ange-ftp
4500Try to fetch the @acronym{FAQ} for the current group
4501(@code{gnus-group-fetch-faq}). Gnus will try to get the @acronym{FAQ}
4502from @code{gnus-group-faq-directory}, which is usually a directory on
4503a remote machine. This variable can also be a list of directories.
4504In that case, giving a prefix to this command will allow you to choose
4505between the various sites. @code{ange-ftp} (or @code{efs}) will be
4506used for fetching the file.
4507
4508If fetching from the first site is unsuccessful, Gnus will attempt to go
4509through @code{gnus-group-faq-directory} and try to open them one by one.
4510
4511@item H d 4494@item H d
4512@itemx C-c C-d 4495@itemx C-c C-d
4513@c @icon{gnus-group-describe-group} 4496@c @icon{gnus-group-describe-group}
@@ -8992,7 +8975,7 @@ apostrophe or quotation mark, then try this wash.
8992Translate many non-@acronym{ASCII} characters into their 8975Translate many non-@acronym{ASCII} characters into their
8993@acronym{ASCII} equivalents (@code{gnus-article-treat-non-ascii}). 8976@acronym{ASCII} equivalents (@code{gnus-article-treat-non-ascii}).
8994This is mostly useful if you're on a terminal that has a limited font 8977This is mostly useful if you're on a terminal that has a limited font
8995and does't show accented characters, ``advanced'' punctuation, and the 8978and doesn't show accented characters, ``advanced'' punctuation, and the
8996like. For instance, @samp{»} is tranlated into @samp{>>}, and so on. 8979like. For instance, @samp{»} is tranlated into @samp{>>}, and so on.
8997 8980
8998@item W Y f 8981@item W Y f
@@ -21228,7 +21211,7 @@ features (inspired by the Google search input language):
21228AND, OR, and NOT are supported, and parentheses can be used to control 21211AND, OR, and NOT are supported, and parentheses can be used to control
21229operator precedence, e.g. (emacs OR xemacs) AND linux. Note that 21212operator precedence, e.g. (emacs OR xemacs) AND linux. Note that
21230operators must be written with all capital letters to be 21213operators must be written with all capital letters to be
21231recognised. Also preceding a term with a - sign is equivalent to NOT 21214recognized. Also preceding a term with a - sign is equivalent to NOT
21232term. 21215term.
21233 21216
21234@item Automatic AND queries 21217@item Automatic AND queries
@@ -21273,7 +21256,7 @@ Gmane queries follow a simple query language:
21273AND, OR, NOT (or AND NOT), and XOR are supported, and brackets can be 21256AND, OR, NOT (or AND NOT), and XOR are supported, and brackets can be
21274used to control operator precedence, e.g. (emacs OR xemacs) AND linux. 21257used to control operator precedence, e.g. (emacs OR xemacs) AND linux.
21275Note that operators must be written with all capital letters to be 21258Note that operators must be written with all capital letters to be
21276recognised. 21259recognized.
21277 21260
21278@item Required and excluded terms 21261@item Required and excluded terms
21279+ and - can be used to require or exclude terms, e.g. football -american 21262+ and - can be used to require or exclude terms, e.g. football -american
@@ -25471,7 +25454,7 @@ Write @code{spam-check-blackbox} if Blackbox can check incoming mail.
25471 25454
25472Write @code{spam-blackbox-register-routine} and 25455Write @code{spam-blackbox-register-routine} and
25473@code{spam-blackbox-unregister-routine} using the bogofilter 25456@code{spam-blackbox-unregister-routine} using the bogofilter
25474register/unregister routines as a start, or other restister/unregister 25457register/unregister routines as a start, or other register/unregister
25475routines more appropriate to Blackbox, if Blackbox can 25458routines more appropriate to Blackbox, if Blackbox can
25476register/unregister spam and ham. 25459register/unregister spam and ham.
25477 25460
@@ -30030,7 +30013,7 @@ this:
30030@subsection Score File Syntax 30013@subsection Score File Syntax
30031 30014
30032Score files are meant to be easily parseable, but yet extremely 30015Score files are meant to be easily parseable, but yet extremely
30033mallable. It was decided that something that had the same read syntax 30016malleable. It was decided that something that had the same read syntax
30034as an Emacs Lisp list would fit that spec. 30017as an Emacs Lisp list would fit that spec.
30035 30018
30036Here's a typical score file: 30019Here's a typical score file:
diff --git a/doc/misc/message.texi b/doc/misc/message.texi
index 48d0028e452..4d828f69bbd 100644
--- a/doc/misc/message.texi
+++ b/doc/misc/message.texi
@@ -2120,7 +2120,7 @@ follows this line--} by default.
2120 2120
2121@item message-directory 2121@item message-directory
2122@vindex message-directory 2122@vindex message-directory
2123Directory used by many mailey things. The default is @file{~/Mail/}. 2123Directory used by many mailish things. The default is @file{~/Mail/}.
2124All other mail file variables are derived from @code{message-directory}. 2124All other mail file variables are derived from @code{message-directory}.
2125 2125
2126@item message-auto-save-directory 2126@item message-auto-save-directory
diff --git a/doc/misc/org.texi b/doc/misc/org.texi
index cc925906c28..34a4ba4f8f3 100644
--- a/doc/misc/org.texi
+++ b/doc/misc/org.texi
@@ -15533,7 +15533,7 @@ chapter about publishing.
15533@i{Jambunathan K} contributed the OpenDocumentText exporter. 15533@i{Jambunathan K} contributed the OpenDocumentText exporter.
15534@item 15534@item
15535@i{Sebastien Vauban} reported many issues with LaTeX and BEAMER export and 15535@i{Sebastien Vauban} reported many issues with LaTeX and BEAMER export and
15536enabled source code highlighling in Gnus. 15536enabled source code highlighting in Gnus.
15537@item 15537@item
15538@i{Stefan Vollmar} organized a video-recorded talk at the 15538@i{Stefan Vollmar} organized a video-recorded talk at the
15539Max-Planck-Institute for Neurology. He also inspired the creation of a 15539Max-Planck-Institute for Neurology. He also inspired the creation of a
diff --git a/doc/misc/sem-user.texi b/doc/misc/sem-user.texi
index 7a363523aa6..28d1cdb6eb8 100644
--- a/doc/misc/sem-user.texi
+++ b/doc/misc/sem-user.texi
@@ -880,7 +880,7 @@ command, like this:
880@end example 880@end example
881@end defun 881@end defun
882 882
883These commands are often more accurate than than the @code{find-tag} 883These commands are often more accurate than the @code{find-tag}
884command (@pxref{Tags,,,emacs,Emacs manual}), because the Semantic 884command (@pxref{Tags,,,emacs,Emacs manual}), because the Semantic
885Analyzer is context-sensitive. 885Analyzer is context-sensitive.
886 886
diff --git a/doc/misc/semantic.texi b/doc/misc/semantic.texi
index ad6159feb1a..55b60937fb6 100644
--- a/doc/misc/semantic.texi
+++ b/doc/misc/semantic.texi
@@ -421,7 +421,7 @@ local variables, and tag lists in scope for various reasons, such as
421C++ using statements. 421C++ using statements.
422 422
423@item semanticdb-typecache.el 423@item semanticdb-typecache.el
424The typecache is part of @code{semanticdb}, but is used primarilly by 424The typecache is part of @code{semanticdb}, but is used primarily by
425the analyzer to look up datatypes and complex names. The typecache is 425the analyzer to look up datatypes and complex names. The typecache is
426bound across source files and builds a master lookup table for data 426bound across source files and builds a master lookup table for data
427type names. 427type names.
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index 0accc6fac43..e6b0f4fa235 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -3180,7 +3180,7 @@ names:
3180 '("^/xy" . "@trampfn{ssh, news, news.my.domain, /opt/news/etc/}")) 3180 '("^/xy" . "@trampfn{ssh, news, news.my.domain, /opt/news/etc/}"))
3181@end lisp 3181@end lisp
3182 3182
3183This shortens the file openening command to @kbd{C-x C-f /xy 3183This shortens the file opening command to @kbd{C-x C-f /xy
3184@key{RET}}. The disadvantage is, again, that you cannot edit the file 3184@key{RET}}. The disadvantage is, again, that you cannot edit the file
3185name, because the expansion happens after entering the file name only. 3185name, because the expansion happens after entering the file name only.
3186 3186