emacs-diffs
[Top][All Lists]
Advanced

[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: Wed, 20 Jun 2007 15:17:30 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Jay Belanger <jpb>      07/06/20 15:17:29

Index: calc.texi
===================================================================
RCS file: /cvsroot/emacs/emacs/man/calc.texi,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -b -r1.95 -r1.96
--- calc.texi   23 Apr 2007 21:32:44 -0000      1.95
+++ calc.texi   20 Jun 2007 15:17:29 -0000      1.96
@@ -15975,9 +15975,28 @@
 @mindex @null
 @end ignore
 @tindex /
-The @kbd{/} (@code{calc-divide}) command divides two numbers.  Note that
-when using algebraic entry, @samp{/} has lower precedence than @samp{*}, 
-so that @samp{a/b*c} is interpreted as @samp{a/(b*c)}.
+The @kbd{/} (@code{calc-divide}) command divides two numbers.  
+
+When combining multiplication and division in an algebraic formula, it
+is good style to use parentheses to distinguish between possible
+interpretations; the expression @samp{a/b*c} should be written
address@hidden(a/b)*c} or @samp{a/(b*c)}, as appropriate.  Without the
+parentheses, Calc will interpret @samp{a/b*c} as @samp{a/(b*c)}, since
+in algebraic entry Calc gives division a lower precedence than
+multiplication. (This is not standard across all computer languages, and
+Calc may change the precedence depending on the language mode being used.  
address@hidden Modes}.)  This default ordering can be changed by setting
+the customizable variable @code{calc-multiplication-has-precedence} to
address@hidden (@pxref{Customizing Calc}); this will give division a higher
+precedence than multiplication.  Note that Calc's default choice of
+precedence allows @samp{a b / c d} to be used as a shortcut for
address@hidden
address@hidden
+a b
+---.
+c d
address@hidden group
address@hidden smallexample
 
 When dividing a scalar @expr{B} by a square matrix @expr{A}, the
 computation performed is @expr{B} times the inverse of @expr{A}.  This
@@ -34899,10 +34918,9 @@
 The variable @code{calc-gnuplot-name} should be the name of the
 GNUPLOT program (a string).  If you have GNUPLOT installed on your
 system but Calc is unable to find it, you may need to set this
-variable.  (@pxref{Customizing Calc})
-You may also need to set some Lisp variables to show Calc how to run
-GNUPLOT on your system, see @ref{Devices, ,Graphical Devices} .  The default 
value
-of @code{calc-gnuplot-name} is @code{"gnuplot"}.
+variable.  You may also need to set some Lisp variables to show Calc how
+to run GNUPLOT on your system, see @ref{Devices, ,Graphical Devices} .
+The default value of @code{calc-gnuplot-name} is @code{"gnuplot"}.
 @end defvar
 
 @defvar  calc-gnuplot-plot-command
@@ -35158,6 +35176,18 @@
 and @code{calc-embedded-open-close-plain-alist}.
 @end defvar
 
address@hidden calc-multiplication-has-precedence
+The variable @code{calc-multiplication-has-precedence} determines
+whether multiplication or division has precedence in algebraic formulas
+in normal language modes.  If @code{calc-multiplication-has-precedence}
+is address@hidden, then multiplication has precedence, and so for
+example @samp{a/b*c} will be interpreted as @samp{a/(b*c)}. If
address@hidden is @code{nil}, then division
+has precedence, and so for example @samp{a/b*c} will be interpreted as
address@hidden(a/b)*c}.  The default value of
address@hidden is @code{t}.
address@hidden defvar
+
 @node Reporting Bugs, Summary, Customizing Calc, Top
 @appendix Reporting Bugs
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]