(Basic Arithmetic, Customizing Calc): Mention
`calc-multiplication-has-precedence'.
This commit is contained in:
parent
8eb17675b9
commit
89046ea50a
3 changed files with 76 additions and 7 deletions
|
@ -50,6 +50,40 @@
|
|||
|
||||
* progmodes/vera-mode.el: New file.
|
||||
|
||||
2007-06-19 Jay Belanger <jay.p.belanger@gmail.com>
|
||||
|
||||
* calc/calc.el (calc-multiplication-has-precendence):
|
||||
New variable.
|
||||
(math-standard-ops,math-standard-ops-p,math-expr-ops):
|
||||
New functions.
|
||||
(math-expr-opers): Define using math-standard-ops rather than
|
||||
math-standard-opers.
|
||||
* calc/calc-aent.el (calc-do-calc-eval): Let math-expr-opers
|
||||
equal the function math-standard-ops rather than the variable
|
||||
math-standard-opers.
|
||||
(calc-algebraic-entry): Let math-expr-opers equal
|
||||
math-standard-ops or math-expr-ops, as appropriate.
|
||||
(math-expr-read-level,math-read-factor): Let math-expr-opers
|
||||
equal math-expr-ops.
|
||||
* calc/calc-embed.el (calc-embedded-finish-edit):
|
||||
Let math-expr-opers equal the function math-standard-ops
|
||||
rather than the variable math-standard-opers.
|
||||
* calc/calc-ext.el (math-read-plain-expr)
|
||||
(math-format-flat-expr-fancy): Let math-expr-opers equal the
|
||||
function math-standard-ops rather than the variable
|
||||
math-standard-opers.
|
||||
* calc/calc-lang.el (calc-set-language,math-read-big-rec):
|
||||
Let math-expr-opers equal the function math-standard-ops rather
|
||||
than the variable math-standard-opers.
|
||||
* calc/calc-prog.el (calc-read-parse-table): Let math-expr-opers
|
||||
equal the function math-standard-ops rather than the variable
|
||||
math-standard-opers.
|
||||
* calc/calc-yank.el (calc-finish-stack-edit): Let math-expr-opers
|
||||
equal the function math-standard-ops rather than the variable
|
||||
math-standard-opers.
|
||||
* calc/calccomp.el (math-compose-expr): Let math-expr-opers equal
|
||||
math-expr-ops.
|
||||
|
||||
2007-06-19 Ivan Kanis <apple@kanis.eu>
|
||||
|
||||
* vc-hg.el: New file.
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2007-06-19 Jay Belanger <jay.p.belanger@gmail.com>
|
||||
|
||||
* calc.texi (Basic Arithmetic, Customizing Calc): Mention
|
||||
the variable `calc-multiplication-has-precedence'.
|
||||
|
||||
2007-06-19 Carsten Dominik <dominik@science.uva.nl>
|
||||
|
||||
* org.texi (Tag): Section swapped with node Timestamps.
|
||||
|
|
|
@ -15975,9 +15975,28 @@ whereas @w{@samp{[-2 ..@: 3] ^ 2}} is @samp{[0 ..@: 9]}.
|
|||
@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
|
||||
@samp{(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.
|
||||
@xref{Language Modes}.) This default ordering can be changed by setting
|
||||
the customizable variable @code{calc-multiplication-has-precedence} to
|
||||
@code{nil} (@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
|
||||
@smallexample
|
||||
@group
|
||||
a b
|
||||
---.
|
||||
c d
|
||||
@end group
|
||||
@end 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 @@ See @ref{Graphics}.@*
|
|||
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 @@ should also be added to @code{calc-embedded-announce-formula-alist}
|
|||
and @code{calc-embedded-open-close-plain-alist}.
|
||||
@end defvar
|
||||
|
||||
@defvar 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 non-@code{nil}, then multiplication has precedence, and so for
|
||||
example @samp{a/b*c} will be interpreted as @samp{a/(b*c)}. If
|
||||
@code{calc-multiplication-has-precedence} is @code{nil}, then division
|
||||
has precedence, and so for example @samp{a/b*c} will be interpreted as
|
||||
@samp{(a/b)*c}. The default value of
|
||||
@code{calc-multiplication-has-precedence} is @code{t}.
|
||||
@end defvar
|
||||
|
||||
@node Reporting Bugs, Summary, Customizing Calc, Top
|
||||
@appendix Reporting Bugs
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue