aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/misc/ChangeLog5
-rw-r--r--doc/misc/calc.texi49
2 files changed, 31 insertions, 23 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index 94ec52a8392..90c6da4b158 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,3 +1,8 @@
12007-10-25 Jay Belanger <jay.p.belanger@gmail.com>
2
3 * calc.texi (Default Simplifications, Making Selections)
4 (Customizing Calc): Clarify associativity of multiplication.
5
12007-10-23 Michael Albinus <michael.albinus@gmx.de> 62007-10-23 Michael Albinus <michael.albinus@gmx.de>
2 7
3 * tramp.texi (Traces and Profiles): Simplify loop over 8 * tramp.texi (Traces and Profiles): Simplify loop over
diff --git a/doc/misc/calc.texi b/doc/misc/calc.texi
index 24167328d54..ee2dbfb5bc8 100644
--- a/doc/misc/calc.texi
+++ b/doc/misc/calc.texi
@@ -21357,16 +21357,17 @@ entire four-term sum.
21357@pindex calc-break-selections 21357@pindex calc-break-selections
21358The @kbd{j b} (@code{calc-break-selections}) command controls a mode 21358The @kbd{j b} (@code{calc-break-selections}) command controls a mode
21359in which the ``deep structure'' of these associative formulas shows 21359in which the ``deep structure'' of these associative formulas shows
21360through. Calc actually stores the above formulas as @samp{((a + b) - c) + d} 21360through. Calc actually stores the above formulas as
21361and @samp{x * (y * z)}. (Note that for certain obscure reasons, Calc 21361@samp{((a + b) - c) + d} and @samp{x * (y * z)}. (Note that for certain
21362treats multiplication as right-associative.) Once you have enabled 21362obscure reasons, by default Calc treats multiplication as
21363@kbd{j b} mode, selecting with the cursor on the @samp{-} sign would 21363right-associative.) Once you have enabled @kbd{j b} mode, selecting
21364only select the @samp{a + b - c} portion, which makes sense when the 21364with the cursor on the @samp{-} sign would only select the @samp{a + b -
21365deep structure of the sum is considered. There is no way to select 21365c} portion, which makes sense when the deep structure of the sum is
21366the @samp{b - c + d} portion; although this might initially look 21366considered. There is no way to select the @samp{b - c + d} portion;
21367like just as legitimate a sub-formula as @samp{a + b - c}, the deep 21367although this might initially look like just as legitimate a sub-formula
21368structure shows that it isn't. The @kbd{d U} command can be used 21368as @samp{a + b - c}, the deep structure shows that it isn't. The @kbd{d
21369to view the deep structure of any formula (@pxref{Normal Language Modes}). 21369U} command can be used to view the deep structure of any formula
21370(@pxref{Normal Language Modes}).
21370 21371
21371When @kbd{j b} mode has not been enabled, the deep structure is 21372When @kbd{j b} mode has not been enabled, the deep structure is
21372generally hidden by the selection commands---what you see is what 21373generally hidden by the selection commands---what you see is what
@@ -22158,13 +22159,13 @@ Arithmetic operators like @kbd{+} and @kbd{*} always take two
22158arguments in Calc's internal form. Sums and products of three or 22159arguments in Calc's internal form. Sums and products of three or
22159more terms are arranged by the associative law of algebra into 22160more terms are arranged by the associative law of algebra into
22160a left-associative form for sums, @expr{((a + b) + c) + d}, and 22161a left-associative form for sums, @expr{((a + b) + c) + d}, and
22161a right-associative form for products, @expr{a * (b * (c * d))}. 22162(by default) a right-associative form for products,
22162Formulas like @expr{(a + b) + (c + d)} are rearranged to 22163@expr{a * (b * (c * d))}. Formulas like @expr{(a + b) + (c + d)} are
22163left-associative form, though this rarely matters since Calc's 22164rearranged to left-associative form, though this rarely matters since
22164algebra commands are designed to hide the inner structure of 22165Calc's algebra commands are designed to hide the inner structure of sums
22165sums and products as much as possible. Sums and products in 22166and products as much as possible. Sums and products in their proper
22166their proper associative form will be written without parentheses 22167associative form will be written without parentheses in the examples
22167in the examples below. 22168below.
22168 22169
22169Sums and products are @emph{not} rearranged according to the 22170Sums and products are @emph{not} rearranged according to the
22170commutative law (@expr{a + b} to @expr{b + a}) except in a few 22171commutative law (@expr{a + b} to @expr{b + a}) except in a few
@@ -34868,12 +34869,14 @@ and @code{calc-embedded-open-close-plain-alist}.
34868 34869
34869@defvar calc-multiplication-has-precedence 34870@defvar calc-multiplication-has-precedence
34870The variable @code{calc-multiplication-has-precedence} determines 34871The variable @code{calc-multiplication-has-precedence} determines
34871whether multiplication has precedence over division in algebraic formulas 34872whether multiplication has precedence over division in algebraic
34872in normal language modes. If @code{calc-multiplication-has-precedence} 34873formulas in normal language modes. If
34873is non-@code{nil}, then multiplication has precedence, and so for 34874@code{calc-multiplication-has-precedence} is non-@code{nil}, then
34874example @samp{a/b*c} will be interpreted as @samp{a/(b*c)}. If 34875multiplication has precedence (and, for certain obscure reasons, is
34875@code{calc-multiplication-has-precedence} is @code{nil}, then 34876right associative), and so for example @samp{a/b*c} will be interpreted
34876multiplication has the same precedence as division, and so for example 34877as @samp{a/(b*c)}. If @code{calc-multiplication-has-precedence} is
34878@code{nil}, then multiplication has the same precedence as division
34879(and, like division, is left associative), and so for example
34877@samp{a/b*c} will be interpreted as @samp{(a/b)*c}. The default value 34880@samp{a/b*c} will be interpreted as @samp{(a/b)*c}. The default value
34878of @code{calc-multiplication-has-precedence} is @code{t}. 34881of @code{calc-multiplication-has-precedence} is @code{t}.
34879@end defvar 34882@end defvar