diff options
| author | Jay Belanger | 2009-01-27 01:55:20 +0000 |
|---|---|---|
| committer | Jay Belanger | 2009-01-27 01:55:20 +0000 |
| commit | 5fafc2475d6d7574dc02e771f5178edb75bc2bf0 (patch) | |
| tree | 00dfaca33fad1f3350e84dd10fcfe0b2ec5acc39 /doc | |
| parent | d22546d532f21703cce908a40c66929511ecde8a (diff) | |
| download | emacs-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/ChangeLog | 7 | ||||
| -rw-r--r-- | doc/misc/calc.texi | 49 |
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 @@ | |||
| 1 | 2009-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 | |||
| 1 | 2009-01-26 Michael Albinus <michael.albinus@gmx.de> | 8 | 2009-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, |
| 917 | in Calc, so that @samp{1 / ln(x) x} is equivalent to @samp{1 / (ln(x) x)}.) | 917 | so that @samp{1 / ln(x) x} is equivalent to @samp{1 / (ln(x) x)}.) |
| 918 | 918 | ||
| 919 | To make this look nicer, you might want to press @kbd{d =} to center | 919 | To make this look nicer, you might want to press @kbd{d =} to center |
| 920 | the formula, and even @kbd{d B} to use Big display mode. | 920 | the 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 | |||
| 1758 | non-RPN calculators work. In Algebraic mode, you enter formulas | 1758 | non-RPN calculators work. In Algebraic mode, you enter formulas |
| 1759 | in traditional @expr{2+3} notation. | 1759 | in 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 | 1762 | that @samp{a/b*c} is interpreted as @samp{a/(b*c)}; this is not |
| 1763 | below for details. | 1763 | standard across all computer languages. See below for details. |
| 1764 | 1764 | ||
| 1765 | You don't really need any special ``mode'' to enter algebraic formulas. | 1765 | You don't really need any special ``mode'' to enter algebraic formulas. |
| 1766 | You can enter a formula at any time by pressing the apostrophe (@kbd{'}) | 1766 | You 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 | |||
| 21921 | selected quotient or equation by that formula. It simplifies each | 21921 | selected quotient or equation by that formula. It simplifies each |
| 21922 | side with @kbd{a s} (@code{calc-simplify}) before re-forming the | 21922 | side with @kbd{a s} (@code{calc-simplify}) before re-forming the |
| 21923 | quotient or equation. You can suppress this simplification by | 21923 | quotient or equation. You can suppress this simplification by |
| 21924 | providing any numeric prefix argument. There is also a @kbd{j /} | 21924 | providing 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 |
| 21926 | dividing instead of multiplying by the factor you enter. | 21926 | dividing instead of multiplying by the factor you enter. |
| 21927 | 21927 | ||
| 21928 | As a special feature, if the numerator of the quotient is 1, then | 21928 | If the selection is a quotient with numerator 1, then Calc's default |
| 21929 | the denominator is expanded at the top level using the distributive | 21929 | simplifications would normally cancel the new factors. To prevent |
| 21930 | law (i.e., using the @kbd{C-u -1 a x} command). Suppose the | 21930 | this, when the @kbd{j *} command is used on a selection whose numerator is |
| 21931 | formula on the stack is @samp{1 / (sqrt(a) + 1)}, and you wish | 21931 | 1 or -1, the denominator is expanded at the top level using the |
| 21932 | to eliminate the square root in the denominator by multiplying both | 21932 | distributive law (as if using the @kbd{C-u 1 a x} command). Suppose the |
| 21933 | sides by @samp{sqrt(a) - 1}. Calc's default simplifications would | 21933 | formula on the stack is @samp{1 / (a + 1)} and you wish to multiplying the |
| 21934 | change the result @samp{(sqrt(a) - 1) / (sqrt(a) - 1) (sqrt(a) + 1)} | 21934 | top and bottom by @samp{a - 1}. Calc's default simplifications would |
| 21935 | right back to the original form by cancellation; Calc expands the | 21935 | normally change the result @samp{(a - 1) /(a + 1) (a - 1)} back |
| 21936 | denominator to @samp{sqrt(a) (sqrt(a) - 1) + sqrt(a) - 1} to prevent | 21936 | to the original form by cancellation; when @kbd{j *} is used, Calc |
| 21937 | this. (You would now want to use an @kbd{a x} command to expand | 21937 | expands the denominator to @samp{a (a - 1) + a - 1} to prevent this. |
| 21938 | the rest of the way, whereupon the denominator would cancel out to | 21938 | |
| 21939 | the desired form, @samp{a - 1}.) When the numerator is not 1, this | 21939 | If you wish the @kbd{j *} command to completely expand the denominator |
| 21940 | initial expansion is not necessary because Calc's default | 21940 | of a quotient you can call it with a zero prefix: @kbd{C-u 0 j *}. For |
| 21941 | simplifications will not notice the potential cancellation. | 21941 | example, if the formula on the stack is @samp{1 / (sqrt(a) + 1)}, you may |
| 21942 | wish to eliminate the square root in the denominator by multiplying | ||
| 21943 | the top and bottom by @samp{sqrt(a) - 1}. If you did this simply by using | ||
| 21944 | a simple @kbd{j *} command, you would get | ||
| 21945 | @samp{(sqrt(a)-1)/ (sqrt(a) (sqrt(a) - 1) + sqrt(a) - 1)}. Instead, | ||
| 21946 | you would probably want to use @kbd{C-u 0 j *}, which would expand the | ||
| 21947 | bottom and give you the desired result @samp{(sqrt(a)-1)/(a-1)}. More | ||
| 21948 | generally, if @kbd{j *} is called with an argument of a positive | ||
| 21949 | integer @var{n}, then the denominator of the expression will be | ||
| 21950 | expanded @var{n} times (as if with the @kbd{C-u @var{n} a x} command). | ||
| 21942 | 21951 | ||
| 21943 | If the selection is an inequality, @kbd{j *} and @kbd{j /} will | 21952 | If the selection is an inequality, @kbd{j *} and @kbd{j /} will |
| 21944 | accept any factor, but will warn unless they can prove the factor | 21953 | accept any factor, but will warn unless they can prove the factor |