aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorJay Belanger2009-01-27 01:55:20 +0000
committerJay Belanger2009-01-27 01:55:20 +0000
commit5fafc2475d6d7574dc02e771f5178edb75bc2bf0 (patch)
tree00dfaca33fad1f3350e84dd10fcfe0b2ec5acc39 /doc
parentd22546d532f21703cce908a40c66929511ecde8a (diff)
downloademacs-5fafc2475d6d7574dc02e771f5178edb75bc2bf0.tar.gz
emacs-5fafc2475d6d7574dc02e771f5178edb75bc2bf0.zip
(Embedded Mode, Algebraic-Style Calculations): Make Calc the subject
of sentences. (Rearranging Formulas using Selections): Discuss new options for `j *'.
Diffstat (limited to 'doc')
-rw-r--r--doc/misc/ChangeLog7
-rw-r--r--doc/misc/calc.texi49
2 files changed, 36 insertions, 20 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index 352573f9a6a..f46514d2173 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,3 +1,10 @@
12009-01-27 Jay Belanger <jay.p.belanger@gmail.com>
2
3 * calc.texi (Embedded Mode, Algebraic-Style Calculations):
4 Make Calc the subject of sentences.
5 (Rearranging Formulas using Selections): Discuss new options
6 for `j *'.
7
12009-01-26 Michael Albinus <michael.albinus@gmx.de> 82009-01-26 Michael Albinus <michael.albinus@gmx.de>
2 9
3 * dbus.texi (Errors and Events): New variable dbus-event-error-hooks. 10 * dbus.texi (Errors and Events): New variable dbus-event-error-hooks.
diff --git a/doc/misc/calc.texi b/doc/misc/calc.texi
index 35f838240a6..a167a76bbe1 100644
--- a/doc/misc/calc.texi
+++ b/doc/misc/calc.texi
@@ -913,8 +913,8 @@ is
913@end group 913@end group
914@end smallexample 914@end smallexample
915 915
916(Note that by default division had lower precedence than multiplication 916(Note that by default, Calc gives division lower precedence than multiplication,
917in Calc, so that @samp{1 / ln(x) x} is equivalent to @samp{1 / (ln(x) x)}.) 917so that @samp{1 / ln(x) x} is equivalent to @samp{1 / (ln(x) x)}.)
918 918
919To make this look nicer, you might want to press @kbd{d =} to center 919To make this look nicer, you might want to press @kbd{d =} to center
920the formula, and even @kbd{d B} to use Big display mode. 920the formula, and even @kbd{d B} to use Big display mode.
@@ -1758,9 +1758,9 @@ Calculator in Algebraic mode, which is closer to the way
1758non-RPN calculators work. In Algebraic mode, you enter formulas 1758non-RPN calculators work. In Algebraic mode, you enter formulas
1759in traditional @expr{2+3} notation. 1759in traditional @expr{2+3} notation.
1760 1760
1761@strong{Warning:} Note that @samp{/} has lower precedence than 1761@strong{Notice:} Calc gives @samp{/} lower precedence than @samp{*}, so
1762@samp{*}, so that @samp{a/b*c} is interpreted as @samp{a/(b*c)}. See 1762that @samp{a/b*c} is interpreted as @samp{a/(b*c)}; this is not
1763below for details. 1763standard across all computer languages. See below for details.
1764 1764
1765You don't really need any special ``mode'' to enter algebraic formulas. 1765You don't really need any special ``mode'' to enter algebraic formulas.
1766You can enter a formula at any time by pressing the apostrophe (@kbd{'}) 1766You can enter a formula at any time by pressing the apostrophe (@kbd{'})
@@ -21921,24 +21921,33 @@ formula using algebraic entry, then multiplies both sides of the
21921selected quotient or equation by that formula. It simplifies each 21921selected quotient or equation by that formula. It simplifies each
21922side with @kbd{a s} (@code{calc-simplify}) before re-forming the 21922side with @kbd{a s} (@code{calc-simplify}) before re-forming the
21923quotient or equation. You can suppress this simplification by 21923quotient or equation. You can suppress this simplification by
21924providing any numeric prefix argument. There is also a @kbd{j /} 21924providing a prefix argument: @kbd{C-u j *}. There is also a @kbd{j /}
21925(@code{calc-sel-div-both-sides}) which is similar to @kbd{j *} but 21925(@code{calc-sel-div-both-sides}) which is similar to @kbd{j *} but
21926dividing instead of multiplying by the factor you enter. 21926dividing instead of multiplying by the factor you enter.
21927 21927
21928As a special feature, if the numerator of the quotient is 1, then 21928If the selection is a quotient with numerator 1, then Calc's default
21929the denominator is expanded at the top level using the distributive 21929simplifications would normally cancel the new factors. To prevent
21930law (i.e., using the @kbd{C-u -1 a x} command). Suppose the 21930this, when the @kbd{j *} command is used on a selection whose numerator is
21931formula on the stack is @samp{1 / (sqrt(a) + 1)}, and you wish 219311 or -1, the denominator is expanded at the top level using the
21932to eliminate the square root in the denominator by multiplying both 21932distributive law (as if using the @kbd{C-u 1 a x} command). Suppose the
21933sides by @samp{sqrt(a) - 1}. Calc's default simplifications would 21933formula on the stack is @samp{1 / (a + 1)} and you wish to multiplying the
21934change the result @samp{(sqrt(a) - 1) / (sqrt(a) - 1) (sqrt(a) + 1)} 21934top and bottom by @samp{a - 1}. Calc's default simplifications would
21935right back to the original form by cancellation; Calc expands the 21935normally change the result @samp{(a - 1) /(a + 1) (a - 1)} back
21936denominator to @samp{sqrt(a) (sqrt(a) - 1) + sqrt(a) - 1} to prevent 21936to the original form by cancellation; when @kbd{j *} is used, Calc
21937this. (You would now want to use an @kbd{a x} command to expand 21937expands the denominator to @samp{a (a - 1) + a - 1} to prevent this.
21938the rest of the way, whereupon the denominator would cancel out to 21938
21939the desired form, @samp{a - 1}.) When the numerator is not 1, this 21939If you wish the @kbd{j *} command to completely expand the denominator
21940initial expansion is not necessary because Calc's default 21940of a quotient you can call it with a zero prefix: @kbd{C-u 0 j *}. For
21941simplifications will not notice the potential cancellation. 21941example, if the formula on the stack is @samp{1 / (sqrt(a) + 1)}, you may
21942wish to eliminate the square root in the denominator by multiplying
21943the top and bottom by @samp{sqrt(a) - 1}. If you did this simply by using
21944a simple @kbd{j *} command, you would get
21945@samp{(sqrt(a)-1)/ (sqrt(a) (sqrt(a) - 1) + sqrt(a) - 1)}. Instead,
21946you would probably want to use @kbd{C-u 0 j *}, which would expand the
21947bottom and give you the desired result @samp{(sqrt(a)-1)/(a-1)}. More
21948generally, if @kbd{j *} is called with an argument of a positive
21949integer @var{n}, then the denominator of the expression will be
21950expanded @var{n} times (as if with the @kbd{C-u @var{n} a x} command).
21942 21951
21943If the selection is an inequality, @kbd{j *} and @kbd{j /} will 21952If the selection is an inequality, @kbd{j *} and @kbd{j /} will
21944accept any factor, but will warn unless they can prove the factor 21953accept any factor, but will warn unless they can prove the factor