[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/man/calc.texi,v
From: |
Jay Belanger |
Subject: |
[Emacs-diffs] Changes to emacs/man/calc.texi,v |
Date: |
Thu, 21 Jun 2007 03:28:17 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Jay Belanger <jpb> 07/06/21 03:28:16
Index: calc.texi
===================================================================
RCS file: /cvsroot/emacs/emacs/man/calc.texi,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -b -r1.97 -r1.98
--- calc.texi 20 Jun 2007 19:33:19 -0000 1.97
+++ calc.texi 21 Jun 2007 03:28:16 -0000 1.98
@@ -124,28 +124,32 @@
@end titlepage
@c [begin]
address@hidden
address@hidden
@node Top, Getting Started, (dir), (dir)
@chapter The GNU Emacs Calculator
@noindent
@dfn{Calc} is an advanced desk calculator and mathematical tool
-that runs as part of the GNU Emacs environment.
+written by Dave Gillespie that runs as part of the GNU Emacs environment.
-This manual is divided into three major parts: ``Getting Started,''
-the ``Calc Tutorial,'' and the ``Calc Reference.'' The Tutorial
-introduces all the major aspects of Calculator use in an easy,
-hands-on way. The remainder of the manual is a complete reference to
-the features of the Calculator.
+This manual, also written (mostly) by Dave Gillespie, is divided into
+three major parts: ``Getting Started,'' the ``Calc Tutorial,'' and the
+``Calc Reference.'' The Tutorial introduces all the major aspects of
+Calculator use in an easy, hands-on way. The remainder of the manual is
+a complete reference to the features of the Calculator.
address@hidden ifnottex
address@hidden
For help in the Emacs Info system (which you are using to read this
file), type @kbd{?}. (You can also type @kbd{h} to run through a
longer Info tutorial.)
-
@end ifinfo
+
@menu
* Getting Started:: General description and overview.
address@hidden
* Interactive Tutorial::
address@hidden ifinfo
* Tutorial:: A step-by-step introduction for beginners.
* Introduction:: Introduction to the Calc reference manual.
@@ -179,7 +183,12 @@
* Lisp Function Index:: Internal Lisp math functions.
@end menu
address@hidden
@node Getting Started, Interactive Tutorial, Top, Top
address@hidden ifinfo
address@hidden
address@hidden Getting Started, Tutorial, Top, Top
address@hidden ifnotinfo
@chapter Getting Started
@noindent
This chapter provides a general overview of Calc, the GNU Emacs
@@ -267,12 +276,6 @@
this manual ought to be readable even if you don't know or use Emacs
regularly.
address@hidden
-The manual is divided into three major parts:@: the ``Getting
-Started'' chapter you are reading now, the Calc tutorial (chapter 2),
-and the Calc reference manual (the remaining chapters and appendices).
address@hidden ifinfo
address@hidden
The manual is divided into three major parts:@: the ``Getting
Started'' chapter you are reading now, the Calc tutorial (chapter 2),
and the Calc reference manual (the remaining chapters and appendices).
@@ -280,7 +283,6 @@
@c This manual has been printed in two volumes, the @dfn{Tutorial} and the
@c @dfn{Reference}. Both volumes include a copy of the ``Getting Started''
@c chapter.
address@hidden iftex
If you are in a hurry to use Calc, there is a brief ``demonstration''
below which illustrates the major features of Calc in just a couple of
@@ -321,6 +323,7 @@
function, or variable using @address@hidden k}}, @kbd{h f}, or @kbd{h v},
respectively. @xref{Help Commands}.
address@hidden
The Calc manual can be printed, but because the manual is so large, you
should only make a printed copy if you really need it. To print the
manual, you will need the @TeX{} typesetting program (this is a free
@@ -347,7 +350,7 @@
@example
dvips calc.dvi
@end example
-
address@hidden ifnottex
@c Printed copies of this manual are also available from the Free Software
@c Foundation.
@@ -543,13 +546,13 @@
Type @kbd{7.5}, then @kbd{s l a @key{RET}} to let @expr{a = 7.5} in these
formulas.
(That's a letter @kbd{l}, not a numeral @kbd{1}.)
address@hidden
address@hidden
@strong{Help functions.} You can read about any command in the on-line
manual. Type @kbd{C-x * c} to return to Calc after each of these
commands: @kbd{h k t N} to read about the @kbd{t N} command,
@kbd{h f sqrt @key{RET}} to read about the @code{sqrt} function, and
@kbd{h s} to read the Calc summary.
address@hidden iftex
address@hidden ifnotinfo
@ifinfo
@strong{Help functions.} You can read about any command in the on-line
manual. Remember to type the letter @kbd{l}, then @kbd{C-x * c}, to
@@ -1251,9 +1254,12 @@
@menu
* Tutorial::
@end menu
address@hidden ifinfo
@node Tutorial, Introduction, Interactive Tutorial, Top
address@hidden ifinfo
address@hidden
address@hidden Tutorial, Introduction, Getting Started, Top
address@hidden ifnotinfo
@chapter Tutorial
@noindent
@@ -1272,32 +1278,22 @@
self-explanatory. @xref{Embedded Mode}, for a description of
the Embedded mode interface.
address@hidden
-The easiest way to read this tutorial on-line is to have two windows on
-your Emacs screen, one with Calc and one with the Info system. (If you
-have a printed copy of the manual you can use that instead.) Press
address@hidden * c} to turn Calc on or to switch into the Calc window, and
-press @kbd{C-x * i} to start the Info system or to switch into its window.
-Or, you may prefer to use the tutorial in printed form.
address@hidden ifinfo
address@hidden
The easiest way to read this tutorial on-line is to have two windows on
your Emacs screen, one with Calc and one with the Info system. (If you
have a printed copy of the manual you can use that instead.) Press
@kbd{C-x * c} to turn Calc on or to switch into the Calc window, and
press @kbd{C-x * i} to start the Info system or to switch into its window.
address@hidden iftex
This tutorial is designed to be done in sequence. But the rest of this
manual does not assume you have gone through the tutorial. The tutorial
does not cover everything in the Calculator, but it touches on most
general areas.
address@hidden
address@hidden
You may wish to print out a copy of the Calc Summary and keep notes on
it as you learn Calc. @xref{About This Manual}, to see how to make a
printed summary. @xref{Summary}.
address@hidden ifinfo
address@hidden ifnottex
@iftex
The Calc Summary at the end of the reference manual includes some blank
space for your own use. You may wish to keep notes there as you learn
@@ -1334,13 +1330,13 @@
@subsection RPN Calculations and the Stack
@cindex RPN notation
address@hidden
address@hidden
@noindent
Calc normally uses RPN notation. You may be familiar with the RPN
system from Hewlett-Packard calculators, FORTH, or PostScript.
(Reverse Polish Notation, RPN, is named after the Polish mathematician
Jan Lukasiewicz.)
address@hidden ifinfo
address@hidden ifnottex
@tex
\noindent
Calc normally uses RPN notation. You may be familiar with the RPN
@@ -1769,7 +1765,7 @@
@noindent
or, in large mathematical notation,
address@hidden
address@hidden
@example
@group
3 * 4 * 5
@@ -1778,7 +1774,7 @@
6 * 7
@end group
@end example
address@hidden ifinfo
address@hidden ifnottex
@tex
\turnoffactive
\beforedisplay
@@ -3325,7 +3321,7 @@
Matrix inverses are related to systems of linear equations in algebra.
Suppose we had the following set of equations:
address@hidden
address@hidden
@group
@example
a + 2b + 3c = 6
@@ -3333,7 +3329,7 @@
7a + 6b = 3
@end example
@end group
address@hidden ifinfo
address@hidden ifnottex
@tex
\turnoffactive
\beforedisplayh
@@ -3352,7 +3348,7 @@
@noindent
This can be cast into the matrix equation,
address@hidden
address@hidden
@group
@example
[ [ 1, 2, 3 ] [ [ a ] [ [ 6 ]
@@ -3360,7 +3356,7 @@
[ 7, 6, 0 ] ] [ c ] ] [ 3 ] ]
@end example
@end group
address@hidden ifinfo
address@hidden ifnottex
@tex
\turnoffactive
\beforedisplay
@@ -3425,14 +3421,14 @@
system of equations to get expressions for @expr{x} and @expr{y}
in terms of @expr{a} and @expr{b}.
address@hidden
address@hidden
@group
@example
x + a y = 6
x + b y = 10
@end example
@end group
address@hidden ifinfo
address@hidden ifnottex
@tex
\turnoffactive
\beforedisplay
@@ -3456,9 +3452,9 @@
is not square for an over-determined system. Matrix inversion works
only for square matrices. One common trick is to multiply both sides
on the left by the transpose of @expr{A}:
address@hidden
address@hidden
@samp{trn(A)*A*X = trn(A)*B}.
address@hidden ifinfo
address@hidden ifnottex
@tex
\turnoffactive
$A^T A \, X = A^T B$, where $A^T$ is the transpose \samp{trn(A)}.
@@ -3472,7 +3468,7 @@
of equations. Use Calc to solve the following over-determined
system:
address@hidden
address@hidden
@group
@example
a + 2b + 3c = 6
@@ -3481,7 +3477,7 @@
2a + 4b + 6c = 11
@end example
@end group
address@hidden ifinfo
address@hidden ifnottex
@tex
\turnoffactive
\beforedisplayh
@@ -3749,11 +3745,11 @@
In a least squares fit, the slope @expr{m} is given by the formula
address@hidden
address@hidden
@example
m = (N sum(x y) - sum(x) sum(y)) / (N sum(x^2) - sum(x)^2)
@end example
address@hidden ifinfo
address@hidden ifnottex
@tex
\turnoffactive
\beforedisplay
@@ -3790,12 +3786,12 @@
@end group
@end smallexample
address@hidden
address@hidden
@noindent
These are @samp{sum(x)}, @samp{sum(x^2)}, @samp{sum(y)}, and @samp{sum(x y)},
respectively. (We could have used @kbd{*} to compute @samp{sum(x^2)} and
@samp{sum(x y)}.)
address@hidden ifinfo
address@hidden ifnottex
@tex
\turnoffactive
These are $\sum x$, $\sum x^2$, $\sum y$, and $\sum x y$,
@@ -3845,11 +3841,11 @@
That gives us the slope @expr{m}. The y-intercept @expr{b} can now
be found with the simple formula,
address@hidden
address@hidden
@example
b = (sum(y) - m sum(x)) / N
@end example
address@hidden ifinfo
address@hidden ifnottex
@tex
\turnoffactive
\beforedisplay
@@ -3987,14 +3983,14 @@
with or without surrounding vector brackets.
@xref{List Answer 3, 3}. (@bullet{})
address@hidden
address@hidden
As another example, a theorem about binomial coefficients tells
us that the alternating sum of binomial coefficients
@var{n}-choose-0 minus @var{n}-choose-1 plus @var{n}-choose-2, and so
on up to @address@hidden,
always comes out to zero. Let's verify this
for @expr{n=6}.
address@hidden ifinfo
address@hidden ifnottex
@tex
As another example, a theorem about binomial coefficients tells
us that the alternating sum of binomial coefficients
@@ -5193,12 +5189,12 @@
that the steps are not required to be flat. Simpson's rule boils
down to the formula,
address@hidden
address@hidden
@example
(h/3) * (f(a) + 4 f(a+h) + 2 f(a+2h) + 4 f(a+3h) + ...
+ 2 f(a+(n-2)*h) + 4 f(a+(n-1)*h) + f(a+n*h))
@end example
address@hidden ifinfo
address@hidden ifnottex
@tex
\turnoffactive
\beforedisplay
@@ -5215,12 +5211,12 @@
For reference, here is the corresponding formula for the stairstep
method:
address@hidden
address@hidden
@example
h * (f(a) + f(a+h) + f(a+2h) + f(a+3h) + ...
+ f(a+(n-2)*h) + f(a+(n-1)*h))
@end example
address@hidden ifinfo
address@hidden ifnottex
@tex
\turnoffactive
\beforedisplay
@@ -5657,11 +5653,11 @@
infinite series that exactly equals the value of that function at
values of @expr{x} near zero.
address@hidden
address@hidden
@example
cos(x) = 1 - x^2 / 2! + x^4 / 4! - x^6 / 6! + ...
@end example
address@hidden ifinfo
address@hidden ifnottex
@tex
\turnoffactive
\beforedisplay
@@ -5675,11 +5671,11 @@
Mathematicians often write a truncated series using a ``big-O'' notation
that records what was the lowest term that was truncated.
address@hidden
address@hidden
@example
cos(x) = 1 - x^2 / 2! + O(x^3)
@end example
address@hidden ifinfo
address@hidden ifnottex
@tex
\turnoffactive
\beforedisplay
@@ -6204,11 +6200,11 @@
@expr{x_0} which is reasonably close to the desired solution, apply
this formula over and over:
address@hidden
address@hidden
@example
new_x = x - f(x)/f'(x)
@end example
address@hidden ifinfo
address@hidden ifnottex
@tex
\beforedisplay
$$ x_{\rm new} = x - {f(x) \over f'(x)} $$
@@ -6242,11 +6238,11 @@
@infoline @expr{ln(gamma(z))}.
For large values of @expr{z}, it can be approximated by the infinite sum
address@hidden
address@hidden
@example
psi(z) ~= ln(z) - 1/2z - sum(bern(2 n) / 2 n z^(2 n), n, 1, inf)
@end example
address@hidden ifinfo
address@hidden ifnottex
@tex
\beforedisplay
$$ \psi(z) \approx \ln z - {1\over2z} -
@@ -6305,13 +6301,13 @@
(@bullet{}) @strong{Exercise 11.} The @dfn{Stirling numbers of the
first kind} are defined by the recurrences,
address@hidden
address@hidden
@example
s(n,n) = 1 for n >= 0,
s(n,0) = 0 for n > 0,
s(n+1,m) = s(n,m-1) - n s(n,m) for n >= m >= 1.
@end example
address@hidden ifinfo
address@hidden ifnottex
@tex
\turnoffactive
\beforedisplay
@@ -6843,14 +6839,14 @@
@node Matrix Answer 2, Matrix Answer 3, Matrix Answer 1, Answers to Exercises
@subsection Matrix Tutorial Exercise 2
address@hidden
address@hidden
@example
@group
x + a y = 6
x + b y = 10
@end group
@end example
address@hidden ifinfo
address@hidden ifnottex
@tex
\turnoffactive
\beforedisplay
@@ -6905,7 +6901,7 @@
@infoline @expr{A2 * X = B2}
which we can solve using Calc's @samp{/} command.
address@hidden
address@hidden
@example
@group
a + 2b + 3c = 6
@@ -6914,7 +6910,7 @@
2a + 4b + 6c = 11
@end group
@end example
address@hidden ifinfo
address@hidden ifnottex
@tex
\turnoffactive
\beforedisplayh
@@ -7045,11 +7041,11 @@
Given @expr{x} and @expr{y} vectors in quick variables 1 and 2 as before,
the first job is to form the matrix that describes the problem.
address@hidden
address@hidden
@example
m*x + b*1 = y
@end example
address@hidden ifinfo
address@hidden ifnottex
@tex
\turnoffactive
\beforedisplay
@@ -7836,11 +7832,11 @@
subtracting off enough 511's to put the result in the desired range.
So the result when we take the modulo after every step is,
address@hidden
address@hidden
@example
3 (3 a + b - 511 m) + c - 511 n
@end example
address@hidden ifinfo
address@hidden ifnottex
@tex
\turnoffactive
\beforedisplay
@@ -7852,11 +7848,11 @@
for some suitable integers @expr{m} and @expr{n}. Expanding out by
the distributive law yields
address@hidden
address@hidden
@example
9 a + 3 b + c - 511*3 m - 511 n
@end example
address@hidden ifinfo
address@hidden ifnottex
@tex
\turnoffactive
\beforedisplay
@@ -7870,11 +7866,11 @@
term. So we can take it out to get an equivalent formula with
@expr{n' = 3m + n},
address@hidden
address@hidden
@example
9 a + 3 b + c - 511 n'
@end example
address@hidden ifinfo
address@hidden ifnottex
@tex
\turnoffactive
\beforedisplay
@@ -11285,7 +11281,7 @@
of the possible range of values a computation will produce, given the
set of possible values of the input.
address@hidden
address@hidden
Calc supports several varieties of intervals, including @dfn{closed}
intervals of the type shown above, @dfn{open} intervals such as
@samp{(2 ..@: 4)}, which represents the range of numbers from 2 to 4
@@ -11296,7 +11292,7 @@
@samp{[2 ..@: 4)} represents @expr{2 <= x < 4},
@samp{(2 ..@: 4]} represents @expr{2 < x <= 4}, and
@samp{(2 ..@: 4)} represents @expr{2 < x < 4}.
address@hidden ifinfo
address@hidden ifnottex
@tex
Calc supports several varieties of intervals, including \dfn{closed}
intervals of the type shown above, \dfn{open} intervals such as
@@ -11929,14 +11925,14 @@
@pindex calc-trail-isearch-forward
@kindex t r
@pindex calc-trail-isearch-backward
address@hidden
address@hidden
The @kbd{t s} (@code{calc-trail-isearch-forward}) and @kbd{t r}
(@code{calc-trail-isearch-backward}) commands perform an incremental
search forward or backward through the trail. You can press @key{RET}
to terminate the search; the trail pointer moves to the current line.
If you cancel the search with @kbd{C-g}, the trail pointer stays where
it was when the search began.
address@hidden ifinfo
address@hidden ifnottex
@tex
The @kbd{t s} (@code{calc-trail-isearch-forward}) and @kbd{t r}
(@code{calc-trail-isearch-backward}) com\-mands perform an incremental
@@ -14237,10 +14233,10 @@
Also, the ``discretionary multiplication sign'' @samp{\*} is read
the same as @samp{*}.
address@hidden
address@hidden
The @TeX{} version of this manual includes some printed examples at the
end of this section.
address@hidden ifinfo
address@hidden ifnottex
@iftex
Here are some examples of how various Calc formulas are formatted in @TeX{}:
@@ -17656,7 +17652,7 @@
(@code{calc-expand-formula}) command, or when taking derivatives or
integrals or solving equations involving the functions.
address@hidden
address@hidden
These formulas are shown using the conventions of Big display
mode (@kbd{d B}); for example, the formula for @code{fv} written
linearly is @samp{pmt * ((1 + rate)^n) - 1) / rate}.
@@ -17736,7 +17732,7 @@
ddb(cost, salv, life, per) = --------, book = cost - depreciation so far
life
@end example
address@hidden ifinfo
address@hidden ifnottex
@tex
\turnoffactive
$$ \code{fv}(r, n, p) = p { (1 + r)^n - 1 \over r } $$
@@ -18385,14 +18381,14 @@
You can think of this as taking the other half of the integral, from
@expr{x} to infinity.
address@hidden
address@hidden
The functions corresponding to the integrals that define @expr{P(a,x)}
and @expr{Q(a,x)} but without the normalizing @expr{1/gamma(a)}
factor are called @expr{g(a,x)} and @expr{G(a,x)}, respectively
(where @expr{g} and @expr{G} represent the lower- and upper-case Greek
letter gamma). You can obtain these using the @kbd{H f G} address@hidden
and @kbd{H I f G} address@hidden commands.
address@hidden ifinfo
address@hidden ifnottex
@tex
\turnoffactive
The functions corresponding to the integrals that define $P(a,x)$
@@ -18908,10 +18904,10 @@
@kindex H k c
@pindex calc-perm
@tindex perm
address@hidden
address@hidden
The @kbd{H k c} (@code{calc-perm}) address@hidden command computes the
number-of-permutations function @expr{N! / (N-M)!}.
address@hidden ifinfo
address@hidden ifnottex
@tex
The \kbd{H k c} (\code{calc-perm}) [\code{perm}] command computes the
number-of-perm\-utations function $N! \over (N-M)!\,$.
@@ -23151,13 +23147,13 @@
command will again prompt for an integration variable, then prompt for a
lower limit and an upper limit.
address@hidden
address@hidden
If you use the @code{integ} function directly in an algebraic formula,
you can also write @samp{integ(f,x,v)} which expresses the resulting
indefinite integral in terms of variable @code{v} instead of @code{x}.
With four arguments, @samp{integ(f(x),x,a,b)} represents a definite
integral from @code{a} to @code{b}.
address@hidden ifinfo
address@hidden ifnottex
@tex
If you use the @code{integ} function directly in an algebraic formula,
you can also write @samp{integ(f,x,v)} which expresses the resulting
@@ -24038,14 +24034,14 @@
For example, suppose the data matrix
address@hidden
address@hidden
@example
@group
[ [ 1, 2, 3, 4, 5 ]
[ 5, 7, 9, 11, 13 ] ]
@end group
@end example
address@hidden ifinfo
address@hidden ifnottex
@tex
\turnoffactive
\turnoffactive
@@ -24102,11 +24098,11 @@
the method of least squares. The idea is to define the @dfn{chi-square}
error measure
address@hidden
address@hidden
@example
chi^2 = sum((y_i - (a + b x_i))^2, i, 1, N)
@end example
address@hidden ifinfo
address@hidden ifnottex
@tex
\turnoffactive
\beforedisplay
@@ -24291,11 +24287,11 @@
@infoline @expr{chi^2}
statistic is now,
address@hidden
address@hidden
@example
chi^2 = sum(((y_i - (a + b x_i)) / sigma_i)^2, i, 1, N)
@end example
address@hidden ifinfo
address@hidden ifnottex
@tex
\turnoffactive
\beforedisplay
@@ -27613,9 +27609,9 @@
@tex
for \AA ngstroms.
@end tex
address@hidden
address@hidden
for Angstroms.
address@hidden ifinfo
address@hidden ifnottex
The unit @code{pt} stands for pints; the name @code{point} stands for
a typographical point, defined by @samp{72 point = 1 in}. This is
@@ -34535,9 +34531,9 @@
@iftex
@unnumberedsec TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
@end iftex
address@hidden
address@hidden
@center TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
address@hidden ifinfo
address@hidden ifnottex
@enumerate 0
@item
@@ -34760,9 +34756,9 @@
@iftex
@heading NO WARRANTY
@end iftex
address@hidden
address@hidden
@center NO WARRANTY
address@hidden ifinfo
address@hidden ifnottex
@item
BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
@@ -34790,9 +34786,9 @@
@iftex
@heading END OF TERMS AND CONDITIONS
@end iftex
address@hidden
address@hidden
@center END OF TERMS AND CONDITIONS
address@hidden ifinfo
address@hidden ifnottex
@page
@unnumberedsec Appendix: How to Apply These Terms to Your New Programs