diff options
| author | Joakim Verona | 2011-11-22 15:46:22 +0100 |
|---|---|---|
| committer | Joakim Verona | 2011-11-22 15:46:22 +0100 |
| commit | a9c1e05adddf6011c61c0df582c5f2ed423f35c8 (patch) | |
| tree | 489fac119296416ba2f3530fd3bcb70efbbbdaa6 /doc | |
| parent | 40bb789236e486a3f36eefb2840c293369ce2af3 (diff) | |
| parent | b5afc20930c91159a1cbf629bcaa7e251653dc74 (diff) | |
| download | emacs-a9c1e05adddf6011c61c0df582c5f2ed423f35c8.tar.gz emacs-a9c1e05adddf6011c61c0df582c5f2ed423f35c8.zip | |
upstream
Diffstat (limited to 'doc')
33 files changed, 1167 insertions, 1265 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index b796acd8b39..6e687bcefc9 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2011-11-21 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * mark.texi (Global Mark Ring): Fix description of global mark | ||
| 4 | ring (Bug#10032). | ||
| 5 | |||
| 6 | 2011-11-20 Juanma Barranquero <lekktu@gmail.com> | ||
| 7 | |||
| 8 | * msdog.texi (Windows Fonts): Fix typo. | ||
| 9 | |||
| 1 | 2011-11-17 Glenn Morris <rgm@gnu.org> | 10 | 2011-11-17 Glenn Morris <rgm@gnu.org> |
| 2 | 11 | ||
| 3 | * regs.texi (Bookmarks): Small fixes related to saving. (Bug#10058) | 12 | * regs.texi (Bookmarks): Small fixes related to saving. (Bug#10058) |
diff --git a/doc/emacs/ack.texi b/doc/emacs/ack.texi index 6801c7f1e0e..d7022ba739b 100644 --- a/doc/emacs/ack.texi +++ b/doc/emacs/ack.texi | |||
| @@ -549,7 +549,7 @@ Taichi Kawabata added support for Devanagari script and the Indian | |||
| 549 | languages, and wrote @file{ucs-normalize.el} for Unicode normalization. | 549 | languages, and wrote @file{ucs-normalize.el} for Unicode normalization. |
| 550 | 550 | ||
| 551 | @item | 551 | @item |
| 552 | Taro Kawagishi implented the MD4 Message Digest Algorithm in Lisp; and | 552 | Taro Kawagishi implemented the MD4 Message Digest Algorithm in Lisp; and |
| 553 | wrote @file{ntlm.el} and @file{sasl-ntlm.el} for NT LanManager | 553 | wrote @file{ntlm.el} and @file{sasl-ntlm.el} for NT LanManager |
| 554 | authentication support. | 554 | authentication support. |
| 555 | 555 | ||
diff --git a/doc/emacs/mark.texi b/doc/emacs/mark.texi index 0eccef41711..7d65719e5f0 100644 --- a/doc/emacs/mark.texi +++ b/doc/emacs/mark.texi | |||
| @@ -354,9 +354,12 @@ Positions in Registers}). | |||
| 354 | @vindex global-mark-ring-max | 354 | @vindex global-mark-ring-max |
| 355 | In addition to the ordinary mark ring that belongs to each buffer, | 355 | In addition to the ordinary mark ring that belongs to each buffer, |
| 356 | Emacs has a single @dfn{global mark ring}. Each time you set a mark, | 356 | Emacs has a single @dfn{global mark ring}. Each time you set a mark, |
| 357 | in any buffer, this is recorded in the global mark ring in addition to | 357 | this is recorded in the global mark ring in addition to the current |
| 358 | the current buffer's own mark ring. The length of this ring can be | 358 | buffer's own mark ring, if you have switched buffers since the |
| 359 | controlled by @code{global-mark-ring-max}, and is 16 by default. | 359 | previous mark setting. Hence, the global mark ring records a sequence |
| 360 | of buffers that you have been in, and, for each buffer, a place where | ||
| 361 | you set the mark. The length of the global mark ring is controlled by | ||
| 362 | @code{global-mark-ring-max}, and is 16 by default. | ||
| 360 | 363 | ||
| 361 | @kindex C-x C-@key{SPC} | 364 | @kindex C-x C-@key{SPC} |
| 362 | @findex pop-global-mark | 365 | @findex pop-global-mark |
diff --git a/doc/emacs/msdog.texi b/doc/emacs/msdog.texi index bbaf31ade85..e3c9b8d4fc2 100644 --- a/doc/emacs/msdog.texi +++ b/doc/emacs/msdog.texi | |||
| @@ -914,7 +914,7 @@ as a fallback with the font family left unspecified. | |||
| 914 | @vindex w32-charset-info-alist | 914 | @vindex w32-charset-info-alist |
| 915 | @item registry | 915 | @item registry |
| 916 | Specifies the character set registry that the font is | 916 | Specifies the character set registry that the font is |
| 917 | expected to cover. Most TrueType and OpenType fonts will be unicode fonts | 917 | expected to cover. Most TrueType and OpenType fonts will be Unicode fonts |
| 918 | that cover several national character sets, but you can narrow down the | 918 | that cover several national character sets, but you can narrow down the |
| 919 | selection of fonts to those that support a particular character set by | 919 | selection of fonts to those that support a particular character set by |
| 920 | using a specific registry from @code{w32-charset-info-alist} here. | 920 | using a specific registry from @code{w32-charset-info-alist} here. |
| @@ -936,9 +936,9 @@ Options specific to @code{GDI} fonts: | |||
| 936 | @table @code | 936 | @table @code |
| 937 | 937 | ||
| 938 | @cindex font scripts (MS Windows) | 938 | @cindex font scripts (MS Windows) |
| 939 | @cindex font unicode subranges (MS Windows) | 939 | @cindex font Unicode subranges (MS Windows) |
| 940 | @item script | 940 | @item script |
| 941 | Specifies a unicode subrange the font should support. | 941 | Specifies a Unicode subrange the font should support. |
| 942 | 942 | ||
| 943 | The following scripts are recognized on Windows: @code{latin}, @code{greek}, | 943 | The following scripts are recognized on Windows: @code{latin}, @code{greek}, |
| 944 | @code{coptic}, @code{cyrillic}, @code{armenian}, @code{hebrew}, @code{arabic}, | 944 | @code{coptic}, @code{cyrillic}, @code{armenian}, @code{hebrew}, @code{arabic}, |
diff --git a/doc/emacs/windows.texi b/doc/emacs/windows.texi index ad2040c9047..c44b67454a2 100644 --- a/doc/emacs/windows.texi +++ b/doc/emacs/windows.texi | |||
| @@ -34,11 +34,11 @@ has its own value of point. | |||
| 34 | 34 | ||
| 35 | @cindex selected window | 35 | @cindex selected window |
| 36 | At any time, one Emacs window is the @dfn{selected window}; the | 36 | At any time, one Emacs window is the @dfn{selected window}; the |
| 37 | buffer this window is displaying is the current buffer. Each window | 37 | buffer this window is displaying is the current buffer. On graphical |
| 38 | has its own value of point. On graphical displays, the point is | 38 | displays, the point is indicated by a solid blinking cursor in the |
| 39 | indicated by a solid blinking cursor in the selected window, and by a | 39 | selected window, and by a hollow box in non-selected windows. On |
| 40 | hollow box in non-selected windows. On text-only terminals, the | 40 | text-only terminals, the cursor is drawn only in the selected window. |
| 41 | cursor is drawn only in the selected window. @xref{Cursor Display}. | 41 | @xref{Cursor Display}. |
| 42 | 42 | ||
| 43 | Commands to move point affect the value of point for the selected | 43 | Commands to move point affect the value of point for the selected |
| 44 | Emacs window only. They do not change the value of point in other | 44 | Emacs window only. They do not change the value of point in other |
diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi index ef04626e95f..244d95d6937 100644 --- a/doc/lispintro/emacs-lisp-intro.texi +++ b/doc/lispintro/emacs-lisp-intro.texi | |||
| @@ -887,7 +887,7 @@ but in this case, it is best to treat it as a novel or as a travel guide | |||
| 887 | to a country not yet visited: interesting, but not the same as being | 887 | to a country not yet visited: interesting, but not the same as being |
| 888 | there. | 888 | there. |
| 889 | 889 | ||
| 890 | Much of this introduction is dedicated to walk-throughs or guided tours | 890 | Much of this introduction is dedicated to walkthroughs or guided tours |
| 891 | of code used in GNU Emacs. These tours are designed for two purposes: | 891 | of code used in GNU Emacs. These tours are designed for two purposes: |
| 892 | first, to give you familiarity with real, working code (code you use | 892 | first, to give you familiarity with real, working code (code you use |
| 893 | every day); and, second, to give you familiarity with the way Emacs | 893 | every day); and, second, to give you familiarity with the way Emacs |
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 0fa50492481..293f253c545 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,43 @@ | |||
| 1 | 2011-11-21 Martin Rudalics <rudalics@gmx.at> | ||
| 2 | |||
| 3 | * windows.texi (Windows and Frames, Splitting Windows): Fix | ||
| 4 | typos. | ||
| 5 | |||
| 6 | 2011-11-21 Chong Yidong <cyd@gnu.org> | ||
| 7 | |||
| 8 | * windows.texi (Splitting Windows): Fix error in documentation of | ||
| 9 | window-combination-limit. | ||
| 10 | (Cyclic Window Ordering): Minor fixes to next-window, | ||
| 11 | one-window-p, and get-lru-window docs. Don't document | ||
| 12 | window-list-1. | ||
| 13 | (Buffers and Windows): Copyedits. | ||
| 14 | (Choosing Window): Document special handling of special-display-*. | ||
| 15 | (Choosing Window Options): Fix display-buffer-reuse-frames doc. | ||
| 16 | Don't document even-window-heights, which is going away. Clarify | ||
| 17 | which options are obeyed by which action functions. | ||
| 18 | |||
| 19 | 2011-11-20 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 20 | |||
| 21 | * display.texi (Invisible Text): Clarify point adjustment (bug#10072). | ||
| 22 | |||
| 23 | 2011-11-20 Martin Rudalics <rudalics@gmx.at> | ||
| 24 | |||
| 25 | * windows.texi (Resizing Windows, Splitting Windows): | ||
| 26 | Remove term "status" when talking about combination limits. | ||
| 27 | |||
| 28 | 2011-11-20 Juanma Barranquero <lekktu@gmail.com> | ||
| 29 | |||
| 30 | * compile.texi (Compiler Errors): | ||
| 31 | * help.texi (Help Functions): Fix typos. | ||
| 32 | |||
| 33 | 2011-11-19 Chong Yidong <cyd@gnu.org> | ||
| 34 | |||
| 35 | * windows.texi (Splitting Windows): Clarify role of window | ||
| 36 | parameters in split-window. Shorten the example. | ||
| 37 | (Deleting Windows): Rewrite intro to handle internal windows. | ||
| 38 | Fix delete-windows-on doc. | ||
| 39 | (Selecting Windows): Copyedits. | ||
| 40 | |||
| 1 | 2011-11-17 Martin Rudalics <rudalics@gmx.at> | 41 | 2011-11-17 Martin Rudalics <rudalics@gmx.at> |
| 2 | 42 | ||
| 3 | * windows.texi (Resizing Windows, Splitting Windows) | 43 | * windows.texi (Resizing Windows, Splitting Windows) |
| @@ -6,8 +46,8 @@ | |||
| 6 | 46 | ||
| 7 | 2011-11-16 Martin Rudalics <rudalics@gmx.at> | 47 | 2011-11-16 Martin Rudalics <rudalics@gmx.at> |
| 8 | 48 | ||
| 9 | * windows.texi (Resizing Windows, Splitting Windows): Rename | 49 | * windows.texi (Resizing Windows, Splitting Windows): |
| 10 | occurrences of window-nest to window-combination-limit. | 50 | Rename occurrences of window-nest to window-combination-limit. |
| 11 | 51 | ||
| 12 | 2011-11-14 Juanma Barranquero <lekktu@gmail.com> | 52 | 2011-11-14 Juanma Barranquero <lekktu@gmail.com> |
| 13 | 53 | ||
| @@ -15,8 +55,8 @@ | |||
| 15 | 55 | ||
| 16 | 2011-11-12 Martin Rudalics <rudalics@gmx.at> | 56 | 2011-11-12 Martin Rudalics <rudalics@gmx.at> |
| 17 | 57 | ||
| 18 | * windows.texi (Splitting Windows, Deleting Windows): Remove | 58 | * windows.texi (Splitting Windows, Deleting Windows): |
| 19 | references to splits status of windows. | 59 | Remove references to splits status of windows. |
| 20 | 60 | ||
| 21 | 2011-11-10 Glenn Morris <rgm@gnu.org> | 61 | 2011-11-10 Glenn Morris <rgm@gnu.org> |
| 22 | 62 | ||
| @@ -68,8 +108,8 @@ | |||
| 68 | (Windows and Frames): Various clarifications, e.g. non-live | 108 | (Windows and Frames): Various clarifications, e.g. non-live |
| 69 | windows also belong to frames. Fix window-list description. | 109 | windows also belong to frames. Fix window-list description. |
| 70 | Simplify window nesting example. | 110 | Simplify window nesting example. |
| 71 | (Splitting Windows, Window Configurations): Use | 111 | (Splitting Windows, Window Configurations): |
| 72 | split-window-below. | 112 | Use split-window-below. |
| 73 | 113 | ||
| 74 | 2011-11-04 Eli Zaretskii <eliz@gnu.org> | 114 | 2011-11-04 Eli Zaretskii <eliz@gnu.org> |
| 75 | 115 | ||
| @@ -119,8 +159,8 @@ | |||
| 119 | 159 | ||
| 120 | 2011-10-05 Chong Yidong <cyd@stupidchicken.com> | 160 | 2011-10-05 Chong Yidong <cyd@stupidchicken.com> |
| 121 | 161 | ||
| 122 | * display.texi (Low-Level Font, Face Attributes, Font Lookup): Fix | 162 | * display.texi (Low-Level Font, Face Attributes, Font Lookup): |
| 123 | Emacs manual xref (Bug#9675). | 163 | Fix Emacs manual xref (Bug#9675). |
| 124 | 164 | ||
| 125 | 2011-10-01 Chong Yidong <cyd@stupidchicken.com> | 165 | 2011-10-01 Chong Yidong <cyd@stupidchicken.com> |
| 126 | 166 | ||
| @@ -159,8 +199,8 @@ | |||
| 159 | * windows.texi (Window History): New node. Move text here from | 199 | * windows.texi (Window History): New node. Move text here from |
| 160 | Buffers and Windows. | 200 | Buffers and Windows. |
| 161 | (Switching Buffers): Rename from Displaying Buffers, since we | 201 | (Switching Buffers): Rename from Displaying Buffers, since we |
| 162 | don't document display-buffer here; callers changed. Document | 202 | don't document display-buffer here; callers changed. |
| 163 | FORCE-SAME-WINDOW arg to switch-to-buffer and | 203 | Document FORCE-SAME-WINDOW arg to switch-to-buffer and |
| 164 | switch-to-buffer-other-frame. Delete duplicate | 204 | switch-to-buffer-other-frame. Delete duplicate |
| 165 | replace-buffer-in-windows doc. | 205 | replace-buffer-in-windows doc. |
| 166 | (Choosing Window): Document display actions. | 206 | (Choosing Window): Document display actions. |
| @@ -191,10 +231,10 @@ | |||
| 191 | Provide examples. Describe window-nest and window-splits | 231 | Provide examples. Describe window-nest and window-splits |
| 192 | options. | 232 | options. |
| 193 | (Deleting Windows): Minor rewrite. | 233 | (Deleting Windows): Minor rewrite. |
| 194 | (Selecting Windows): Minor rewrite. Describe | 234 | (Selecting Windows): Minor rewrite. |
| 195 | frame-selected-window and set-frame-selected-window here. | 235 | Describe frame-selected-window and set-frame-selected-window here. |
| 196 | (Cyclic Window Ordering): Minor rewrite. Describe | 236 | (Cyclic Window Ordering): Minor rewrite. |
| 197 | window-list-1. | 237 | Describe window-list-1. |
| 198 | (Buffers and Windows): Rewrite. Explain a window's previous and | 238 | (Buffers and Windows): Rewrite. Explain a window's previous and |
| 199 | next buffers and the corresponding functions. | 239 | next buffers and the corresponding functions. |
| 200 | (Window Tree): Merge into Windows and Frames section. | 240 | (Window Tree): Merge into Windows and Frames section. |
| @@ -296,8 +336,8 @@ | |||
| 296 | 336 | ||
| 297 | * display.texi (Bidirectional Display): Document the pitfalls of | 337 | * display.texi (Bidirectional Display): Document the pitfalls of |
| 298 | concatenating strings with bidirectional content, with possible | 338 | concatenating strings with bidirectional content, with possible |
| 299 | solutions. Document bidi-string-mark-left-to-right. Mention | 339 | solutions. Document bidi-string-mark-left-to-right. |
| 300 | paragraph direction in modes that inherit from prog-mode. | 340 | Mention paragraph direction in modes that inherit from prog-mode. |
| 301 | Document use of `bidi-class' and `mirroring' properties as part of | 341 | Document use of `bidi-class' and `mirroring' properties as part of |
| 302 | reordering. | 342 | reordering. |
| 303 | 343 | ||
| @@ -353,8 +393,8 @@ | |||
| 353 | the next character, and doesn't affect longer sequences in | 393 | the next character, and doesn't affect longer sequences in |
| 354 | particular (bug#8935). | 394 | particular (bug#8935). |
| 355 | 395 | ||
| 356 | * debugging.texi (Using Debugger): Mention | 396 | * debugging.texi (Using Debugger): |
| 357 | @code{eval-expression-debug-on-error} (bug#8549). | 397 | Mention @code{eval-expression-debug-on-error} (bug#8549). |
| 358 | 398 | ||
| 359 | 2011-07-14 Eli Zaretskii <eliz@gnu.org> | 399 | 2011-07-14 Eli Zaretskii <eliz@gnu.org> |
| 360 | 400 | ||
| @@ -503,7 +543,7 @@ | |||
| 503 | 543 | ||
| 504 | 2011-06-15 Lars Magne Ingebrigtsen <larsi@gnus.org> | 544 | 2011-06-15 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 505 | 545 | ||
| 506 | * processes.texi (Process Information): Renamed `process-alive-p' | 546 | * processes.texi (Process Information): Rename `process-alive-p' |
| 507 | to `process-live-p' for consistency with other `-live-p' functions. | 547 | to `process-live-p' for consistency with other `-live-p' functions. |
| 508 | 548 | ||
| 509 | 2011-06-03 Paul Eggert <eggert@cs.ucla.edu> | 549 | 2011-06-03 Paul Eggert <eggert@cs.ucla.edu> |
| @@ -520,8 +560,8 @@ | |||
| 520 | 560 | ||
| 521 | 2011-05-31 Lars Magne Ingebrigtsen <larsi@gnus.org> | 561 | 2011-05-31 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 522 | 562 | ||
| 523 | * processes.texi (Process Information): Document | 563 | * processes.texi (Process Information): |
| 524 | `process-alive-p'. | 564 | Document `process-alive-p'. |
| 525 | 565 | ||
| 526 | 2011-05-29 Chong Yidong <cyd@stupidchicken.com> | 566 | 2011-05-29 Chong Yidong <cyd@stupidchicken.com> |
| 527 | 567 | ||
| @@ -1919,8 +1959,8 @@ | |||
| 1919 | 1959 | ||
| 1920 | 2009-05-09 Eli Zaretskii <eliz@gnu.org> | 1960 | 2009-05-09 Eli Zaretskii <eliz@gnu.org> |
| 1921 | 1961 | ||
| 1922 | * nonascii.texi (Default Coding Systems): Document | 1962 | * nonascii.texi (Default Coding Systems): |
| 1923 | find-auto-coding, set-auto-coding, and auto-coding-alist. | 1963 | Document find-auto-coding, set-auto-coding, and auto-coding-alist. |
| 1924 | Add indexing. | 1964 | Add indexing. |
| 1925 | (Lisp and Coding Systems): Add index entries. | 1965 | (Lisp and Coding Systems): Add index entries. |
| 1926 | 1966 | ||
| @@ -2237,7 +2277,7 @@ | |||
| 2237 | (Future Local Variables): Node deleted. | 2277 | (Future Local Variables): Node deleted. |
| 2238 | 2278 | ||
| 2239 | * objects.texi (General Escape Syntax): Update explanation of | 2279 | * objects.texi (General Escape Syntax): Update explanation of |
| 2240 | unicode escape syntax. | 2280 | Unicode escape syntax. |
| 2241 | 2281 | ||
| 2242 | 2009-02-23 Chong Yidong <cyd@stupidchicken.com> | 2282 | 2009-02-23 Chong Yidong <cyd@stupidchicken.com> |
| 2243 | 2283 | ||
| @@ -5151,8 +5191,8 @@ | |||
| 5151 | (Saving Buffers): Mention code and EOL conversions by file I/O | 5191 | (Saving Buffers): Mention code and EOL conversions by file I/O |
| 5152 | primitives and subroutines. | 5192 | primitives and subroutines. |
| 5153 | 5193 | ||
| 5154 | * nonascii.texi (Lisp and Coding Systems): Document | 5194 | * nonascii.texi (Lisp and Coding Systems): |
| 5155 | coding-system-eol-type. Add index entries for eol conversion. | 5195 | Document coding-system-eol-type. Add index entries for eol conversion. |
| 5156 | 5196 | ||
| 5157 | * display.texi (Defining Faces): Mention `mac', and add an xref to | 5197 | * display.texi (Defining Faces): Mention `mac', and add an xref to |
| 5158 | where window-system is described. | 5198 | where window-system is described. |
| @@ -9102,7 +9142,7 @@ | |||
| 9102 | 9142 | ||
| 9103 | * functions.texi (Defining Functions): Explain about redefining | 9143 | * functions.texi (Defining Functions): Explain about redefining |
| 9104 | primitives. | 9144 | primitives. |
| 9105 | (Function Safety): Renamed. Minor changes. | 9145 | (Function Safety): Rename. Minor changes. |
| 9106 | Comment out the detailed criteria for what is safe. | 9146 | Comment out the detailed criteria for what is safe. |
| 9107 | 9147 | ||
| 9108 | 2003-06-22 Andreas Schwab <schwab@suse.de> | 9148 | 2003-06-22 Andreas Schwab <schwab@suse.de> |
| @@ -9603,7 +9643,7 @@ | |||
| 9603 | 9643 | ||
| 9604 | * Makefile (infodir, prefix): New vars. | 9644 | * Makefile (infodir, prefix): New vars. |
| 9605 | (install): Use infodir. | 9645 | (install): Use infodir. |
| 9606 | (emacsinfodir): Deleted. | 9646 | (emacsinfodir): Delete. |
| 9607 | 9647 | ||
| 9608 | 1993-05-27 Richard Stallman (rms@mole.gnu.ai.mit.edu) | 9648 | 1993-05-27 Richard Stallman (rms@mole.gnu.ai.mit.edu) |
| 9609 | 9649 | ||
| @@ -9614,7 +9654,7 @@ | |||
| 9614 | 9654 | ||
| 9615 | 1993-05-16 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) | 9655 | 1993-05-16 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) |
| 9616 | 9656 | ||
| 9617 | * Makefile (dist): Changed to use Gzip instead of compress. | 9657 | * Makefile (dist): Change to use Gzip instead of compress. |
| 9618 | 9658 | ||
| 9619 | 1993-04-23 Eric S. Raymond (eric@mole.gnu.ai.mit.edu) | 9659 | 1993-04-23 Eric S. Raymond (eric@mole.gnu.ai.mit.edu) |
| 9620 | 9660 | ||
diff --git a/doc/lispref/compile.texi b/doc/lispref/compile.texi index fe5563370c4..372c041ab7a 100644 --- a/doc/lispref/compile.texi +++ b/doc/lispref/compile.texi | |||
| @@ -528,7 +528,7 @@ but the compiler does not issue warnings for anything that occurs | |||
| 528 | inside @var{body}. | 528 | inside @var{body}. |
| 529 | 529 | ||
| 530 | We recommend that you use this construct around the smallest | 530 | We recommend that you use this construct around the smallest |
| 531 | possible piece of code, to avoid missing possible warnings other than one | 531 | possible piece of code, to avoid missing possible warnings other than |
| 532 | one you intend to suppress. | 532 | one you intend to suppress. |
| 533 | @end defspec | 533 | @end defspec |
| 534 | 534 | ||
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 034d92f78c3..9849420b1f5 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi | |||
| @@ -870,15 +870,21 @@ ignore invisible newlines if @code{line-move-ignore-invisible} is | |||
| 870 | non-@code{nil} (the default), but only because they are explicitly | 870 | non-@code{nil} (the default), but only because they are explicitly |
| 871 | programmed to do so. | 871 | programmed to do so. |
| 872 | 872 | ||
| 873 | However, if a command ends with point inside or immediately before | 873 | However, if a command ends with point inside or at the boundary of invisible |
| 874 | invisible text, the main editing loop moves point further forward or | 874 | text, the main editing loop moves point to one of the two ends of the invisible |
| 875 | further backward (in the same direction that the command already moved | 875 | text. Which end to move to is chosen based on the following factors: make sure |
| 876 | it) until that condition is no longer true. Thus, if the command | 876 | that the overall movement of the command is still in the same direction, and |
| 877 | moved point back into an invisible range, Emacs moves point back to | 877 | prefer a position where an inserted char would not inherit the @code{invisible} |
| 878 | the beginning of that range, and then back one more character. If the | 878 | property. Additionally, if the text is not replaced by an ellipsis and the |
| 879 | command moved point forward into an invisible range, Emacs moves point | 879 | command only moved within the invisible text, then point is moved one extra |
| 880 | forward up to the first visible character that follows the invisible | 880 | character so as to try and reflect the command's movement by a visible movement |
| 881 | text. | 881 | of the cursor. |
| 882 | |||
| 883 | Thus, if the command moved point back to an invisible range (with the usual | ||
| 884 | stickiness), Emacs moves point back to the beginning of that range. If the | ||
| 885 | command moved point forward into an invisible range, Emacs moves point forward | ||
| 886 | to the first visible character that follows the invisible text and then forward | ||
| 887 | one more character. | ||
| 882 | 888 | ||
| 883 | Incremental search can make invisible overlays visible temporarily | 889 | Incremental search can make invisible overlays visible temporarily |
| 884 | and/or permanently when a match includes invisible text. To enable | 890 | and/or permanently when a match includes invisible text. To enable |
| @@ -4546,7 +4552,7 @@ you may prefer to use a different one for a given image type (which | |||
| 4546 | @c FIXME how is this priority determined? | 4552 | @c FIXME how is this priority determined? |
| 4547 | loader will be used in practice depends on the priority of the loaders). | 4553 | loader will be used in practice depends on the priority of the loaders). |
| 4548 | @c FIXME why are these uppercase when image-types is lower-case? | 4554 | @c FIXME why are these uppercase when image-types is lower-case? |
| 4549 | @c FIXME what are the possibe options? Are these actually file extensions? | 4555 | @c FIXME what are the possible options? Are these actually file extensions? |
| 4550 | For example, if you never want to use the ImageMagick loader to use | 4556 | For example, if you never want to use the ImageMagick loader to use |
| 4551 | JPEG files, add @code{JPG} to this list. | 4557 | JPEG files, add @code{JPG} to this list. |
| 4552 | 4558 | ||
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index d2e86a77112..dad1f28026e 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi | |||
| @@ -953,7 +953,7 @@ variable, Emacs uses the latter. By default, | |||
| 953 | The @code{alpha} frame parameter can also be a cons cell | 953 | The @code{alpha} frame parameter can also be a cons cell |
| 954 | @code{(@samp{active} . @samp{inactive})}, where @samp{active} is the | 954 | @code{(@samp{active} . @samp{inactive})}, where @samp{active} is the |
| 955 | opacity of the frame when it is selected, and @samp{inactive} is the | 955 | opacity of the frame when it is selected, and @samp{inactive} is the |
| 956 | opactity when it is not selected. | 956 | opacity when it is not selected. |
| 957 | @end table | 957 | @end table |
| 958 | 958 | ||
| 959 | The following frame parameters are semi-obsolete in that they are | 959 | The following frame parameters are semi-obsolete in that they are |
diff --git a/doc/lispref/help.texi b/doc/lispref/help.texi index 0ce05d55a07..3426e81cdb3 100644 --- a/doc/lispref/help.texi +++ b/doc/lispref/help.texi | |||
| @@ -653,7 +653,7 @@ buffer, which is used to regenerate the help information when the user | |||
| 653 | clicks on the @samp{Back} or @samp{Forward} buttons. Most commands | 653 | clicks on the @samp{Back} or @samp{Forward} buttons. Most commands |
| 654 | that use the @samp{*Help*} buffer should invoke this function before | 654 | that use the @samp{*Help*} buffer should invoke this function before |
| 655 | clearing the buffer. The @var{item} argument should have the form | 655 | clearing the buffer. The @var{item} argument should have the form |
| 656 | @code{(@var{funtion} . @var{args})}, where @var{funtion} is a function | 656 | @code{(@var{function} . @var{args})}, where @var{function} is a function |
| 657 | to call, with argument list @var{args}, to regenerate the help buffer. | 657 | to call, with argument list @var{args}, to regenerate the help buffer. |
| 658 | The @var{interactive-p} argument is non-@code{nil} if the calling | 658 | The @var{interactive-p} argument is non-@code{nil} if the calling |
| 659 | command was invoked interactively; in that case, the stack of items | 659 | command was invoked interactively; in that case, the stack of items |
diff --git a/doc/lispref/searching.texi b/doc/lispref/searching.texi index fe7c805c6f7..a601ed0c2c0 100644 --- a/doc/lispref/searching.texi +++ b/doc/lispref/searching.texi | |||
| @@ -1213,7 +1213,7 @@ match data around it, to prevent it from being overwritten. | |||
| 1213 | 1213 | ||
| 1214 | Notice that all functions are allowed to overwrite the match data | 1214 | Notice that all functions are allowed to overwrite the match data |
| 1215 | unless they're explicitly documented not to do so. A consequence is | 1215 | unless they're explicitly documented not to do so. A consequence is |
| 1216 | that functions that are run implictly in the background | 1216 | that functions that are run implicitly in the background |
| 1217 | (@pxref{Timers}, and @ref{Idle Timers}) should likely save and restore | 1217 | (@pxref{Timers}, and @ref{Idle Timers}) should likely save and restore |
| 1218 | the match data explicitly. | 1218 | the match data explicitly. |
| 1219 | 1219 | ||
diff --git a/doc/lispref/spellfile b/doc/lispref/spellfile index e66dcc88f71..5c0a6d0f5ea 100644 --- a/doc/lispref/spellfile +++ b/doc/lispref/spellfile | |||
| @@ -376,7 +376,6 @@ inserting' | |||
| 376 | integerp | 376 | integerp |
| 377 | intermixed | 377 | intermixed |
| 378 | ints | 378 | ints |
| 379 | inturned | ||
| 380 | irreversibly | 379 | irreversibly |
| 381 | jum | 380 | jum |
| 382 | keymapp | 381 | keymapp |
| @@ -530,7 +529,6 @@ pointer' | |||
| 530 | pointm | 529 | pointm |
| 531 | pos | 530 | pos |
| 532 | preallocate | 531 | preallocate |
| 533 | predicale | ||
| 534 | preload | 532 | preload |
| 535 | prepend | 533 | prepend |
| 536 | prepended | 534 | prepended |
| @@ -641,7 +639,7 @@ suspension' | |||
| 641 | symbolp | 639 | symbolp |
| 642 | symlink | 640 | symlink |
| 643 | syms | 641 | syms |
| 644 | syntatic | 642 | syntactic |
| 645 | tabname | 643 | tabname |
| 646 | temacs | 644 | temacs |
| 647 | temporarily' | 645 | temporarily' |
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index 8c99a06909b..bb1b0524689 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi | |||
| @@ -110,6 +110,7 @@ including for the case where @var{object} is a deleted window. | |||
| 110 | @end defun | 110 | @end defun |
| 111 | 111 | ||
| 112 | @cindex selected window | 112 | @cindex selected window |
| 113 | @cindex window selected within a frame | ||
| 113 | In each frame, at any time, exactly one Emacs window is designated | 114 | In each frame, at any time, exactly one Emacs window is designated |
| 114 | as @dfn{selected within the frame}. For the selected frame, that | 115 | as @dfn{selected within the frame}. For the selected frame, that |
| 115 | window is called the @dfn{selected window}---the one in which most | 116 | window is called the @dfn{selected window}---the one in which most |
| @@ -148,10 +149,10 @@ the minibuffer window in the returned list. If @var{minibuffer} is | |||
| 148 | active. If @var{minibuffer} is neither @code{nil} nor @code{t}, the | 149 | active. If @var{minibuffer} is neither @code{nil} nor @code{t}, the |
| 149 | minibuffer window is never included. | 150 | minibuffer window is never included. |
| 150 | 151 | ||
| 151 | The optional argument @var{window}, if non-@code{nil}, should be a | 152 | The optional argument @var{window}, if non-@code{nil}, should be a live |
| 152 | live window on the specified frame; then @var{window} will be the | 153 | window on the specified frame; then @var{window} will be the first |
| 153 | first element in the returned list. If @var{window} is omitted or | 154 | element in the returned list. If @var{window} is omitted or @code{nil}, |
| 154 | @code{nil}, the window selected within the frame is first element. | 155 | the window selected within the frame is the first element. |
| 155 | @end defun | 156 | @end defun |
| 156 | 157 | ||
| 157 | @cindex window tree | 158 | @cindex window tree |
| @@ -634,9 +635,9 @@ function @code{window-resizable} above. | |||
| 634 | 635 | ||
| 635 | The choice of which window edges this function alters depends on the | 636 | The choice of which window edges this function alters depends on the |
| 636 | values of the option @code{window-combination-resize} and the | 637 | values of the option @code{window-combination-resize} and the |
| 637 | combination-limit status of the involved windows; in some cases, it may | 638 | combination limits of the involved windows; in some cases, it may alter |
| 638 | alter both edges. @xref{Splitting Windows}. To resize by moving only | 639 | both edges. @xref{Splitting Windows}. To resize by moving only the |
| 639 | the bottom or right edge of a window, use the function | 640 | bottom or right edge of a window, use the function |
| 640 | @code{adjust-window-trailing-edge}, below. | 641 | @code{adjust-window-trailing-edge}, below. |
| 641 | @end defun | 642 | @end defun |
| 642 | 643 | ||
| @@ -774,22 +775,24 @@ properties from it, including margins and scroll bars. If | |||
| 774 | @var{window} is an internal window, the new window inherits the | 775 | @var{window} is an internal window, the new window inherits the |
| 775 | properties of the window selected within @var{window}'s frame. | 776 | properties of the window selected within @var{window}'s frame. |
| 776 | 777 | ||
| 777 | If the variable @code{ignore-window-parameters} is non-@code{nil} | 778 | The behavior of this function may be altered by the window parameters |
| 778 | (@pxref{Window Parameters}), this function ignores window parameters. | 779 | of @var{window}, so long as the variable |
| 779 | Otherwise, it consults the @code{split-window} parameter of | 780 | @code{ignore-window-parameters} is non-@code{nil}. If the value of |
| 780 | @var{window}; if this is @code{t}, it splits the window disregarding | 781 | the @code{split-window} window parameter is @code{t}, this function |
| 781 | any other window parameters. If the @code{split-window} parameter | 782 | ignores all other window parameters. Otherwise, if the value of the |
| 782 | specifies a function, that function is called with the arguments | 783 | @code{split-window} window parameter is a function, that function is |
| 783 | @var{window}, @var{size}, and @var{side} to split @var{window}, in | 784 | called with the arguments @var{window}, @var{size}, and @var{side}, in |
| 784 | lieu of the usual action of @code{split-window}. | 785 | lieu of the usual action of @code{split-window}. Otherwise, this |
| 786 | function obeys the @code{window-atom} or @code{window-side} window | ||
| 787 | parameter, if any. @xref{Window Parameters}. | ||
| 785 | @end deffn | 788 | @end deffn |
| 786 | 789 | ||
| 787 | As an example, we show a combination of @code{split-window} calls | 790 | As an example, here is a sequence of @code{split-window} calls that |
| 788 | that yields the window configuration discussed in @ref{Windows and | 791 | yields the window configuration discussed in @ref{Windows and Frames}. |
| 789 | Frames}. This example demonstrates splitting a live window as well as | 792 | This example demonstrates splitting a live window as well as splitting |
| 790 | splitting an internal window. We begin with a frame containing a | 793 | an internal window. We begin with a frame containing a single window |
| 791 | single window (a live root window), which we denote by @var{W4}. | 794 | (a live root window), which we denote by @var{W4}. Calling |
| 792 | Calling @code{(split-window W3)} yields this window configuration: | 795 | @code{(split-window W4)} yields this window configuration: |
| 793 | 796 | ||
| 794 | @smallexample | 797 | @smallexample |
| 795 | @group | 798 | @group |
| @@ -841,9 +844,6 @@ A new live window @var{W2} is created, to the left of the internal | |||
| 841 | window @var{W3}. A new internal window @var{W1} is created, becoming | 844 | window @var{W3}. A new internal window @var{W1} is created, becoming |
| 842 | the new root window. | 845 | the new root window. |
| 843 | 846 | ||
| 844 | The following two options can be used to modify the operation of | ||
| 845 | @code{split-window}. | ||
| 846 | |||
| 847 | @defopt window-combination-resize | 847 | @defopt window-combination-resize |
| 848 | If this variable is @code{nil}, @code{split-window} can only split a | 848 | If this variable is @code{nil}, @code{split-window} can only split a |
| 849 | window (denoted by @var{window}) if @var{window}'s screen area is | 849 | window (denoted by @var{window}) if @var{window}'s screen area is |
| @@ -854,18 +854,17 @@ If this variable is non-@code{nil}, @code{split-window} tries to | |||
| 854 | resize all windows that are part of the same combination as | 854 | resize all windows that are part of the same combination as |
| 855 | @var{window}, in order to accommodate the new window. In particular, | 855 | @var{window}, in order to accommodate the new window. In particular, |
| 856 | this may allow @code{split-window} to succeed even if @var{window} is | 856 | this may allow @code{split-window} to succeed even if @var{window} is |
| 857 | a fixed-size window or too small to ordinarily split. | 857 | a fixed-size window or too small to ordinarily split. Furthermore, |
| 858 | 858 | subsequently resizing or deleting @var{window} may resize all other | |
| 859 | Also if this variable is non-@code{nil}, subsequent resizing and | 859 | windows in its combination. |
| 860 | deleting @var{window} will usually affect @emph{all} windows in | ||
| 861 | @var{window}'s combination. | ||
| 862 | 860 | ||
| 863 | The setting of this variable has no effect if | 861 | This variable has no effect if @code{window-combination-limit} is |
| 864 | @code{window-combination-limit} (see below) is non-@code{nil}. | 862 | non-@code{nil} (see below). |
| 865 | @end defopt | 863 | @end defopt |
| 866 | 864 | ||
| 867 | To illustrate the use of @code{window-combination-resize} consider the | 865 | To illustrate the effect of @code{window-combination-resize}, |
| 868 | following window configuration: | 866 | consider the following window configuration: |
| 867 | |||
| 869 | @smallexample | 868 | @smallexample |
| 870 | @group | 869 | @group |
| 871 | ______________________________________ | 870 | ______________________________________ |
| @@ -886,9 +885,10 @@ following window configuration: | |||
| 886 | @end group | 885 | @end group |
| 887 | @end smallexample | 886 | @end smallexample |
| 888 | 887 | ||
| 889 | Splitting window @code{W3} with @code{window-combination-resize} | 888 | @noindent |
| 890 | @code{nil} produces a configuration where the size of @code{W2} remains | 889 | If @code{window-combination-resize} is @code{nil}, splitting window |
| 891 | unchanged: | 890 | @code{W3} leaves the size of @code{W2} unchanged: |
| 891 | |||
| 892 | @smallexample | 892 | @smallexample |
| 893 | @group | 893 | @group |
| 894 | ______________________________________ | 894 | ______________________________________ |
| @@ -909,8 +909,11 @@ unchanged: | |||
| 909 | @end group | 909 | @end group |
| 910 | @end smallexample | 910 | @end smallexample |
| 911 | 911 | ||
| 912 | Splitting @code{W3} with @code{window-combination-resize} non-@code{nil} | 912 | @noindent |
| 913 | instead steals the space for @code{W4} from both @code{W2} and @code{W3}: | 913 | If @code{window-combination-resize} is non-@code{nil}, splitting |
| 914 | @code{W3} instead leaves all three live windows with approximately the | ||
| 915 | same height: | ||
| 916 | |||
| 914 | @smallexample | 917 | @smallexample |
| 915 | @group | 918 | @group |
| 916 | ______________________________________ | 919 | ______________________________________ |
| @@ -932,53 +935,51 @@ instead steals the space for @code{W4} from both @code{W2} and @code{W3}: | |||
| 932 | @end smallexample | 935 | @end smallexample |
| 933 | 936 | ||
| 934 | @defopt window-combination-limit | 937 | @defopt window-combination-limit |
| 935 | If this variable is @code{nil}, @code{split-window} creates a new parent | 938 | If the value of this variable is @code{t}, the @code{split-window} |
| 936 | window if and only if the old window has no parent window or shall be | 939 | function always creates a new internal window. If the value is |
| 937 | split orthogonally to the combination it is part of. If this variable | 940 | @code{nil}, the new live window is allowed to share the existing |
| 938 | is @code{t}, @code{split-window} always creates a new parent window. If | 941 | parent window, if one exists, provided the split occurs in the same |
| 939 | this variable is always @code{t}, a frame's window tree is a binary tree | 942 | direction as the existing window combination (otherwise, a new |
| 940 | so every window but the frame's root window has exactly one sibling. | 943 | internal window is created anyway). The default is @code{nil}. Other |
| 941 | Other values are reserved for future use. | 944 | values are reserved for future use. |
| 942 | 945 | ||
| 943 | The value of this variable is also assigned to the combination-limit | 946 | Thus, if the value is always @code{t}, each window tree is a binary |
| 944 | status of the new parent window. The combination-limit status of any | 947 | tree: each window except the root window has exactly one sibling. |
| 945 | window can be retrieved via the function @code{window-combination-limit} | 948 | |
| 946 | and altered by the function @code{set-window-combination-limit}, see | 949 | Furthermore, @code{split-window} calls |
| 947 | below. | 950 | @code{set-window-combination-limit} on the newly-created internal |
| 951 | window, recording the current value of this variable. This affects | ||
| 952 | how the window tree is rearranged when the child windows are deleted | ||
| 953 | (see below). | ||
| 948 | @end defopt | 954 | @end defopt |
| 949 | 955 | ||
| 950 | @defun window-combination-limit &optional window | 956 | @cindex window combination limit |
| 951 | This function returns the combination-limit status of @var{window}. The | 957 | @defun set-window-combination-limit window limit |
| 952 | argument @var{window} can be any window and defaults to the selected | 958 | This functions sets the @dfn{combination limit} of the window |
| 953 | one. Note, however, that the combination-limit status is currently | 959 | @var{window} to @var{limit}. This value can be retrieved via the |
| 954 | meaningful for internal windows only. | 960 | function @code{window-combination-limit}. See below for its effects; |
| 955 | 961 | note that it is only meaningful for internal windows. The | |
| 956 | @cindex combination-limit status | 962 | @code{split-window} function automatically calls this function, passing |
| 957 | The @dfn{combination-limit status} of a window specifies whether that | 963 | the value of the variable @code{window-combination-limit} as |
| 958 | window may be removed and its child windows recombined with that | 964 | @var{limit}. |
| 959 | window's siblings when such a sibling's child window is deleted. The | 965 | @end defun |
| 960 | combination-limit status is initially assigned by @code{split-window} | 966 | |
| 961 | from the current value of the variable @code{window-combination-limit} | 967 | @defun window-combination-limit window |
| 962 | (see above) and can be reset by the function | 968 | This function returns the combination limit for @var{window}. |
| 963 | @code{set-window-combination-limit} (see below). | 969 | |
| 964 | 970 | The combination limit is meaningful only for an internal window. If | |
| 965 | If the return value is @code{nil}, child windows of @var{window} may be | 971 | it is @code{nil}, then Emacs is allowed to automatically delete |
| 966 | recombined with @var{window}'s siblings when a window gets deleted. A | 972 | @var{window}, in response to a window deletion, in order to group the |
| 967 | return value of @code{nil} means that child windows of @var{window} are | 973 | child windows of @var{window} with its sibling windows to form a new |
| 968 | never (re-)combined with @var{window}'s siblings in such a case. | 974 | window combination. If the combination limit is @code{t}, the child |
| 969 | @end defun | 975 | windows of @var{window} are never automatically re-combined with its |
| 970 | 976 | siblings. | |
| 971 | @defun set-window-combination-limit window &optional status | 977 | @end defun |
| 972 | This functions sets the combination-limit status (see above) of | 978 | |
| 973 | @var{window} to @var{status}. The argument @var{window} can be any | 979 | To illustrate the effect of @code{window-combination-limit}, |
| 974 | window and defaults to the selected one. Note that setting the | 980 | consider the following configuration (throughout this example, we will |
| 975 | combination-limit status is meaningful for internal windows only. The | 981 | assume that @code{window-combination-resize} is @code{nil}): |
| 976 | return value is @var{status}. | 982 | |
| 977 | @end defun | ||
| 978 | |||
| 979 | To illustrate the use of @code{window-combination-limit} consider the | ||
| 980 | following configuration (throughout the following examples we shall | ||
| 981 | assume that @code{window-combination-resize} invariantly is @code{nil}). | ||
| 982 | @smallexample | 983 | @smallexample |
| 983 | @group | 984 | @group |
| 984 | ______________________________________ | 985 | ______________________________________ |
| @@ -999,31 +1000,10 @@ assume that @code{window-combination-resize} invariantly is @code{nil}). | |||
| 999 | @end group | 1000 | @end group |
| 1000 | @end smallexample | 1001 | @end smallexample |
| 1001 | 1002 | ||
| 1002 | Splitting @code{W2} into two windows above each other with | 1003 | @noindent |
| 1003 | @code{window-combination-limit} equal @code{nil} will get you a | 1004 | If @code{window-combination-limit} is @code{nil}, splitting @code{W2} |
| 1004 | configuration like: | 1005 | into two windows, one above the other, yields |
| 1005 | @smallexample | ||
| 1006 | @group | ||
| 1007 | ______________________________________ | ||
| 1008 | | ____________________________________ | | ||
| 1009 | || || | ||
| 1010 | || || | ||
| 1011 | ||_________________W2_________________|| | ||
| 1012 | | ____________________________________ | | ||
| 1013 | || || | ||
| 1014 | || || | ||
| 1015 | ||_________________W4_________________|| | ||
| 1016 | | ____________________________________ | | ||
| 1017 | || || | ||
| 1018 | || || | ||
| 1019 | ||_________________W3_________________|| | ||
| 1020 | |__________________W1__________________| | ||
| 1021 | |||
| 1022 | @end group | ||
| 1023 | @end smallexample | ||
| 1024 | 1006 | ||
| 1025 | If you now enlarge window @code{W4}, Emacs steals the necessary space | ||
| 1026 | from window @code{W3} resulting in a configuration like: | ||
| 1027 | @smallexample | 1007 | @smallexample |
| 1028 | @group | 1008 | @group |
| 1029 | ______________________________________ | 1009 | ______________________________________ |
| @@ -1034,43 +1014,24 @@ from window @code{W3} resulting in a configuration like: | |||
| 1034 | | ____________________________________ | | 1014 | | ____________________________________ | |
| 1035 | || || | 1015 | || || |
| 1036 | || || | 1016 | || || |
| 1037 | || || | ||
| 1038 | ||_________________W4_________________|| | 1017 | ||_________________W4_________________|| |
| 1039 | | ____________________________________ | | 1018 | | ____________________________________ | |
| 1040 | || || | 1019 | || || |
| 1020 | || || | ||
| 1041 | ||_________________W3_________________|| | 1021 | ||_________________W3_________________|| |
| 1042 | |__________________W1__________________| | 1022 | |__________________W1__________________| |
| 1043 | 1023 | ||
| 1044 | @end group | 1024 | @end group |
| 1045 | @end smallexample | 1025 | @end smallexample |
| 1046 | 1026 | ||
| 1047 | Deleting window @code{W4}, will return its space to @code{W2} as | 1027 | @noindent |
| 1048 | follows: | 1028 | The newly-created window, @code{W4}, shares the same internal window |
| 1049 | @smallexample | 1029 | @code{W1}. If @code{W4} is resized, it is allowed to resize the other |
| 1050 | @group | 1030 | live window, @code{W3}. |
| 1051 | ______________________________________ | ||
| 1052 | | ____________________________________ | | ||
| 1053 | || || | ||
| 1054 | || || | ||
| 1055 | || || | ||
| 1056 | || || | ||
| 1057 | || || | ||
| 1058 | || || | ||
| 1059 | || || | ||
| 1060 | ||_________________W2_________________|| | ||
| 1061 | | ____________________________________ | | ||
| 1062 | || || | ||
| 1063 | ||_________________W3_________________|| | ||
| 1064 | |__________________W1__________________| | ||
| 1065 | 1031 | ||
| 1066 | @end group | 1032 | If @code{window-combination-limit} is @code{t}, splitting @code{W2} |
| 1067 | @end smallexample | 1033 | in the initial configuration would instead have produced this: |
| 1068 | 1034 | ||
| 1069 | Hence, with respect to the initial configuration, window @code{W2} has | ||
| 1070 | grown at the expense of window @code{W3}. If, however, in the initial | ||
| 1071 | configuration you had split @code{W2} with | ||
| 1072 | @code{window-combination-limit} bound to @code{t}, a new internal window | ||
| 1073 | @code{W5} would have been created as depicted below. | ||
| 1074 | @smallexample | 1035 | @smallexample |
| 1075 | @group | 1036 | @group |
| 1076 | ______________________________________ | 1037 | ______________________________________ |
| @@ -1091,143 +1052,110 @@ configuration you had split @code{W2} with | |||
| 1091 | @end group | 1052 | @end group |
| 1092 | @end smallexample | 1053 | @end smallexample |
| 1093 | 1054 | ||
| 1094 | Enlarging @code{W4} would now have stolen the necessary space from | 1055 | @noindent |
| 1095 | @code{W2} instead of @code{W3} as | 1056 | A new internal window @code{W5} has been created; its children are |
| 1096 | @smallexample | 1057 | @code{W2} and the new live window @code{W4}. Now, @code{W2} is the |
| 1097 | @group | 1058 | only sibling of @code{W4}, so resizing @code{W4} will resize |
| 1098 | ______________________________________ | 1059 | @code{W2}, leaving @code{W3} unaffected. |
| 1099 | | ____________________________________ | | ||
| 1100 | || __________________________________ || | ||
| 1101 | |||________________W2________________||| | ||
| 1102 | || __________________________________ || | ||
| 1103 | ||| ||| | ||
| 1104 | ||| ||| | ||
| 1105 | |||________________W4________________||| | ||
| 1106 | ||_________________W5_________________|| | ||
| 1107 | | ____________________________________ | | ||
| 1108 | || || | ||
| 1109 | || || | ||
| 1110 | ||_________________W3_________________|| | ||
| 1111 | |__________________W1__________________| | ||
| 1112 | |||
| 1113 | @end group | ||
| 1114 | @end smallexample | ||
| 1115 | 1060 | ||
| 1116 | and the subsequent deletion of @code{W4} would have restored the initial | 1061 | For interactive use, Emacs provides two commands which always split |
| 1117 | configuration. | 1062 | the selected window. These call @code{split-window} internally. |
| 1118 | 1063 | ||
| 1119 | For interactive use, Emacs provides two commands which always split the | 1064 | @deffn Command split-window-right &optional size |
| 1120 | selected window. | 1065 | This function splits the selected window into two side-by-side |
| 1066 | windows, putting the selected window on the left. If @var{size} is | ||
| 1067 | positive, the left window gets @var{size} columns; if @var{size} is | ||
| 1068 | negative, the right window gets @minus{}@var{size} columns. | ||
| 1069 | @end deffn | ||
| 1121 | 1070 | ||
| 1122 | @deffn Command split-window-below &optional size | 1071 | @deffn Command split-window-below &optional size |
| 1123 | This function splits the selected window into two windows, one above the | 1072 | This function splits the selected window into two windows, one above |
| 1124 | other, leaving the upper of the two windows selected, with @var{size} | 1073 | the other, leaving the upper window selected. If @var{size} is |
| 1125 | lines. (If @var{size} is negative, then the lower of the two windows | 1074 | positive, the upper window gets @var{size} lines; if @var{size} is |
| 1126 | gets @minus{}@var{size} lines and the upper window gets the rest, but | 1075 | negative, the lower window gets @minus{}@var{size} lines. |
| 1127 | the upper window is still the one selected.) However, if | ||
| 1128 | @code{split-window-keep-point} (see below) is @code{nil}, then either | ||
| 1129 | window can be selected. | ||
| 1130 | |||
| 1131 | In other respects, this function is similar to @code{split-window}. | ||
| 1132 | In particular, the upper window is the original one and the return value | ||
| 1133 | is the new, lower window. | ||
| 1134 | @end deffn | 1076 | @end deffn |
| 1135 | 1077 | ||
| 1136 | @defopt split-window-keep-point | 1078 | @defopt split-window-keep-point |
| 1137 | If this variable is non-@code{nil} (the default), then | 1079 | If the value of this variable is non-@code{nil} (the default), |
| 1138 | @code{split-window-below} behaves as described above. | 1080 | @code{split-window-below} behaves as described above. |
| 1139 | 1081 | ||
| 1140 | If it is @code{nil}, then @code{split-window-below} adjusts point | 1082 | If it is @code{nil}, @code{split-window-below} adjusts point in each |
| 1141 | in each of the two windows to avoid scrolling. (This is useful on | 1083 | of the two windows to minimize redisplay. (This is useful on slow |
| 1142 | slow terminals.) It selects whichever window contains the screen line | 1084 | terminals.) It selects whichever window contains the screen line that |
| 1143 | that point was previously on. Other functions are not affected by | 1085 | point was previously on. Note that this only affects |
| 1144 | this variable. | 1086 | @code{split-window-below}, not the lower-level @code{split-window} |
| 1087 | function. | ||
| 1145 | @end defopt | 1088 | @end defopt |
| 1146 | 1089 | ||
| 1147 | @deffn Command split-window-right &optional size | ||
| 1148 | This function splits the selected window into two windows | ||
| 1149 | side-by-side, leaving the selected window on the left with @var{size} | ||
| 1150 | columns. If @var{size} is negative, the rightmost window gets | ||
| 1151 | @minus{}@var{size} columns, but the leftmost window still remains | ||
| 1152 | selected. | ||
| 1153 | @end deffn | ||
| 1154 | |||
| 1155 | |||
| 1156 | @node Deleting Windows | 1090 | @node Deleting Windows |
| 1157 | @section Deleting Windows | 1091 | @section Deleting Windows |
| 1158 | @cindex deleting windows | 1092 | @cindex deleting windows |
| 1159 | 1093 | ||
| 1160 | A window remains visible on its frame unless you @dfn{delete} it by | 1094 | @dfn{Deleting} a window removes it from the frame's window tree. If |
| 1161 | calling certain functions that delete windows. A deleted window cannot | 1095 | the window is a live window, it disappears from the screen. If the |
| 1162 | appear on the screen, but continues to exist as a Lisp object until | 1096 | window is an internal window, its child windows are deleted too. |
| 1163 | there are no references to it. There is no way to cancel the deletion | ||
| 1164 | of a window aside from restoring a saved window configuration | ||
| 1165 | (@pxref{Window Configurations}). Restoring a window configuration also | ||
| 1166 | deletes any windows that aren't part of that configuration. Erroneous | ||
| 1167 | information may result from using a deleted window as if it were live. | ||
| 1168 | 1097 | ||
| 1169 | @deffn Command delete-window &optional window | 1098 | Even after a window is deleted, it continues to exist as a Lisp |
| 1170 | This function removes @var{window} from display and returns @code{nil}. | 1099 | object, until there are no more references to it. Window deletion can |
| 1171 | The argument @var{window} can denote any window and defaults to the | 1100 | be reversed, by restoring a saved window configuration (@pxref{Window |
| 1172 | selected one. An error is signaled if @var{window} is the only window | 1101 | Configurations}). |
| 1173 | on its frame. Hence @var{window} must have at least one sibling window | ||
| 1174 | (@pxref{Windows and Frames}) in order to get deleted. If @var{window} | ||
| 1175 | is the selected window on its frame, this function selects the most | ||
| 1176 | recently selected live window on that frame instead. | ||
| 1177 | |||
| 1178 | If the variable @code{ignore-window-parameters} (@pxref{Window | ||
| 1179 | Parameters}) is non-@code{nil}, this function ignores all parameters of | ||
| 1180 | @var{window}. Otherwise, if the @code{delete-window} parameter of | ||
| 1181 | @var{window} is @code{t}, it deletes the window disregarding other | ||
| 1182 | window parameters. If the @code{delete-window} parameter specifies a | ||
| 1183 | function, that function is called with @var{window} as its sole | ||
| 1184 | argument. | ||
| 1185 | 1102 | ||
| 1186 | If @code{window-combination-resize} (@pxref{Splitting Windows}) is | 1103 | @deffn Command delete-window &optional window |
| 1187 | @code{nil}, the space @var{window} took up is given to its left sibling | 1104 | This function removes @var{window} from display and returns |
| 1188 | if such a window exists and to its right sibling otherwise. If | 1105 | @code{nil}. If @var{window} is omitted or @code{nil}, it defaults to |
| 1189 | @code{window-combination-resize} is non-@code{nil}, the space of | 1106 | the selected window. If deleting the window would leave no more |
| 1190 | @var{window} is proportionally distributed among the remaining windows | 1107 | windows in the window tree (e.g. if it is the only live window in the |
| 1191 | in the same combination. | 1108 | frame), an error is signaled. |
| 1109 | |||
| 1110 | By default, the space taken up by @var{window} is given to one of its | ||
| 1111 | adjacent sibling windows, if any. However, if the variable | ||
| 1112 | @code{window-combination-resize} is non-@code{nil}, the space is | ||
| 1113 | proportionally distributed among any remaining windows in the window | ||
| 1114 | combination. @xref{Splitting Windows}. | ||
| 1115 | |||
| 1116 | The behavior of this function may be altered by the window parameters | ||
| 1117 | of @var{window}, so long as the variable | ||
| 1118 | @code{ignore-window-parameters} is non-@code{nil}. If the value of | ||
| 1119 | the @code{delete-window} window parameter is @code{t}, this function | ||
| 1120 | ignores all other window parameters. Otherwise, if the value of the | ||
| 1121 | @code{delete-window} window parameter is a function, that function is | ||
| 1122 | called with the argument @var{window}, in lieu of the usual action of | ||
| 1123 | @code{delete-window}. Otherwise, this function obeys the | ||
| 1124 | @code{window-atom} or @code{window-side} window parameter, if any. | ||
| 1125 | @xref{Window Parameters}. | ||
| 1192 | @end deffn | 1126 | @end deffn |
| 1193 | 1127 | ||
| 1194 | @deffn Command delete-other-windows &optional window | 1128 | @deffn Command delete-other-windows &optional window |
| 1195 | This function makes @var{window} fill its frame and returns @code{nil}. | 1129 | This function makes @var{window} fill its frame, by deleting other |
| 1196 | The argument @var{window} can denote an arbitrary window and defaults to | 1130 | windows as necessary. If @var{window} is omitted or @code{nil}, it |
| 1197 | the selected one. Upon exit, @var{window} will be the selected window | 1131 | defaults to the selected window. The return value is @code{nil}. |
| 1198 | on its frame. | 1132 | |
| 1199 | 1133 | The behavior of this function may be altered by the window parameters | |
| 1200 | If the variable @code{ignore-window-parameters} (@pxref{Window | 1134 | of @var{window}, so long as the variable |
| 1201 | Parameters}) is non-@code{nil}, this function ignores all parameters of | 1135 | @code{ignore-window-parameters} is non-@code{nil}. If the value of |
| 1202 | @var{window}. Otherwise, if the @code{delete-other-windows} parameter | 1136 | the @code{delete-other-windows} window parameter is @code{t}, this |
| 1203 | of @var{window} equals @code{t}, it deletes all other windows | 1137 | function ignores all other window parameters. Otherwise, if the value |
| 1204 | disregarding any remaining window parameters. If the | 1138 | of the @code{delete-other-windows} window parameter is a function, |
| 1205 | @code{delete-other-windows} parameter of @var{window} specifies a | 1139 | that function is called with the argument @var{window}, in lieu of the |
| 1206 | function, it calls that function with @var{window} as its sole argument. | 1140 | usual action of @code{delete-other-windows}. Otherwise, this function |
| 1141 | obeys the @code{window-atom} or @code{window-side} window parameter, | ||
| 1142 | if any. @xref{Window Parameters}. | ||
| 1207 | @end deffn | 1143 | @end deffn |
| 1208 | 1144 | ||
| 1209 | @deffn Command delete-windows-on &optional buffer-or-name frame | 1145 | @deffn Command delete-windows-on &optional buffer-or-name frame |
| 1210 | This function deletes all windows showing @var{buffer-or-name}. If | 1146 | This function deletes all windows showing @var{buffer-or-name}, by |
| 1211 | there are no windows showing @var{buffer-or-name}, it does nothing. | 1147 | calling @code{delete-window} on those windows. @var{buffer-or-name} |
| 1212 | The optional argument @var{buffer-or-name} may be a buffer or the name | 1148 | should be a buffer, or the name of a buffer; if omitted or @code{nil}, |
| 1213 | of an existing buffer and defaults to the current buffer. Invoking | 1149 | it defaults to the current buffer. If there are no windows showing |
| 1214 | this command on a minibuffer signals an error. | 1150 | the specified buffer, this function does nothing. If the specified |
| 1215 | 1151 | buffer is a minibuffer, an error is signaled. | |
| 1216 | The function @code{delete-windows-on} operates by calling | 1152 | |
| 1217 | @code{delete-window} for each window showing @var{buffer-or-name}. If a | 1153 | If there is a dedicated window showing the buffer, and that window is |
| 1218 | frame has several windows showing different buffers, then those showing | 1154 | the only one on its frame, this function also deletes that frame if it |
| 1219 | @var{buffer-or-name} are removed, and the other windows expand to fill | 1155 | is not the only frame on the terminal. |
| 1220 | the space. | 1156 | |
| 1221 | 1157 | The optional argument @var{frame} specifies which frames to operate | |
| 1222 | If all windows in some frame are showing @var{buffer-or-name} (including | 1158 | on: |
| 1223 | the case where there is only one window), then that frame is deleted | ||
| 1224 | provided there are other frames left. | ||
| 1225 | |||
| 1226 | The optional argument @var{frame} specifies which frames to operate on. | ||
| 1227 | This function does not use it in quite the same way as the other | ||
| 1228 | functions which scan all live windows (@pxref{Cyclic Window Ordering}); | ||
| 1229 | specifically, the values @code{t} and @code{nil} have the opposite of | ||
| 1230 | their meanings in the other functions. Here are the full details: | ||
| 1231 | 1159 | ||
| 1232 | @itemize @bullet | 1160 | @itemize @bullet |
| 1233 | @item @code{nil} | 1161 | @item @code{nil} |
| @@ -1241,34 +1169,37 @@ means operate on all visible or iconified frames. | |||
| 1241 | @item A frame | 1169 | @item A frame |
| 1242 | means operate on that frame. | 1170 | means operate on that frame. |
| 1243 | @end itemize | 1171 | @end itemize |
| 1244 | @end deffn | ||
| 1245 | 1172 | ||
| 1173 | Note that this argument does not have the same meaning as in other | ||
| 1174 | functions which scan all live windows (@pxref{Cyclic Window | ||
| 1175 | Ordering}). Specifically, the values @code{t} and @code{nil} have the | ||
| 1176 | opposite of their meanings in those other functions. | ||
| 1177 | @end deffn | ||
| 1246 | 1178 | ||
| 1247 | @node Selecting Windows | 1179 | @node Selecting Windows |
| 1248 | @section Selecting Windows | 1180 | @section Selecting Windows |
| 1249 | @cindex selecting a window | 1181 | @cindex selecting a window |
| 1250 | 1182 | ||
| 1251 | @defun select-window window &optional norecord | 1183 | @defun select-window window &optional norecord |
| 1252 | This function makes @var{window} the selected window, see @ref{Basic | 1184 | This function makes @var{window} the selected window, as well as the |
| 1253 | Windows}. Unless @var{window} already is the selected window, this also | 1185 | window selected within its frame (@pxref{Basic Windows}). |
| 1254 | makes @var{window}'s buffer (@pxref{Buffers and Windows}) the current | 1186 | @var{window} must be a live window. Unless @var{window} already is the |
| 1255 | buffer. Moreover, the cursor for selected windows will be displayed in | 1187 | selected window, its buffer becomes the current buffer (@pxref{Buffers |
| 1256 | @var{window} after the next redisplay. This function returns | 1188 | and Windows}). The return value is @var{window}. |
| 1257 | @var{window}. | ||
| 1258 | 1189 | ||
| 1259 | Normally, @var{window}'s selected buffer is moved to the front of the | 1190 | By default, this function also moves @var{window}'s selected buffer to |
| 1260 | buffer list (@pxref{The Buffer List}) and @var{window} becomes the most | 1191 | the front of the buffer list (@pxref{The Buffer List}), and makes |
| 1261 | recently selected window. But if the optional argument @var{norecord} | 1192 | @var{window} the most recently selected window. However, if the |
| 1262 | is non-@code{nil}, the buffer list remains unchanged and @var{window} | 1193 | optional argument @var{norecord} is non-@code{nil}, these additional |
| 1263 | does not become the most recently selected one. | 1194 | actions are omitted. |
| 1264 | @end defun | 1195 | @end defun |
| 1265 | 1196 | ||
| 1266 | @cindex most recently selected windows | 1197 | @cindex most recently selected windows |
| 1267 | The sequence of calls to @code{select-window} with a non-@code{nil} | 1198 | The sequence of calls to @code{select-window} with a non-@code{nil} |
| 1268 | @var{norecord} argument determines an ordering of windows by their | 1199 | @var{norecord} argument determines an ordering of windows by their |
| 1269 | selection time. The function @code{get-lru-window} can be used to | 1200 | selection time. The function @code{get-lru-window} can be used to |
| 1270 | retrieve the least recently selected live window in this ordering, see | 1201 | retrieve the least recently selected live window (@pxref{Cyclic Window |
| 1271 | @ref{Cyclic Window Ordering}. | 1202 | Ordering}). |
| 1272 | 1203 | ||
| 1273 | @defmac save-selected-window forms@dots{} | 1204 | @defmac save-selected-window forms@dots{} |
| 1274 | This macro records the selected frame, as well as the selected window | 1205 | This macro records the selected frame, as well as the selected window |
| @@ -1300,33 +1231,26 @@ The order of recently selected windows and the buffer list are not | |||
| 1300 | changed by this macro. | 1231 | changed by this macro. |
| 1301 | @end defmac | 1232 | @end defmac |
| 1302 | 1233 | ||
| 1303 | @cindex frame selected window | 1234 | @defun frame-selected-window &optional frame |
| 1304 | @cindex window selected within frame | 1235 | This function returns the window on @var{frame} that is selected |
| 1305 | Earlier (@pxref{Basic Windows}) we mentioned that at any time, exactly | 1236 | within that frame. @var{frame} should be a live frame; if omitted or |
| 1306 | one window on any frame is selected within the frame. The significance | 1237 | @code{nil}, it defaults to the selected frame. |
| 1307 | of this designation is that selecting the frame also selects this | ||
| 1308 | window. Conversely, selecting a window for Emacs with | ||
| 1309 | @code{select-window} also makes that window selected within its frame. | ||
| 1310 | |||
| 1311 | @defun frame-selected-window &optional frame | ||
| 1312 | This function returns the window on @var{frame} that is selected within | ||
| 1313 | @var{frame}. The optional argument @var{frame} must denote a live frame | ||
| 1314 | and defaults to the selected one. | ||
| 1315 | @end defun | 1238 | @end defun |
| 1316 | 1239 | ||
| 1317 | @defun set-frame-selected-window frame window &optional norecord | 1240 | @defun set-frame-selected-window frame window &optional norecord |
| 1318 | This function sets the selected window of frame @var{frame} to | 1241 | This function makes @code{window} the window selected within the frame |
| 1319 | @var{window}. The argument @var{frame} must denote a live frame and | 1242 | @var{frame}. @var{frame} should be a live frame; if omitted or |
| 1320 | defaults to the selected one. If @var{frame} is the selected frame, | 1243 | @code{nil}, it defaults to the selected frame. @var{window} should be |
| 1321 | this also makes @var{window} the selected window. The argument | 1244 | a live window; if omitted or @code{nil}, it defaults to the selected |
| 1322 | @var{window} must denote a live window. This function returns | 1245 | window. |
| 1323 | @var{window}. | ||
| 1324 | 1246 | ||
| 1325 | Optional argument @var{norecord} non-@code{nil} means to neither change | 1247 | If @var{frame} is the selected frame, this makes @var{window} the |
| 1326 | the list of most recently selected windows (@pxref{Selecting Windows}) | 1248 | selected window. |
| 1327 | nor the buffer list (@pxref{The Buffer List}). | ||
| 1328 | @end defun | ||
| 1329 | 1249 | ||
| 1250 | If the optional argument @var{norecord} is non-@code{nil}, this | ||
| 1251 | function does not alter the list of most recently selected windows, | ||
| 1252 | nor the buffer list. | ||
| 1253 | @end defun | ||
| 1330 | 1254 | ||
| 1331 | @node Cyclic Window Ordering | 1255 | @node Cyclic Window Ordering |
| 1332 | @section Cyclic Ordering of Windows | 1256 | @section Cyclic Ordering of Windows |
| @@ -1334,28 +1258,22 @@ nor the buffer list (@pxref{The Buffer List}). | |||
| 1334 | @cindex ordering of windows, cyclic | 1258 | @cindex ordering of windows, cyclic |
| 1335 | @cindex window ordering, cyclic | 1259 | @cindex window ordering, cyclic |
| 1336 | 1260 | ||
| 1337 | When you use the command @kbd{C-x o} (@code{other-window}) to select | 1261 | When you use the command @kbd{C-x o} (@code{other-window}) to select |
| 1338 | some other window, it moves through live windows in a specific order. | 1262 | some other window, it moves through live windows in a specific order. |
| 1339 | For any given configuration of windows, this order never varies. It is | 1263 | For any given configuration of windows, this order never varies. It |
| 1340 | called the @dfn{cyclic ordering of windows}. | 1264 | is called the @dfn{cyclic ordering of windows}. |
| 1341 | |||
| 1342 | For a particular frame, this ordering is determined by the window | ||
| 1343 | tree of that frame, see @ref{Windows and Frames}. More precisely, the | ||
| 1344 | ordering is obtained by a depth-first traversal of the frame's window | ||
| 1345 | tree supplemented, if requested, by the frame's minibuffer window. | ||
| 1346 | 1265 | ||
| 1347 | If there's just one live frame, the cyclic ordering is the ordering | 1266 | The ordering is determined by a depth-first traversal of the frame's |
| 1348 | for that frame. Otherwise, the cyclic ordering is obtained by appending | 1267 | window tree, retrieving the live windows which are the leaf nodes of |
| 1349 | the orderings for individual frames in order of the list of all live | 1268 | the tree (@pxref{Windows and Frames}). If the minibuffer is active, |
| 1350 | frames, @ref{Finding All Frames}. In any case, the ordering is made | 1269 | the minibuffer window is included too. The ordering is cyclic, so the |
| 1351 | ``cyclic'' by having the last window precede the first window in the | 1270 | last window in the sequence is followed by the first one. |
| 1352 | ordering. | ||
| 1353 | 1271 | ||
| 1354 | @defun next-window &optional window minibuf all-frames | 1272 | @defun next-window &optional window minibuf all-frames |
| 1355 | @cindex minibuffer window, and @code{next-window} | 1273 | @cindex minibuffer window, and @code{next-window} |
| 1356 | This function returns the window following @var{window} in the cyclic | 1274 | This function returns a live window, the one following @var{window} in |
| 1357 | ordering of windows. The argument @var{window} must specify a live | 1275 | the cyclic ordering of windows. @var{window} should be a live window; |
| 1358 | window and defaults to the selected one. | 1276 | if omitted or @code{nil}, it defaults to the selected window. |
| 1359 | 1277 | ||
| 1360 | The optional argument @var{minibuf} specifies whether minibuffer windows | 1278 | The optional argument @var{minibuf} specifies whether minibuffer windows |
| 1361 | shall be included in the cyclic ordering. Normally, when @var{minibuf} | 1279 | shall be included in the cyclic ordering. Normally, when @var{minibuf} |
| @@ -1369,139 +1287,100 @@ minibuffer windows. If @var{minibuf} is neither @code{t} nor | |||
| 1369 | @code{nil}, minibuffer windows are not included even if they are active. | 1287 | @code{nil}, minibuffer windows are not included even if they are active. |
| 1370 | 1288 | ||
| 1371 | The optional argument @var{all-frames} specifies which frames to | 1289 | The optional argument @var{all-frames} specifies which frames to |
| 1372 | consider. Here are the possible values and their meanings: | 1290 | consider: |
| 1373 | 1291 | ||
| 1374 | @itemize @bullet | 1292 | @itemize @bullet |
| 1375 | @item @code{nil} | 1293 | @item @code{nil} |
| 1376 | means consider all windows on @var{window}'s frame, plus the minibuffer | 1294 | means to consider windows on @var{window}'s frame. If the minibuffer |
| 1377 | window used by that frame even if it lies in some other frame. If the | 1295 | window is considered (as specified by the @var{minibuf} argument), |
| 1378 | minibuffer counts (as determined by @var{minibuf}), then all windows on | 1296 | then frames that share the minibuffer window are considered too. |
| 1379 | all frames that share that minibuffer count too. | ||
| 1380 | 1297 | ||
| 1381 | @item @code{t} | 1298 | @item @code{t} |
| 1382 | means consider all windows on all existing frames. | 1299 | means to consider windows on all existing frames. |
| 1383 | 1300 | ||
| 1384 | @item @code{visible} | 1301 | @item @code{visible} |
| 1385 | means consider all windows on all visible frames. (To get useful | 1302 | means to consider windows on all visible frames. |
| 1386 | results, ensure that @var{window} is on a visible frame.) | ||
| 1387 | 1303 | ||
| 1388 | @item 0 | 1304 | @item 0 |
| 1389 | means consider all windows on all visible or iconified frames. | 1305 | means to consider windows on all visible or iconified frames. |
| 1390 | 1306 | ||
| 1391 | @item A frame | 1307 | @item A frame |
| 1392 | means consider all windows on that frame. | 1308 | means to consider windows on that specific frame. |
| 1393 | 1309 | ||
| 1394 | @item Anything else | 1310 | @item Anything else |
| 1395 | means consider the windows on @var{window}'s frame, and no others. | 1311 | means to consider windows on @var{window}'s frame, and no others. |
| 1396 | @end itemize | 1312 | @end itemize |
| 1397 | 1313 | ||
| 1398 | This example assumes there are two windows, both displaying the | 1314 | If more than one frame is considered, the cyclic ordering is obtained |
| 1399 | buffer @samp{windows.texi}: | 1315 | by appending the orderings for those frames, in the same order as the |
| 1400 | 1316 | list of all live frames (@pxref{Finding All Frames}). | |
| 1401 | @example | ||
| 1402 | @group | ||
| 1403 | (selected-window) | ||
| 1404 | @result{} #<window 56 on windows.texi> | ||
| 1405 | @end group | ||
| 1406 | @group | ||
| 1407 | (next-window (selected-window)) | ||
| 1408 | @result{} #<window 52 on windows.texi> | ||
| 1409 | @end group | ||
| 1410 | @group | ||
| 1411 | (next-window (next-window (selected-window))) | ||
| 1412 | @result{} #<window 56 on windows.texi> | ||
| 1413 | @end group | ||
| 1414 | @end example | ||
| 1415 | @end defun | 1317 | @end defun |
| 1416 | 1318 | ||
| 1417 | @defun previous-window &optional window minibuf all-frames | 1319 | @defun previous-window &optional window minibuf all-frames |
| 1418 | This function returns the window preceding @var{window} in the cyclic | 1320 | This function returns a live window, the one preceding @var{window} in |
| 1419 | ordering of windows. The other arguments specify which windows to | 1321 | the cyclic ordering of windows. The other arguments are handled like |
| 1420 | consider as in @code{next-window}. | 1322 | in @code{next-window}. |
| 1421 | @end defun | 1323 | @end defun |
| 1422 | 1324 | ||
| 1423 | @deffn Command other-window count &optional all-frames | 1325 | @deffn Command other-window count &optional all-frames |
| 1424 | This function selects another window in the cyclic ordering of windows. | 1326 | This function selects a live window, one @var{count} places from the |
| 1425 | @var{count} specifies the number of windows to skip in the ordering, | 1327 | selected window in the cyclic ordering of windows. If @var{count} is |
| 1426 | starting with the selected window, before making the selection. If | 1328 | a positive number, it skips @var{count} windows forwards; if |
| 1427 | @var{count} is a positive number, it skips @var{count} windows forwards. | 1329 | @var{count} is negative, it skips @minus{}@var{count} windows |
| 1428 | @var{count} negative means skip @minus{}@var{count} windows backwards. | 1330 | backwards; if @var{count} is zero, that simply re-selects the selected |
| 1429 | If @var{count} is zero, it does not skip any window, thus re-selecting | 1331 | window. When called interactively, @var{count} is the numeric prefix |
| 1430 | the selected window. In an interactive call, @var{count} is the numeric | 1332 | argument. |
| 1431 | prefix argument. | ||
| 1432 | 1333 | ||
| 1433 | The optional argument @var{all-frames} has the same meaning as in | 1334 | The optional argument @var{all-frames} has the same meaning as in |
| 1434 | @code{next-window}, but the @var{minibuf} argument of @code{next-window} | 1335 | @code{next-window}, like a @code{nil} @var{minibuf} argument to |
| 1435 | is always effectively @code{nil}. This function returns @code{nil}. | 1336 | @code{next-window}. |
| 1436 | 1337 | ||
| 1437 | This function does not select a window that has a non-@code{nil} | 1338 | This function does not select a window that has a non-@code{nil} |
| 1438 | @code{no-other-window} window parameter (@pxref{Window Parameters}). | 1339 | @code{no-other-window} window parameter (@pxref{Window Parameters}). |
| 1439 | @end deffn | 1340 | @end deffn |
| 1440 | 1341 | ||
| 1441 | The following function returns a copy of the list of windows in the | 1342 | @defun walk-windows fun &optional minibuf all-frames |
| 1442 | cyclic ordering. | 1343 | This function calls the function @var{fun} once for each live window, |
| 1344 | with the window as the argument. | ||
| 1443 | 1345 | ||
| 1444 | @defun window-list-1 &optional window &optional minibuf &optional all_frames | 1346 | It follows the cyclic ordering of windows. The optional arguments |
| 1445 | This function returns a list of live windows. The optional arguments | 1347 | @var{minibuf} and @var{all-frames} specify the set of windows |
| 1446 | @var{minibuf} and @var{all-frames} specify the set of windows to include | 1348 | included; these have the same arguments as in @code{next-window}. If |
| 1447 | in the list. See the description of @code{next-window} for details. | 1349 | @var{all-frames} specifies a frame, the first window walked is the |
| 1350 | first window on that frame (the one returned by | ||
| 1351 | @code{frame-first-window}), not necessarily the selected window. | ||
| 1448 | 1352 | ||
| 1449 | The optional argument @var{window} specifies the first window to list | 1353 | If @var{fun} changes the window configuration by splitting or deleting |
| 1450 | and defaults to the selected window. If @var{window} is not on the list | 1354 | windows, that does not alter the set of windows walked, which is |
| 1451 | of windows returned, some other window will be listed first but no error | 1355 | determined prior to calling @var{fun} for the first time. |
| 1452 | is signaled. | ||
| 1453 | @end defun | 1356 | @end defun |
| 1454 | 1357 | ||
| 1455 | The functions described below use @code{window-list-1} for generating a | ||
| 1456 | copy of the list of all relevant windows. Hence, any change of the | ||
| 1457 | window configuration that occurs while one of these functions is | ||
| 1458 | executed is @emph{not} reflected in the list of windows investigated. | ||
| 1459 | |||
| 1460 | @defun walk-windows proc &optional minibuf all-frames | ||
| 1461 | This function cycles through live windows. It calls the function | ||
| 1462 | @var{proc} once for each window, with the window as its sole argument. | ||
| 1463 | |||
| 1464 | The optional arguments @var{minibuf} and @var{all-frames} specify the | ||
| 1465 | set of windows to include in the walk, see @code{next-window} above. If | ||
| 1466 | @var{all-frames} specifies a frame, the first window walked is the first | ||
| 1467 | window on that frame as returned by @code{frame-first-window} and not | ||
| 1468 | necessarily the selected window. | ||
| 1469 | |||
| 1470 | If @var{proc} changes the window configuration by splitting or deleting | ||
| 1471 | windows, that change is not reflected in the set of windows walked. | ||
| 1472 | That set is determined entirely by the set of live windows at the time | ||
| 1473 | this function was invoked. | ||
| 1474 | @end defun | ||
| 1475 | |||
| 1476 | The following function allows to determine whether a specific window is | ||
| 1477 | the only live window. | ||
| 1478 | |||
| 1479 | @defun one-window-p &optional no-mini all-frames | 1358 | @defun one-window-p &optional no-mini all-frames |
| 1480 | This function returns non-@code{nil} if the selected window is the only | 1359 | This function returns @code{t} if the selected window is the only live |
| 1481 | window. | 1360 | window, and @code{nil} otherwise. |
| 1482 | 1361 | ||
| 1483 | The optional argument @var{no-mini}, if non-@code{nil}, means don't | 1362 | If the minibuffer window is active, it is normally considered (so that |
| 1484 | count the minibuffer even if it is active; otherwise, the minibuffer | 1363 | this function returns @code{nil}). However, if the optional argument |
| 1485 | window is counted when it is active. The optional argument | 1364 | @var{no-mini} is non-@code{nil}, the minibuffer window is ignored even |
| 1486 | @var{all-frames} has the same meaning as for @code{next-window}, see | 1365 | if active. The optional argument @var{all-frames} has the same |
| 1487 | above. | 1366 | meaning as for @code{next-window}. |
| 1488 | @end defun | 1367 | @end defun |
| 1489 | 1368 | ||
| 1490 | @cindex finding windows | 1369 | @cindex finding windows |
| 1491 | The following functions choose (but do not select) one of the windows | 1370 | The following functions return a window which satisfies some |
| 1492 | on the screen, offering various criteria for the choice. | 1371 | criterion, without selecting it: |
| 1493 | 1372 | ||
| 1494 | @cindex least recently used window | 1373 | @cindex least recently used window |
| 1495 | @defun get-lru-window &optional all-frames dedicated | 1374 | @defun get-lru-window &optional all-frames dedicated |
| 1496 | This function returns the window least recently ``used'' (that is, | 1375 | This function returns a live window which is heuristically the ``least |
| 1497 | selected). If any full-width windows are present, it only considers | 1376 | recently used'' window. The optional argument @var{all-frames} has |
| 1498 | these. The optional argument @var{all-frames} has the same meaning as | 1377 | the same meaning as in @code{next-window}. |
| 1499 | in @code{next-window}. | ||
| 1500 | 1378 | ||
| 1501 | The selected window is returned if it is the only candidate. A | 1379 | If any full-width windows are present, only those windows are |
| 1502 | minibuffer window is never a candidate. A dedicated window | 1380 | considered. The selected window is never returned, unless it is the |
| 1503 | (@pxref{Dedicated Windows}) is never a candidate unless the optional | 1381 | only candidate. A minibuffer window is never a candidate. A |
| 1504 | argument @var{dedicated} is non-@code{nil}. | 1382 | dedicated window (@pxref{Dedicated Windows}) is never a candidate |
| 1383 | unless the optional argument @var{dedicated} is non-@code{nil}. | ||
| 1505 | @end defun | 1384 | @end defun |
| 1506 | 1385 | ||
| 1507 | @cindex largest window | 1386 | @cindex largest window |
| @@ -1515,22 +1394,23 @@ If there are two candidate windows of the same size, this function | |||
| 1515 | prefers the one that comes first in the cyclic ordering of windows, | 1394 | prefers the one that comes first in the cyclic ordering of windows, |
| 1516 | starting from the selected window. | 1395 | starting from the selected window. |
| 1517 | 1396 | ||
| 1518 | The optional argument @var{all-frames} specifies which set of windows to | 1397 | The optional argument @var{all-frames} specifies the windows to |
| 1519 | consider as with @code{next-window}, see above. | 1398 | search, and has the same meaning as in @code{next-window}. |
| 1520 | @end defun | 1399 | @end defun |
| 1521 | 1400 | ||
| 1522 | @cindex window that satisfies a predicate | 1401 | @cindex window that satisfies a predicate |
| 1523 | @cindex conditional selection of windows | 1402 | @cindex conditional selection of windows |
| 1524 | @defun get-window-with-predicate predicate &optional minibuf all-frames default | 1403 | @defun get-window-with-predicate predicate &optional minibuf all-frames default |
| 1525 | This function returns a window satisfying @var{predicate}. It cycles | 1404 | This function calls the function @var{predicate} for each of the |
| 1526 | through all visible windows calling @var{predicate} on each one of them | 1405 | windows in the cyclic order of windows in turn, passing it the window |
| 1527 | with that window as its argument. The function returns the first window | 1406 | as an argument. If the predicate returns non-@code{nil} for any |
| 1528 | for which @var{predicate} returns a non-@code{nil} value; if that never | 1407 | window, this function stops and returns that window. If no such |
| 1529 | happens, it returns @var{default} (which defaults to @code{nil}). | 1408 | window is found, the return value is @var{default} (which defaults to |
| 1409 | @code{nil}). | ||
| 1530 | 1410 | ||
| 1531 | The optional arguments @var{minibuf} and @var{all-frames} specify the | 1411 | The optional arguments @var{minibuf} and @var{all-frames} specify the |
| 1532 | set of windows to investigate. See the description of | 1412 | windows to search, and have the same meanings as in |
| 1533 | @code{next-window} for details. | 1413 | @code{next-window}. |
| 1534 | @end defun | 1414 | @end defun |
| 1535 | 1415 | ||
| 1536 | @node Buffers and Windows | 1416 | @node Buffers and Windows |
| @@ -1539,47 +1419,41 @@ set of windows to investigate. See the description of | |||
| 1539 | @cindex windows, controlling precisely | 1419 | @cindex windows, controlling precisely |
| 1540 | @cindex buffers, controlled in windows | 1420 | @cindex buffers, controlled in windows |
| 1541 | 1421 | ||
| 1542 | To find out which buffer is displayed in a given window the following | 1422 | This section describes low-level functions for examining and setting |
| 1543 | function is used. | 1423 | the contents of windows. @xref{Switching Buffers}, for higher-level |
| 1424 | functions for displaying a specific buffer in a window. | ||
| 1544 | 1425 | ||
| 1545 | @defun window-buffer &optional window | 1426 | @defun window-buffer &optional window |
| 1546 | This function returns the buffer that @var{window} is displaying. The | 1427 | This function returns the buffer that @var{window} is displaying. If |
| 1547 | argument @var{window} can be any window and defaults to the selected | 1428 | @var{window} is omitted or @code{nil} it defaults to the selected |
| 1548 | one. If @var{window} is an internal window, this function returns | 1429 | window. If @var{window} is an internal window, this function returns |
| 1549 | @code{nil}. | 1430 | @code{nil}. |
| 1550 | @end defun | 1431 | @end defun |
| 1551 | 1432 | ||
| 1552 | The basic, low-level function to associate a window with a buffer is | ||
| 1553 | @code{set-window-buffer}. Higher-level functions like | ||
| 1554 | @code{switch-to-buffer} and @code{display-buffer} try to obey a number | ||
| 1555 | of user customizations regulating which windows are supposed to | ||
| 1556 | display which buffers. @xref{Switching Buffers}. When writing an | ||
| 1557 | application, you should avoid using @code{set-window-buffer} unless | ||
| 1558 | you are sure you need it. | ||
| 1559 | |||
| 1560 | @defun set-window-buffer window buffer-or-name &optional keep-margins | 1433 | @defun set-window-buffer window buffer-or-name &optional keep-margins |
| 1561 | This function makes @var{window} display @var{buffer-or-name} and | 1434 | This function makes @var{window} display @var{buffer-or-name}. |
| 1562 | returns @code{nil}. The argument @var{window} has to denote a live | 1435 | @var{window} should be a live window; if @code{nil}, it defaults to |
| 1563 | window and defaults to the selected one. The argument | 1436 | the selected window. @var{buffer-or-name} should be a buffer, or the |
| 1564 | @var{buffer-or-name} must specify a buffer or the name of an existing | 1437 | name of an existing buffer. This function does not change which |
| 1565 | buffer. An error is signaled when @var{window} is @dfn{strongly} | 1438 | window is selected, nor does it directly change which buffer is |
| 1566 | dedicated to its buffer (@pxref{Dedicated Windows}) and does not already | 1439 | current (@pxref{Current Buffer}). Its return value is @code{nil}. |
| 1567 | display @var{buffer-or-name}. | ||
| 1568 | |||
| 1569 | Normally, displaying @var{buffer-or-name} in @var{window} resets the | ||
| 1570 | window's position, display margins, fringe widths, and scroll bar | ||
| 1571 | settings based on the local variables of the specified buffer. However, | ||
| 1572 | if the optional argument @var{keep-margins} is non-@code{nil}, display | ||
| 1573 | margins and fringe widths of @var{window} remain unchanged. | ||
| 1574 | @xref{Fringes}. | ||
| 1575 | |||
| 1576 | This function is the fundamental primitive for changing which buffer is | ||
| 1577 | displayed in a window, and all ways of doing that call this function. | ||
| 1578 | Neither the selected window nor the current buffer are changed by this | ||
| 1579 | function. | ||
| 1580 | 1440 | ||
| 1581 | This function runs @code{window-scroll-functions} before running | 1441 | If @var{window} is @dfn{strongly dedicated} to a buffer and |
| 1582 | @code{window-configuration-change-hook}, see @ref{Window Hooks}. | 1442 | @var{buffer-or-name} does not specify that buffer, this function |
| 1443 | signals an error. @xref{Dedicated Windows}. | ||
| 1444 | |||
| 1445 | By default, this function resets @var{window}'s position, display | ||
| 1446 | margins, fringe widths, and scroll bar settings, based on the local | ||
| 1447 | variables in the specified buffer. However, if the optional argument | ||
| 1448 | @var{keep-margins} is non-@code{nil}, it leaves the display margins | ||
| 1449 | and fringe widths unchanged. | ||
| 1450 | |||
| 1451 | When writing an application, you should normally use the higher-level | ||
| 1452 | functions described in @ref{Switching Buffers}, instead of calling | ||
| 1453 | @code{set-window-buffer} directly. | ||
| 1454 | |||
| 1455 | This function runs @code{window-scroll-functions}, followed by | ||
| 1456 | @code{window-configuration-change-hook}. @xref{Window Hooks}. | ||
| 1583 | @end defun | 1457 | @end defun |
| 1584 | 1458 | ||
| 1585 | @defvar buffer-display-count | 1459 | @defvar buffer-display-count |
| @@ -1589,28 +1463,26 @@ displayed in a window. It is incremented each time | |||
| 1589 | @end defvar | 1463 | @end defvar |
| 1590 | 1464 | ||
| 1591 | @defvar buffer-display-time | 1465 | @defvar buffer-display-time |
| 1592 | This variable records the time at which a buffer was last made visible | 1466 | This buffer-local variable records the time at which a buffer was last |
| 1593 | in a window. It is always local in each buffer; each time | 1467 | displayed in a window. The value is @code{nil} if the buffer has |
| 1594 | @code{set-window-buffer} is called, it sets this variable to | 1468 | never been displayed. It is updated each time |
| 1595 | @code{(current-time)} in the specified buffer (@pxref{Time of Day}). | 1469 | @code{set-window-buffer} is called for the buffer, with the value |
| 1596 | When a buffer is first created, @code{buffer-display-time} starts out | 1470 | returned by @code{current-time} (@pxref{Time of Day}). |
| 1597 | with the value @code{nil}. | ||
| 1598 | @end defvar | 1471 | @end defvar |
| 1599 | 1472 | ||
| 1600 | @defun get-buffer-window &optional buffer-or-name all-frames | 1473 | @defun get-buffer-window &optional buffer-or-name all-frames |
| 1601 | This function returns a window displaying @var{buffer-or-name}, or | 1474 | This function returns the first window displaying @var{buffer-or-name} |
| 1602 | @code{nil} if there is none. If there are several such windows, then | 1475 | in the cyclic ordering of windows, starting from the selected window |
| 1603 | the function returns the first one in the cyclic ordering of windows, | 1476 | (@pxref{Cyclic Window Ordering}). If no such window exists, the |
| 1604 | starting from the selected window, @xref{Cyclic Window Ordering}. | 1477 | return value is @code{nil}. |
| 1605 | 1478 | ||
| 1606 | The argument @var{buffer-or-name} may be a buffer or a buffer name and | 1479 | @var{buffer-or-name} should be a buffer or the name of a buffer; if |
| 1607 | defaults to the current buffer. The optional argument @var{all-frames} | 1480 | omitted or @code{nil}, it defaults to the current buffer. The |
| 1608 | specifies which windows to consider: | 1481 | optional argument @var{all-frames} specifies which windows to |
| 1482 | consider: | ||
| 1609 | 1483 | ||
| 1610 | @itemize @bullet | 1484 | @itemize @bullet |
| 1611 | @item | 1485 | @item |
| 1612 | @code{nil} means consider windows on the selected frame. | ||
| 1613 | @item | ||
| 1614 | @code{t} means consider windows on all existing frames. | 1486 | @code{t} means consider windows on all existing frames. |
| 1615 | @item | 1487 | @item |
| 1616 | @code{visible} means consider windows on all visible frames. | 1488 | @code{visible} means consider windows on all visible frames. |
| @@ -1618,44 +1490,45 @@ specifies which windows to consider: | |||
| 1618 | 0 means consider windows on all visible or iconified frames. | 1490 | 0 means consider windows on all visible or iconified frames. |
| 1619 | @item | 1491 | @item |
| 1620 | A frame means consider windows on that frame only. | 1492 | A frame means consider windows on that frame only. |
| 1493 | @item | ||
| 1494 | Any other value means consider windows on the selected frame. | ||
| 1621 | @end itemize | 1495 | @end itemize |
| 1622 | 1496 | ||
| 1623 | Observe that the behavior of @code{get-buffer-window} may differ from | 1497 | Note that these meanings differ slightly from those of the |
| 1624 | that of @code{next-window} (@pxref{Cyclic Window Ordering}) when | 1498 | @var{all-frames} argument to @code{next-window} (@pxref{Cyclic Window |
| 1625 | @var{all-frames} equals @code{nil} or any value not listed here. | 1499 | Ordering}). This function may be changed in a future version of Emacs |
| 1626 | Perhaps we will change @code{get-buffer-window} in the future to make it | 1500 | to eliminate this discrepancy. |
| 1627 | compatible with the other functions. | ||
| 1628 | @end defun | 1501 | @end defun |
| 1629 | 1502 | ||
| 1630 | @defun get-buffer-window-list &optional buffer-or-name minibuf all-frames | 1503 | @defun get-buffer-window-list &optional buffer-or-name minibuf all-frames |
| 1631 | This function returns a list of all windows currently displaying | 1504 | This function returns a list of all windows currently displaying |
| 1632 | @var{buffer-or-name}. The argument @var{buffer-or-name} may be a buffer | 1505 | @var{buffer-or-name}. @var{buffer-or-name} should be a buffer or the |
| 1633 | or the name of an existing buffer and defaults to the current buffer. | 1506 | name of an existing buffer. If omitted or @code{nil}, it defaults to |
| 1507 | the current buffer. | ||
| 1634 | 1508 | ||
| 1635 | The two remaining arguments work like the same-named arguments of | 1509 | The arguments @var{minibuf} and @var{all-frames} have the same |
| 1636 | @code{next-window} (@pxref{Cyclic Window Ordering}); they are @emph{not} | 1510 | meanings as in the function @code{next-window} (@pxref{Cyclic Window |
| 1637 | like the optional arguments of @code{get-buffer-window}. | 1511 | Ordering}). Note that the @var{all-frames} argument does @emph{not} |
| 1512 | behave exactly like in @code{get-buffer-window}. | ||
| 1638 | @end defun | 1513 | @end defun |
| 1639 | 1514 | ||
| 1640 | @deffn Command replace-buffer-in-windows &optional buffer-or-name | 1515 | @deffn Command replace-buffer-in-windows &optional buffer-or-name |
| 1641 | This command replaces @var{buffer-or-name} with some other buffer, in | 1516 | This command replaces @var{buffer-or-name} with some other buffer, in |
| 1642 | all windows displaying it. For each such window, it choose another | 1517 | all windows displaying it. @var{buffer-or-name} should be a buffer, |
| 1643 | buffer using @code{switch-to-prev-buffer} (@pxref{Window History}). | 1518 | or the name of an existing buffer; if omitted or @code{nil}, it |
| 1644 | 1519 | defaults to the current buffer. | |
| 1645 | The argument @var{buffer-or-name} may be a buffer, or the name of an | 1520 | |
| 1646 | existing buffer; it defaults to the current buffer. | 1521 | The replacement buffer in each window is chosen via |
| 1647 | 1522 | @code{switch-to-prev-buffer} (@pxref{Window History}). Any dedicated | |
| 1648 | If a window displaying @var{buffer-or-name} is dedicated | 1523 | window displaying @var{buffer-or-name} is deleted (@pxref{Dedicated |
| 1649 | (@pxref{Dedicated Windows}) and is not the only window on its frame, | 1524 | Windows}), unless it is the only window on its frame---if it is the |
| 1650 | that window is deleted. If that window is the only window on its frame | 1525 | only window, and that frame is not the only frame on its terminal, the |
| 1651 | and there are other frames on the frame's terminal, that frame is dealt | 1526 | frame is ``dismissed'' by calling the function specified by |
| 1652 | with by the function specified by @code{frame-auto-hide-function} | 1527 | @code{frame-auto-hide-function} (@pxref{Quitting Windows}). If the |
| 1653 | (@pxref{Quitting Windows}). Otherwise, the buffer provided by the | 1528 | dedicated window is the only window on the only frame on its terminal, |
| 1654 | function @code{switch-to-prev-buffer} (@pxref{Window History}) is | 1529 | the buffer is replaced anyway. |
| 1655 | displayed in the window instead. | ||
| 1656 | @end deffn | 1530 | @end deffn |
| 1657 | 1531 | ||
| 1658 | |||
| 1659 | @node Switching Buffers | 1532 | @node Switching Buffers |
| 1660 | @section Switching to a Buffer in a Window | 1533 | @section Switching to a Buffer in a Window |
| 1661 | @cindex switching to a buffer | 1534 | @cindex switching to a buffer |
| @@ -1731,9 +1604,12 @@ The @var{buffer-or-name} and @var{norecord} arguments have the same | |||
| 1731 | meanings as in @code{switch-to-buffer}. | 1604 | meanings as in @code{switch-to-buffer}. |
| 1732 | @end deffn | 1605 | @end deffn |
| 1733 | 1606 | ||
| 1734 | The above commands use @code{pop-to-buffer}, which is the function | 1607 | The above commands use the function @code{pop-to-buffer}, which |
| 1735 | used by Lisp programs to flexibly display a buffer in some window and | 1608 | flexibly displays a buffer in some window and selects that window for |
| 1736 | select that window for editing: | 1609 | editing. In turn, @code{pop-to-buffer} uses @code{display-buffer} for |
| 1610 | displaying the buffer. Hence, all the variables affecting | ||
| 1611 | @code{display-buffer} will affect it as well. @xref{Choosing Window}, | ||
| 1612 | for the documentation of @code{display-buffer}. | ||
| 1737 | 1613 | ||
| 1738 | @defun pop-to-buffer buffer-or-name &optional action norecord | 1614 | @defun pop-to-buffer buffer-or-name &optional action norecord |
| 1739 | This function makes @var{buffer-or-name} the current buffer and | 1615 | This function makes @var{buffer-or-name} the current buffer and |
| @@ -1743,10 +1619,6 @@ on a different graphical frame, that frame is given input focus if | |||
| 1743 | possible (@pxref{Input Focus}). The return value is the buffer that | 1619 | possible (@pxref{Input Focus}). The return value is the buffer that |
| 1744 | was switched to. | 1620 | was switched to. |
| 1745 | 1621 | ||
| 1746 | This function uses @code{display-buffer} to display the buffer, so all | ||
| 1747 | the variables affecting @code{display-buffer} will affect it as well. | ||
| 1748 | @xref{Choosing Window}. | ||
| 1749 | |||
| 1750 | If @var{buffer-or-name} is @code{nil}, it defaults to the buffer | 1622 | If @var{buffer-or-name} is @code{nil}, it defaults to the buffer |
| 1751 | returned by @code{other-buffer} (@pxref{The Buffer List}). If | 1623 | returned by @code{other-buffer} (@pxref{The Buffer List}). If |
| 1752 | @var{buffer-or-name} is a string that is not the name of any existing | 1624 | @var{buffer-or-name} is a string that is not the name of any existing |
| @@ -1775,8 +1647,8 @@ used as a subroutine by many functions and commands, including | |||
| 1775 | Buffers}). | 1647 | Buffers}). |
| 1776 | 1648 | ||
| 1777 | @cindex display action | 1649 | @cindex display action |
| 1778 | @cindex action function, for display-buffer | 1650 | @cindex action function, for @code{display-buffer} |
| 1779 | @cindex action alist, for display-buffer | 1651 | @cindex action alist, for @code{display-buffer} |
| 1780 | This command performs several complex steps to find a window to | 1652 | This command performs several complex steps to find a window to |
| 1781 | display in. These steps are described by means of @dfn{display | 1653 | display in. These steps are described by means of @dfn{display |
| 1782 | actions}, which have the form @code{(@var{function} . @var{alist})}. | 1654 | actions}, which have the form @code{(@var{function} . @var{alist})}. |
| @@ -1815,6 +1687,11 @@ The variable @code{display-buffer-overriding-action}. | |||
| 1815 | The user option @code{display-buffer-alist}. | 1687 | The user option @code{display-buffer-alist}. |
| 1816 | 1688 | ||
| 1817 | @item | 1689 | @item |
| 1690 | A special action for handling @code{special-display-buffer-names} and | ||
| 1691 | @code{special-display-regexps}, if either of those variables is | ||
| 1692 | non-@code{nil}. @xref{Choosing Window Options}. | ||
| 1693 | |||
| 1694 | @item | ||
| 1818 | The @var{action} argument. | 1695 | The @var{action} argument. |
| 1819 | 1696 | ||
| 1820 | @item | 1697 | @item |
| @@ -1886,10 +1763,9 @@ This function tries to ``display'' @var{buffer} by finding a window | |||
| 1886 | that is already displaying it. | 1763 | that is already displaying it. |
| 1887 | 1764 | ||
| 1888 | If @var{alist} has a non-@code{nil} @code{inhibit-same-window} entry, | 1765 | If @var{alist} has a non-@code{nil} @code{inhibit-same-window} entry, |
| 1889 | the selected window is not eligible for reuse. | 1766 | the selected window is not eligible for reuse. If @var{alist} |
| 1890 | 1767 | contains a @code{reusable-frames} entry, its value determines which | |
| 1891 | If @var{alist} contains a @code{reusable-frames} entry, its value | 1768 | frames to search for a reusable window: |
| 1892 | determines which frames to search for a reusable window: | ||
| 1893 | 1769 | ||
| 1894 | @itemize @bullet | 1770 | @itemize @bullet |
| 1895 | @item | 1771 | @item |
| @@ -1910,17 +1786,28 @@ normally searches just the selected frame; however, if either the | |||
| 1910 | variable @code{display-buffer-reuse-frames} or the variable | 1786 | variable @code{display-buffer-reuse-frames} or the variable |
| 1911 | @code{pop-up-frames} is non-@code{nil}, it searches all frames on the | 1787 | @code{pop-up-frames} is non-@code{nil}, it searches all frames on the |
| 1912 | current terminal. @xref{Choosing Window Options}. | 1788 | current terminal. @xref{Choosing Window Options}. |
| 1789 | |||
| 1790 | If this function chooses a window on another frame, it makes that | ||
| 1791 | frame visible and raises it if necessary. | ||
| 1913 | @end defun | 1792 | @end defun |
| 1914 | 1793 | ||
| 1915 | @defun display-buffer-pop-up-frame buffer alist | 1794 | @defun display-buffer-pop-up-frame buffer alist |
| 1916 | This function creates a new frame, and displays the buffer in that | 1795 | This function creates a new frame, and displays the buffer in that |
| 1917 | frame's window. | 1796 | frame's window. It actually performs the frame creation by calling |
| 1797 | the function specified in @code{pop-up-frame-function} | ||
| 1798 | (@pxref{Choosing Window Options}). | ||
| 1918 | @end defun | 1799 | @end defun |
| 1919 | 1800 | ||
| 1920 | @defun display-buffer-pop-up-window buffer alist | 1801 | @defun display-buffer-pop-up-window buffer alist |
| 1921 | This function tries to display @var{buffer} by splitting the largest | 1802 | This function tries to display @var{buffer} by splitting the largest |
| 1922 | or least recently-used window. It uses @code{split-window-sensibly} | 1803 | or least recently-used window (typically one on the selected frame). |
| 1923 | as a subroutine (@pxref{Choosing Window Options}). | 1804 | It actually performs the split by calling the function specified in |
| 1805 | @code{split-window-preferred-function} (@pxref{Choosing Window | ||
| 1806 | Options}). | ||
| 1807 | |||
| 1808 | It can fail if no window splitting can be performed for some reason | ||
| 1809 | (e.g. if there is just one frame and it has an @code{unsplittable} | ||
| 1810 | frame parameter; @pxref{Buffer Parameters}). | ||
| 1924 | @end defun | 1811 | @end defun |
| 1925 | 1812 | ||
| 1926 | @defun display-buffer-use-some-window buffer alist | 1813 | @defun display-buffer-use-some-window buffer alist |
| @@ -1937,142 +1824,108 @@ The behavior of the standard display actions of @code{display-buffer} | |||
| 1937 | options. | 1824 | options. |
| 1938 | 1825 | ||
| 1939 | @defopt display-buffer-reuse-frames | 1826 | @defopt display-buffer-reuse-frames |
| 1940 | If this variable is non-@code{nil}, @code{display-buffer} searches | 1827 | If the value of this variable is non-@code{nil}, @code{display-buffer} |
| 1941 | visible and iconified frames for a window displaying | 1828 | may search all frames on the current terminal when looking for a |
| 1942 | @var{buffer-or-name}. If there is such a window, @code{display-buffer} | 1829 | window already displaying the specified buffer. The default is |
| 1943 | makes that window's frame visible and raises it if necessary, and | 1830 | @code{nil}. This variable is consulted by the action function |
| 1944 | returns the window. If there is no such window or | 1831 | @code{display-buffer-reuse-window} (@pxref{Display Action Functions}). |
| 1945 | @code{display-buffer-reuse-frames} is @code{nil}, the behavior of | ||
| 1946 | @code{display-buffer} is determined by the variables described next. | ||
| 1947 | @end defopt | 1832 | @end defopt |
| 1948 | 1833 | ||
| 1949 | @defopt pop-up-windows | 1834 | @defopt pop-up-windows |
| 1950 | This variable specifies whether @code{display-buffer} is allowed to | 1835 | If the value of this variable is non-@code{nil}, @code{display-buffer} |
| 1951 | split (@pxref{Splitting Windows}) an existing window. If this variable | 1836 | is allowed to split an existing window to make a new window for |
| 1952 | is non-@code{nil}, @code{display-buffer} tries to split the largest or | 1837 | displaying in. This is the default. |
| 1953 | least recently used window on the selected frame. (If the selected | 1838 | |
| 1954 | frame is a minibuffer-only frame, @code{display-buffer} tries to split a | 1839 | This variable is provided mainly for backward compatibility. It is |
| 1955 | window on another frame instead.) If this variable is @code{nil} or the | 1840 | obeyed by @code{display-buffer} via a special mechanism in |
| 1956 | variable @code{pop-up-frames} (see below) is non-@code{nil}, | 1841 | @code{display-buffer-fallback-action}, which only calls the action |
| 1957 | @code{display-buffer} does not split any window. | 1842 | function @code{display-buffer-pop-up-window} (@pxref{Display Action |
| 1843 | Functions}) when the value is @code{nil}. It is not consulted by | ||
| 1844 | @code{display-buffer-pop-up-window} itself, which the user may specify | ||
| 1845 | directly in @code{display-buffer-alist} etc. | ||
| 1958 | @end defopt | 1846 | @end defopt |
| 1959 | 1847 | ||
| 1960 | @defopt split-window-preferred-function | 1848 | @defopt split-window-preferred-function |
| 1961 | This variable must specify a function with one argument, which is a | 1849 | This variable specifies a function for splitting a window, in order to |
| 1962 | window. The @code{display-buffer} routines will call this function with | 1850 | make a new window for displaying a buffer. It is used by the |
| 1963 | one or more candidate windows when they look for a window to split. The | 1851 | @code{display-buffer-pop-up-window} action function to actually split |
| 1964 | function is expected to split that window and return the new window. If | 1852 | the window (@pxref{Display Action Functions}). |
| 1965 | the function returns @code{nil}, this means that the argument window | 1853 | |
| 1966 | cannot (or shall not) be split. | 1854 | The default value is @code{split-window-sensibly}, which is documented |
| 1967 | 1855 | below. The value must be a function that takes one argument, a | |
| 1968 | The default value of @code{split-window-preferred-function} is the | 1856 | window, and return either a new window (which is used to display the |
| 1969 | function @code{split-window-sensibly} described below. If you | 1857 | desired buffer) or @code{nil} (which means the splitting failed). |
| 1970 | customize this option, bear in mind that the @code{display-buffer} | ||
| 1971 | routines may call your function up to two times when trying to split a | ||
| 1972 | window. The argument of the first call is the largest window on the | ||
| 1973 | chosen frame (as returned by @code{get-largest-window}). If that call | ||
| 1974 | fails to return a live window, your function is called a second time | ||
| 1975 | with the least recently used window on that frame (as returned by | ||
| 1976 | @code{get-lru-window}). | ||
| 1977 | |||
| 1978 | The function specified by this option may try to split any other window | ||
| 1979 | instead of the argument window. Note that the window selected at the | ||
| 1980 | time @code{display-buffer} was invoked is still selected when your | ||
| 1981 | function is called. Hence, you can split the selected window (instead | ||
| 1982 | of the largest or least recently used one) by simply ignoring the window | ||
| 1983 | argument in the body of your function. You can even choose to not split | ||
| 1984 | any window as long as the return value of your function specifies a live | ||
| 1985 | window or @code{nil}, but you are not encouraged to do so | ||
| 1986 | unconditionally. If you want @code{display-buffer} to never split any | ||
| 1987 | windows, set @code{pop-up-windows} to @code{nil}. | ||
| 1988 | @end defopt | 1858 | @end defopt |
| 1989 | 1859 | ||
| 1990 | @defun split-window-sensibly window | 1860 | @defun split-window-sensibly window |
| 1991 | This function takes a window as argument and tries to split that window | 1861 | This function tries to split @code{window}, and return the newly |
| 1992 | in a suitable way. The two variables described next are useful for | 1862 | created window. If @code{window} cannot be split, it returns |
| 1993 | tuning the behavior of this function. | 1863 | @code{nil}. |
| 1864 | |||
| 1865 | This function obeys the usual rules that determine when a window may | ||
| 1866 | be split (@pxref{Splitting Windows}). It first tries to split by | ||
| 1867 | placing the new window below, subject to the restriction imposed by | ||
| 1868 | @code{split-height-threshold} (see below) in addition to any other | ||
| 1869 | restrictions. If that fails, it tries to split by placing the new | ||
| 1870 | window to the right, subject to @code{split-width-threshold} (see | ||
| 1871 | below). If that fails, and the window is the only window on its | ||
| 1872 | frame, this function again tries to split and place the new window | ||
| 1873 | below, disregarding @code{split-height-threshold}. If this fails as | ||
| 1874 | well, this function gives up and returns @code{nil}. | ||
| 1994 | @end defun | 1875 | @end defun |
| 1995 | 1876 | ||
| 1996 | @defopt split-height-threshold | 1877 | @defopt split-height-threshold |
| 1997 | This variable specifies whether @code{split-window-sensibly} may split | 1878 | This variable, used by @code{split-window-sensibly}, specifies whether |
| 1998 | windows vertically. If it is an integer, @code{split-window-sensibly} | 1879 | to split the window placing the new window below. If it is an |
| 1999 | tries to vertically split a window only if it has at least this many | 1880 | integer, that means to split only if the original window has at least |
| 2000 | lines. If the window has less lines, splitting fails, or the value of | 1881 | that many lines. If it is @code{nil}, that means not to split this |
| 2001 | this variable is @code{nil}, @code{split-window-sensibly} will try to | 1882 | way. |
| 2002 | split the window horizontally, subject to restrictions of | ||
| 2003 | @code{split-width-threshold} (see below). If splitting horizontally | ||
| 2004 | fails too and the window is the only window on its frame, | ||
| 2005 | @code{split-window-sensibly} will try to split the window vertically | ||
| 2006 | disregarding the value of @code{split-height-threshold}. If this fails | ||
| 2007 | as well, @code{split-window-sensibly} returns @code{nil}. | ||
| 2008 | |||
| 2009 | @code{split-window-sensibly} does not split vertically a window whose | ||
| 2010 | height is fixed (@pxref{Resizing Windows}). Also, it vertically splits | ||
| 2011 | a window only if the space taken up by that window can accommodate two | ||
| 2012 | windows one above the other that are both at least | ||
| 2013 | @code{window-min-height} lines tall. Moreover, if the window that shall | ||
| 2014 | be split has a mode line, @code{split-window-sensibly} does not split | ||
| 2015 | the window unless the new window can accommodate a mode line too. | ||
| 2016 | @end defopt | 1883 | @end defopt |
| 2017 | 1884 | ||
| 2018 | @defopt split-width-threshold | 1885 | @defopt split-width-threshold |
| 2019 | This variable specifies whether @code{split-window-sensibly} may split | 1886 | This variable, used by @code{split-window-sensibly}, specifies whether |
| 2020 | windows horizontally. If it is an integer, @code{split-window-sensibly} | 1887 | to split the window placing the new window to the right. If the value |
| 2021 | tries to horizontally split a window only if it has at least this many | 1888 | is an integer, that means to split only if the original window has at |
| 2022 | columns. If it is @code{nil}, @code{split-window-sensibly} will not | 1889 | least that many columns. If the value is @code{nil}, that means not |
| 2023 | split the window horizontally. (It still might split the window | 1890 | to split this way. |
| 2024 | vertically, though, see above.) | ||
| 2025 | |||
| 2026 | @code{split-window-sensibly} does not split horizontally a window if | ||
| 2027 | that window's width is fixed (@pxref{Resizing Windows}). Also, it | ||
| 2028 | horizontally splits a window only if the space that window takes up can | ||
| 2029 | accommodate two windows side by side that are both at least | ||
| 2030 | @code{window-min-width} columns wide. | ||
| 2031 | @end defopt | 1891 | @end defopt |
| 2032 | 1892 | ||
| 2033 | @defopt even-window-heights | ||
| 2034 | This variable specifies whether @code{display-buffer} should even out | ||
| 2035 | window heights if the buffer gets displayed in an existing window, above | ||
| 2036 | or beneath another window. If @code{even-window-heights} is | ||
| 2037 | non-@code{nil}, the default, window heights will be evened out. If | ||
| 2038 | either of the involved window has fixed height (@pxref{Resizing | ||
| 2039 | Windows}) or @code{even-window-heights} is @code{nil}, the original | ||
| 2040 | window heights will be left alone. | ||
| 2041 | @end defopt | ||
| 2042 | |||
| 2043 | @c Emacs 19 feature | ||
| 2044 | @defopt pop-up-frames | 1893 | @defopt pop-up-frames |
| 2045 | This variable specifies whether @code{display-buffer} should make new | 1894 | If the value of this variable is non-@code{nil}, that means |
| 2046 | frames. If it is non-@code{nil}, @code{display-buffer} looks for a | 1895 | @code{display-buffer} may display buffers by making new frames. The |
| 2047 | window already displaying @var{buffer-or-name} on any visible or | 1896 | default is @code{nil}. |
| 2048 | iconified frame. If it finds such a window, it makes that window's | 1897 | |
| 2049 | frame visible and raises it if necessary, and returns the window. | 1898 | A non-@code{nil} value also means that when @code{display-buffer} is |
| 2050 | Otherwise it makes a new frame, unless the variable's value is | 1899 | looking for a window already displaying @var{buffer-or-name}, it can |
| 2051 | @code{graphic-only} and the selected frame is not on a graphic display. | 1900 | search any visible or iconified frame, not just the selected frame. |
| 2052 | @xref{Frames}, for more information. | 1901 | |
| 2053 | 1902 | This variable is provided mainly for backward compatibility. It is | |
| 2054 | Note that the value of @code{pop-up-windows} does not matter if | 1903 | obeyed by @code{display-buffer} via a special mechanism in |
| 2055 | @code{pop-up-frames} is non-@code{nil}. If @code{pop-up-frames} is | 1904 | @code{display-buffer-fallback-action}, which calls the action function |
| 2056 | @code{nil}, then @code{display-buffer} either splits a window or reuses | 1905 | @code{display-buffer-pop-up-frame} (@pxref{Display Action Functions}) |
| 2057 | one. | 1906 | if the value is non-@code{nil}. (This is done before attempting to |
| 1907 | split a window.) This variable is not consulted by | ||
| 1908 | @code{display-buffer-pop-up-frame} itself, which the user may specify | ||
| 1909 | directly in @code{display-buffer-alist} etc. | ||
| 2058 | @end defopt | 1910 | @end defopt |
| 2059 | 1911 | ||
| 2060 | @c Emacs 19 feature | ||
| 2061 | @defopt pop-up-frame-function | 1912 | @defopt pop-up-frame-function |
| 2062 | This variable specifies how to make a new frame if @code{pop-up-frames} | 1913 | This variable specifies a function for creating a new frame, in order |
| 2063 | is non-@code{nil}. | 1914 | to make a new window for displaying a buffer. It is used by the |
| 2064 | 1915 | @code{display-buffer-pop-up-frame} action function (@pxref{Display | |
| 2065 | The value of this variable must be a function of no arguments. When | 1916 | Action Functions}). |
| 2066 | @code{display-buffer} makes a new frame, it does so by calling that | 1917 | |
| 2067 | function, which should return a frame. The default value of this | 1918 | The value should be a function that takes no arguments and returns a |
| 2068 | variable is a function that creates a frame using the parameters | 1919 | frame, or @code{nil} if no frame could be created. The default value |
| 2069 | specified by @code{pop-up-frame-alist} described next. | 1920 | is a function that creates a frame using the parameters specified by |
| 1921 | @code{pop-up-frame-alist} (see below). | ||
| 2070 | @end defopt | 1922 | @end defopt |
| 2071 | 1923 | ||
| 2072 | @defopt pop-up-frame-alist | 1924 | @defopt pop-up-frame-alist |
| 2073 | This variable holds an alist specifying frame parameters used by the | 1925 | This variable holds an alist of frame parameters (@pxref{Frame |
| 2074 | default value of @code{pop-up-frame-function} for making new frames. | 1926 | Parameters}), which is used by the default function in |
| 2075 | @xref{Frame Parameters}, for more information about frame parameters. | 1927 | @code{pop-up-frame-function} to make a new frame. The default is |
| 1928 | @code{nil}. | ||
| 2076 | @end defopt | 1929 | @end defopt |
| 2077 | 1930 | ||
| 2078 | @defopt special-display-buffer-names | 1931 | @defopt special-display-buffer-names |
| @@ -2193,12 +2046,6 @@ This variable takes precedence over all the other options described | |||
| 2193 | above. | 2046 | above. |
| 2194 | @end defopt | 2047 | @end defopt |
| 2195 | 2048 | ||
| 2196 | If all options described above fail to produce a suitable window, | ||
| 2197 | @code{display-buffer} tries to reuse an existing window. As a last | ||
| 2198 | resort, it will try to display @var{buffer-or-name} on a separate frame. | ||
| 2199 | In that case, the value of @code{pop-up-frames} is disregarded. | ||
| 2200 | |||
| 2201 | |||
| 2202 | @node Window History | 2049 | @node Window History |
| 2203 | @section Window History | 2050 | @section Window History |
| 2204 | @cindex window history | 2051 | @cindex window history |
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 924f3501bfa..43d9ba1b1e6 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,19 @@ | |||
| 1 | 2011-11-20 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * gnus.texi (Group Information): | ||
| 4 | Remove gnus-group-fetch-faq, command deleted 2010-09-24. | ||
| 5 | |||
| 6 | 2011-11-20 Juanma Barranquero <lekktu@gmail.com> | ||
| 7 | |||
| 8 | * gnus-coding.texi (Gnus Maintenance Guide): | ||
| 9 | Rename from "Gnus Maintainance Guide". | ||
| 10 | |||
| 11 | * ede.texi (ede-compilation-program, ede-compiler, ede-linker): | ||
| 12 | * eieio.texi (Customizing): | ||
| 13 | * gnus.texi (Article Washing): | ||
| 14 | * gnus-news.texi: | ||
| 15 | * sem-user.texi (Smart Jump): Fix typos. | ||
| 16 | |||
| 1 | 2011-11-16 Juanma Barranquero <lekktu@gmail.com> | 17 | 2011-11-16 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 18 | ||
| 3 | * org.texi (Agenda commands, Exporting Agenda Views): Fix typos. | 19 | * org.texi (Agenda commands, Exporting Agenda Views): Fix typos. |
diff --git a/doc/misc/ada-mode.texi b/doc/misc/ada-mode.texi index 374158c2c78..0eb20d01324 100644 --- a/doc/misc/ada-mode.texi +++ b/doc/misc/ada-mode.texi | |||
| @@ -1357,7 +1357,7 @@ specifies the casing of one word or word fragment. Comments may be | |||
| 1357 | included, separated from the word by a space. | 1357 | included, separated from the word by a space. |
| 1358 | 1358 | ||
| 1359 | If the word starts with an asterisk (@key{*}), it defines the casing | 1359 | If the word starts with an asterisk (@key{*}), it defines the casing |
| 1360 | af a word fragment (or ``substring''); part of a word between two | 1360 | as a word fragment (or ``substring''); part of a word between two |
| 1361 | underscores or word boundary. | 1361 | underscores or word boundary. |
| 1362 | 1362 | ||
| 1363 | For example: | 1363 | For example: |
diff --git a/doc/misc/autotype.texi b/doc/misc/autotype.texi index 2e66c78a3cb..ecf4c7e47b2 100644 --- a/doc/misc/autotype.texi +++ b/doc/misc/autotype.texi | |||
| @@ -156,7 +156,7 @@ the point is normally left after that skeleton is inserted (@pxref{Using | |||
| 156 | Skeletons}). The point (@pxref{(emacs)Point}) is left at the next | 156 | Skeletons}). The point (@pxref{(emacs)Point}) is left at the next |
| 157 | interesting spot in the skeleton instead. | 157 | interesting spot in the skeleton instead. |
| 158 | 158 | ||
| 159 | A negative prefix means to do something similar with that many precedingly | 159 | A negative prefix means to do something similar with that many previously |
| 160 | marked interregions (@pxref{(emacs)Mark}). In the simplest case, if you type | 160 | marked interregions (@pxref{(emacs)Mark}). In the simplest case, if you type |
| 161 | @kbd{M--} just before issuing the skeleton command, that will wrap the | 161 | @kbd{M--} just before issuing the skeleton command, that will wrap the |
| 162 | skeleton around the current region, just like a positive argument would have | 162 | skeleton around the current region, just like a positive argument would have |
diff --git a/doc/misc/calc.texi b/doc/misc/calc.texi index 5a1ee872a2b..290b120ea80 100644 --- a/doc/misc/calc.texi +++ b/doc/misc/calc.texi | |||
| @@ -90,7 +90,7 @@ | |||
| 90 | This file documents Calc, the GNU Emacs calculator. | 90 | This file documents Calc, the GNU Emacs calculator. |
| 91 | @end ifinfo | 91 | @end ifinfo |
| 92 | @ifnotinfo | 92 | @ifnotinfo |
| 93 | This file documents Calc, the GNU Emacs calculator, included with | 93 | This file documents Calc, the GNU Emacs calculator, included with |
| 94 | GNU Emacs @value{EMACSVER}. | 94 | GNU Emacs @value{EMACSVER}. |
| 95 | @end ifnotinfo | 95 | @end ifnotinfo |
| 96 | 96 | ||
| @@ -324,7 +324,7 @@ need to know. | |||
| 324 | @c @cindex Marginal notes | 324 | @c @cindex Marginal notes |
| 325 | Every Calc keyboard command is listed in the Calc Summary, and also | 325 | Every Calc keyboard command is listed in the Calc Summary, and also |
| 326 | in the Key Index. Algebraic functions, @kbd{M-x} commands, and | 326 | in the Key Index. Algebraic functions, @kbd{M-x} commands, and |
| 327 | variables also have their own indices. | 327 | variables also have their own indices. |
| 328 | @c @texline Each | 328 | @c @texline Each |
| 329 | @c @infoline In the printed manual, each | 329 | @c @infoline In the printed manual, each |
| 330 | @c paragraph that is referenced in the Key or Function Index is marked | 330 | @c paragraph that is referenced in the Key or Function Index is marked |
| @@ -338,7 +338,7 @@ the @kbd{h i} key sequence. Outside of the Calc window, you can press | |||
| 338 | command @kbd{C-x * t} will jump to the Tutorial and start Calc if | 338 | command @kbd{C-x * t} will jump to the Tutorial and start Calc if |
| 339 | necessary. Pressing @kbd{h s} or @kbd{C-x * s} will take you directly | 339 | necessary. Pressing @kbd{h s} or @kbd{C-x * s} will take you directly |
| 340 | to the Calc Summary. Within Calc, you can also go to the part of the | 340 | to the Calc Summary. Within Calc, you can also go to the part of the |
| 341 | manual describing any Calc key, function, or variable using | 341 | manual describing any Calc key, function, or variable using |
| 342 | @w{@kbd{h k}}, @kbd{h f}, or @kbd{h v}, respectively. @xref{Help Commands}. | 342 | @w{@kbd{h k}}, @kbd{h f}, or @kbd{h v}, respectively. @xref{Help Commands}. |
| 343 | 343 | ||
| 344 | @ifnottex | 344 | @ifnottex |
| @@ -437,12 +437,12 @@ Delete, and Space keys. | |||
| 437 | then the command to operate on the numbers. | 437 | then the command to operate on the numbers. |
| 438 | 438 | ||
| 439 | @noindent | 439 | @noindent |
| 440 | Type @kbd{2 @key{RET} 3 + Q} to compute | 440 | Type @kbd{2 @key{RET} 3 + Q} to compute |
| 441 | @texline @math{\sqrt{2+3} = 2.2360679775}. | 441 | @texline @math{\sqrt{2+3} = 2.2360679775}. |
| 442 | @infoline the square root of 2+3, which is 2.2360679775. | 442 | @infoline the square root of 2+3, which is 2.2360679775. |
| 443 | 443 | ||
| 444 | @noindent | 444 | @noindent |
| 445 | Type @kbd{P 2 ^} to compute | 445 | Type @kbd{P 2 ^} to compute |
| 446 | @texline @math{\pi^2 = 9.86960440109}. | 446 | @texline @math{\pi^2 = 9.86960440109}. |
| 447 | @infoline the value of `pi' squared, 9.86960440109. | 447 | @infoline the value of `pi' squared, 9.86960440109. |
| 448 | 448 | ||
| @@ -461,14 +461,14 @@ conventional ``algebraic'' notation. To enter an algebraic formula, | |||
| 461 | use the apostrophe key. | 461 | use the apostrophe key. |
| 462 | 462 | ||
| 463 | @noindent | 463 | @noindent |
| 464 | Type @kbd{' sqrt(2+3) @key{RET}} to compute | 464 | Type @kbd{' sqrt(2+3) @key{RET}} to compute |
| 465 | @texline @math{\sqrt{2+3}}. | 465 | @texline @math{\sqrt{2+3}}. |
| 466 | @infoline the square root of 2+3. | 466 | @infoline the square root of 2+3. |
| 467 | 467 | ||
| 468 | @noindent | 468 | @noindent |
| 469 | Type @kbd{' pi^2 @key{RET}} to enter | 469 | Type @kbd{' pi^2 @key{RET}} to enter |
| 470 | @texline @math{\pi^2}. | 470 | @texline @math{\pi^2}. |
| 471 | @infoline `pi' squared. | 471 | @infoline `pi' squared. |
| 472 | To evaluate this symbolic formula as a number, type @kbd{=}. | 472 | To evaluate this symbolic formula as a number, type @kbd{=}. |
| 473 | 473 | ||
| 474 | @noindent | 474 | @noindent |
| @@ -526,10 +526,10 @@ the upper-leftmost @samp{1} and set the mark, then move to just after | |||
| 526 | the lower-right @samp{8} and press @kbd{C-x * r}. | 526 | the lower-right @samp{8} and press @kbd{C-x * r}. |
| 527 | 527 | ||
| 528 | @noindent | 528 | @noindent |
| 529 | Type @kbd{v t} to transpose this | 529 | Type @kbd{v t} to transpose this |
| 530 | @texline @math{3\times2} | 530 | @texline @math{3\times2} |
| 531 | @infoline 3x2 | 531 | @infoline 3x2 |
| 532 | matrix into a | 532 | matrix into a |
| 533 | @texline @math{2\times3} | 533 | @texline @math{2\times3} |
| 534 | @infoline 2x3 | 534 | @infoline 2x3 |
| 535 | matrix. Type @w{@kbd{v u}} to unpack the rows into two separate | 535 | matrix. Type @w{@kbd{v u}} to unpack the rows into two separate |
| @@ -605,7 +605,7 @@ there are Quick mode, Keypad mode, and Embedded mode. | |||
| 605 | 605 | ||
| 606 | @noindent | 606 | @noindent |
| 607 | On most systems, you can type @kbd{C-x *} to start the Calculator. | 607 | On most systems, you can type @kbd{C-x *} to start the Calculator. |
| 608 | The key sequence @kbd{C-x *} is bound to the command @code{calc-dispatch}, | 608 | The key sequence @kbd{C-x *} is bound to the command @code{calc-dispatch}, |
| 609 | which can be rebound if convenient (@pxref{Customizing Calc}). | 609 | which can be rebound if convenient (@pxref{Customizing Calc}). |
| 610 | 610 | ||
| 611 | When you press @kbd{C-x *}, Emacs waits for you to press a second key to | 611 | When you press @kbd{C-x *}, Emacs waits for you to press a second key to |
| @@ -1154,9 +1154,9 @@ its initial state: Empty stack, and initial mode settings. | |||
| 1154 | @noindent | 1154 | @noindent |
| 1155 | Calc was originally started as a two-week project to occupy a lull | 1155 | Calc was originally started as a two-week project to occupy a lull |
| 1156 | in the author's schedule. Basically, a friend asked if I remembered | 1156 | in the author's schedule. Basically, a friend asked if I remembered |
| 1157 | the value of | 1157 | the value of |
| 1158 | @texline @math{2^{32}}. | 1158 | @texline @math{2^{32}}. |
| 1159 | @infoline @expr{2^32}. | 1159 | @infoline @expr{2^32}. |
| 1160 | I didn't offhand, but I said, ``that's easy, just call up an | 1160 | I didn't offhand, but I said, ``that's easy, just call up an |
| 1161 | @code{xcalc}.'' @code{Xcalc} duly reported that the answer to our | 1161 | @code{xcalc}.'' @code{Xcalc} duly reported that the answer to our |
| 1162 | question was @samp{4.294967e+09}---with no way to see the full ten | 1162 | question was @samp{4.294967e+09}---with no way to see the full ten |
| @@ -1213,7 +1213,7 @@ algebra system for microcomputers. | |||
| 1213 | Many people have contributed to Calc by reporting bugs and suggesting | 1213 | Many people have contributed to Calc by reporting bugs and suggesting |
| 1214 | features, large and small. A few deserve special mention: Tim Peters, | 1214 | features, large and small. A few deserve special mention: Tim Peters, |
| 1215 | who helped develop the ideas that led to the selection commands, rewrite | 1215 | who helped develop the ideas that led to the selection commands, rewrite |
| 1216 | rules, and many other algebra features; | 1216 | rules, and many other algebra features; |
| 1217 | @texline Fran\c{c}ois | 1217 | @texline Fran\c{c}ois |
| 1218 | @infoline Francois | 1218 | @infoline Francois |
| 1219 | Pinard, who contributed an early prototype of the Calc Summary appendix | 1219 | Pinard, who contributed an early prototype of the Calc Summary appendix |
| @@ -1226,7 +1226,7 @@ Randal Schwartz, who suggested the @code{calc-eval} function; Juha | |||
| 1226 | Sarlin, who first worked out how to split Calc into quickly-loading | 1226 | Sarlin, who first worked out how to split Calc into quickly-loading |
| 1227 | parts; Bob Weiner, who helped immensely with the Lucid Emacs port; and | 1227 | parts; Bob Weiner, who helped immensely with the Lucid Emacs port; and |
| 1228 | Robert J. Chassell, who suggested the Calc Tutorial and exercises as | 1228 | Robert J. Chassell, who suggested the Calc Tutorial and exercises as |
| 1229 | well as many other things. | 1229 | well as many other things. |
| 1230 | 1230 | ||
| 1231 | @cindex Bibliography | 1231 | @cindex Bibliography |
| 1232 | @cindex Knuth, Art of Computer Programming | 1232 | @cindex Knuth, Art of Computer Programming |
| @@ -1472,9 +1472,9 @@ Here's the first exercise: What will the keystrokes @kbd{1 @key{RET} 2 | |||
| 1472 | multiplication.) Figure it out by hand, then try it with Calc to see | 1472 | multiplication.) Figure it out by hand, then try it with Calc to see |
| 1473 | if you're right. @xref{RPN Answer 1, 1}. (@bullet{}) | 1473 | if you're right. @xref{RPN Answer 1, 1}. (@bullet{}) |
| 1474 | 1474 | ||
| 1475 | (@bullet{}) @strong{Exercise 2.} Compute | 1475 | (@bullet{}) @strong{Exercise 2.} Compute |
| 1476 | @texline @math{(2\times4) + (7\times9.4) + {5\over4}} | 1476 | @texline @math{(2\times4) + (7\times9.4) + {5\over4}} |
| 1477 | @infoline @expr{2*4 + 7*9.5 + 5/4} | 1477 | @infoline @expr{2*4 + 7*9.5 + 5/4} |
| 1478 | using the stack. @xref{RPN Answer 2, 2}. (@bullet{}) | 1478 | using the stack. @xref{RPN Answer 2, 2}. (@bullet{}) |
| 1479 | 1479 | ||
| 1480 | The @key{DEL} key is called Backspace on some keyboards. It is | 1480 | The @key{DEL} key is called Backspace on some keyboards. It is |
| @@ -1889,7 +1889,7 @@ intermediate results of a calculation as you go along. You can | |||
| 1889 | accomplish this in Calc by performing your calculation as a series | 1889 | accomplish this in Calc by performing your calculation as a series |
| 1890 | of algebraic entries, using the @kbd{$} sign to tie them together. | 1890 | of algebraic entries, using the @kbd{$} sign to tie them together. |
| 1891 | In an algebraic formula, @kbd{$} represents the number on the top | 1891 | In an algebraic formula, @kbd{$} represents the number on the top |
| 1892 | of the stack. Here, we perform the calculation | 1892 | of the stack. Here, we perform the calculation |
| 1893 | @texline @math{\sqrt{2\times4+1}}, | 1893 | @texline @math{\sqrt{2\times4+1}}, |
| 1894 | @infoline @expr{sqrt(2*4+1)}, | 1894 | @infoline @expr{sqrt(2*4+1)}, |
| 1895 | which on a traditional calculator would be done by pressing | 1895 | which on a traditional calculator would be done by pressing |
| @@ -2149,7 +2149,7 @@ key. If you type a prefix key by accident, you can press @kbd{C-g} | |||
| 2149 | to cancel it. (In fact, you can press @kbd{C-g} to cancel almost | 2149 | to cancel it. (In fact, you can press @kbd{C-g} to cancel almost |
| 2150 | anything in Emacs.) To get help on a prefix key, press that key | 2150 | anything in Emacs.) To get help on a prefix key, press that key |
| 2151 | followed by @kbd{?}. Some prefixes have several lines of help, | 2151 | followed by @kbd{?}. Some prefixes have several lines of help, |
| 2152 | so you need to press @kbd{?} repeatedly to see them all. | 2152 | so you need to press @kbd{?} repeatedly to see them all. |
| 2153 | You can also type @kbd{h h} to see all the help at once. | 2153 | You can also type @kbd{h h} to see all the help at once. |
| 2154 | 2154 | ||
| 2155 | Try pressing @kbd{t ?} now. You will see a line of the form, | 2155 | Try pressing @kbd{t ?} now. You will see a line of the form, |
| @@ -2550,13 +2550,13 @@ angle is measured in degrees. For example, | |||
| 2550 | 2550 | ||
| 2551 | @noindent | 2551 | @noindent |
| 2552 | The shift-@kbd{S} command computes the sine of an angle. The sine | 2552 | The shift-@kbd{S} command computes the sine of an angle. The sine |
| 2553 | of 45 degrees is | 2553 | of 45 degrees is |
| 2554 | @texline @math{\sqrt{2}/2}; | 2554 | @texline @math{\sqrt{2}/2}; |
| 2555 | @infoline @expr{sqrt(2)/2}; | 2555 | @infoline @expr{sqrt(2)/2}; |
| 2556 | squaring this yields @expr{2/4 = 0.5}. However, there has been a slight | 2556 | squaring this yields @expr{2/4 = 0.5}. However, there has been a slight |
| 2557 | roundoff error because the representation of | 2557 | roundoff error because the representation of |
| 2558 | @texline @math{\sqrt{2}/2} | 2558 | @texline @math{\sqrt{2}/2} |
| 2559 | @infoline @expr{sqrt(2)/2} | 2559 | @infoline @expr{sqrt(2)/2} |
| 2560 | wasn't exact. The @kbd{c 1} command is a handy way to clean up numbers | 2560 | wasn't exact. The @kbd{c 1} command is a handy way to clean up numbers |
| 2561 | in this case; it temporarily reduces the precision by one digit while it | 2561 | in this case; it temporarily reduces the precision by one digit while it |
| 2562 | re-rounds the number on the top of the stack. | 2562 | re-rounds the number on the top of the stack. |
| @@ -2595,9 +2595,9 @@ either radians or degrees, depending on the current angular mode. | |||
| 2595 | @end smallexample | 2595 | @end smallexample |
| 2596 | 2596 | ||
| 2597 | @noindent | 2597 | @noindent |
| 2598 | Here we compute the Inverse Sine of | 2598 | Here we compute the Inverse Sine of |
| 2599 | @texline @math{\sqrt{0.5}}, | 2599 | @texline @math{\sqrt{0.5}}, |
| 2600 | @infoline @expr{sqrt(0.5)}, | 2600 | @infoline @expr{sqrt(0.5)}, |
| 2601 | first in radians, then in degrees. | 2601 | first in radians, then in degrees. |
| 2602 | 2602 | ||
| 2603 | Use @kbd{c d} and @kbd{c r} to convert a number from radians to degrees | 2603 | Use @kbd{c d} and @kbd{c r} to convert a number from radians to degrees |
| @@ -2783,9 +2783,9 @@ logarithm). These can be modified by the @kbd{I} (inverse) and | |||
| 2783 | @kbd{H} (hyperbolic) prefix keys. | 2783 | @kbd{H} (hyperbolic) prefix keys. |
| 2784 | 2784 | ||
| 2785 | Let's compute the sine and cosine of an angle, and verify the | 2785 | Let's compute the sine and cosine of an angle, and verify the |
| 2786 | identity | 2786 | identity |
| 2787 | @texline @math{\sin^2x + \cos^2x = 1}. | 2787 | @texline @math{\sin^2x + \cos^2x = 1}. |
| 2788 | @infoline @expr{sin(x)^2 + cos(x)^2 = 1}. | 2788 | @infoline @expr{sin(x)^2 + cos(x)^2 = 1}. |
| 2789 | We'll arbitrarily pick @mathit{-64} degrees as a good value for @expr{x}. | 2789 | We'll arbitrarily pick @mathit{-64} degrees as a good value for @expr{x}. |
| 2790 | With the angular mode set to degrees (type @w{@kbd{m d}}), do: | 2790 | With the angular mode set to degrees (type @w{@kbd{m d}}), do: |
| 2791 | 2791 | ||
| @@ -2806,7 +2806,7 @@ You can of course do these calculations to any precision you like.) | |||
| 2806 | Remember, @kbd{f h} is the @code{calc-hypot}, or square-root of sum | 2806 | Remember, @kbd{f h} is the @code{calc-hypot}, or square-root of sum |
| 2807 | of squares, command. | 2807 | of squares, command. |
| 2808 | 2808 | ||
| 2809 | Another identity is | 2809 | Another identity is |
| 2810 | @texline @math{\displaystyle\tan x = {\sin x \over \cos x}}. | 2810 | @texline @math{\displaystyle\tan x = {\sin x \over \cos x}}. |
| 2811 | @infoline @expr{tan(x) = sin(x) / cos(x)}. | 2811 | @infoline @expr{tan(x) = sin(x) / cos(x)}. |
| 2812 | @smallexample | 2812 | @smallexample |
| @@ -2871,7 +2871,7 @@ the top two stack elements right after the @kbd{U U}, then a pair of | |||
| 2871 | A similar identity is supposed to hold for hyperbolic sines and cosines, | 2871 | A similar identity is supposed to hold for hyperbolic sines and cosines, |
| 2872 | except that it is the @emph{difference} | 2872 | except that it is the @emph{difference} |
| 2873 | @texline @math{\cosh^2x - \sinh^2x} | 2873 | @texline @math{\cosh^2x - \sinh^2x} |
| 2874 | @infoline @expr{cosh(x)^2 - sinh(x)^2} | 2874 | @infoline @expr{cosh(x)^2 - sinh(x)^2} |
| 2875 | that always equals one. Let's try to verify this identity. | 2875 | that always equals one. Let's try to verify this identity. |
| 2876 | 2876 | ||
| 2877 | @smallexample | 2877 | @smallexample |
| @@ -2993,7 +2993,7 @@ factorial function defined in terms of Euler's Gamma function | |||
| 2993 | @end smallexample | 2993 | @end smallexample |
| 2994 | 2994 | ||
| 2995 | @noindent | 2995 | @noindent |
| 2996 | Here we verify the identity | 2996 | Here we verify the identity |
| 2997 | @texline @math{n! = \Gamma(n+1)}. | 2997 | @texline @math{n! = \Gamma(n+1)}. |
| 2998 | @infoline @expr{@var{n}!@: = gamma(@var{n}+1)}. | 2998 | @infoline @expr{@var{n}!@: = gamma(@var{n}+1)}. |
| 2999 | 2999 | ||
| @@ -3283,11 +3283,11 @@ rows in the matrix is different from the number of elements in the | |||
| 3283 | vector. | 3283 | vector. |
| 3284 | 3284 | ||
| 3285 | (@bullet{}) @strong{Exercise 1.} Use @samp{*} to sum along the rows | 3285 | (@bullet{}) @strong{Exercise 1.} Use @samp{*} to sum along the rows |
| 3286 | of the above | 3286 | of the above |
| 3287 | @texline @math{2\times3} | 3287 | @texline @math{2\times3} |
| 3288 | @infoline 2x3 | 3288 | @infoline 2x3 |
| 3289 | matrix to get @expr{[6, 15]}. Now use @samp{*} to sum along the columns | 3289 | matrix to get @expr{[6, 15]}. Now use @samp{*} to sum along the columns |
| 3290 | to get @expr{[5, 7, 9]}. | 3290 | to get @expr{[5, 7, 9]}. |
| 3291 | @xref{Matrix Answer 1, 1}. (@bullet{}) | 3291 | @xref{Matrix Answer 1, 1}. (@bullet{}) |
| 3292 | 3292 | ||
| 3293 | @cindex Identity matrix | 3293 | @cindex Identity matrix |
| @@ -3432,7 +3432,7 @@ the matrix and vector. If we multiplied in the other order, Calc would | |||
| 3432 | assume the vector was a row vector in order to make the dimensions | 3432 | assume the vector was a row vector in order to make the dimensions |
| 3433 | come out right, and the answer would be incorrect. If you | 3433 | come out right, and the answer would be incorrect. If you |
| 3434 | don't feel safe letting Calc take either interpretation of your | 3434 | don't feel safe letting Calc take either interpretation of your |
| 3435 | vectors, use explicit | 3435 | vectors, use explicit |
| 3436 | @texline @math{N\times1} | 3436 | @texline @math{N\times1} |
| 3437 | @infoline Nx1 | 3437 | @infoline Nx1 |
| 3438 | or | 3438 | or |
| @@ -3482,9 +3482,9 @@ on the left by the transpose of @expr{A}: | |||
| 3482 | @tex | 3482 | @tex |
| 3483 | $A^T A \, X = A^T B$, where $A^T$ is the transpose \samp{trn(A)}. | 3483 | $A^T A \, X = A^T B$, where $A^T$ is the transpose \samp{trn(A)}. |
| 3484 | @end tex | 3484 | @end tex |
| 3485 | Now | 3485 | Now |
| 3486 | @texline @math{A^T A} | 3486 | @texline @math{A^T A} |
| 3487 | @infoline @expr{trn(A)*A} | 3487 | @infoline @expr{trn(A)*A} |
| 3488 | is a square matrix so a solution is possible. It turns out that the | 3488 | is a square matrix so a solution is possible. It turns out that the |
| 3489 | @expr{X} vector you compute in this way will be a ``least-squares'' | 3489 | @expr{X} vector you compute in this way will be a ``least-squares'' |
| 3490 | solution, which can be regarded as the ``closest'' solution to the set | 3490 | solution, which can be regarded as the ``closest'' solution to the set |
| @@ -3577,9 +3577,9 @@ other a plain number.) In the final step, we take the square root | |||
| 3577 | of each element. | 3577 | of each element. |
| 3578 | 3578 | ||
| 3579 | (@bullet{}) @strong{Exercise 1.} Compute a vector of powers of two | 3579 | (@bullet{}) @strong{Exercise 1.} Compute a vector of powers of two |
| 3580 | from | 3580 | from |
| 3581 | @texline @math{2^{-4}} | 3581 | @texline @math{2^{-4}} |
| 3582 | @infoline @expr{2^-4} | 3582 | @infoline @expr{2^-4} |
| 3583 | to @expr{2^4}. @xref{List Answer 1, 1}. (@bullet{}) | 3583 | to @expr{2^4}. @xref{List Answer 1, 1}. (@bullet{}) |
| 3584 | 3584 | ||
| 3585 | You can also @dfn{reduce} a binary operator across a vector. | 3585 | You can also @dfn{reduce} a binary operator across a vector. |
| @@ -3780,9 +3780,9 @@ $$ m = {N \sum x y - \sum x \sum y \over | |||
| 3780 | @end tex | 3780 | @end tex |
| 3781 | 3781 | ||
| 3782 | @noindent | 3782 | @noindent |
| 3783 | where | 3783 | where |
| 3784 | @texline @math{\sum x} | 3784 | @texline @math{\sum x} |
| 3785 | @infoline @expr{sum(x)} | 3785 | @infoline @expr{sum(x)} |
| 3786 | represents the sum of all the values of @expr{x}. While there is an | 3786 | represents the sum of all the values of @expr{x}. While there is an |
| 3787 | actual @code{sum} function in Calc, it's easier to sum a vector using a | 3787 | actual @code{sum} function in Calc, it's easier to sum a vector using a |
| 3788 | simple reduction. First, let's compute the four different sums that | 3788 | simple reduction. First, let's compute the four different sums that |
| @@ -3883,9 +3883,9 @@ $$ b = {\sum y - m \sum x \over N} $$ | |||
| 3883 | @end group | 3883 | @end group |
| 3884 | @end smallexample | 3884 | @end smallexample |
| 3885 | 3885 | ||
| 3886 | Let's ``plot'' this straight line approximation, | 3886 | Let's ``plot'' this straight line approximation, |
| 3887 | @texline @math{y \approx m x + b}, | 3887 | @texline @math{y \approx m x + b}, |
| 3888 | @infoline @expr{m x + b}, | 3888 | @infoline @expr{m x + b}, |
| 3889 | and compare it with the original data. | 3889 | and compare it with the original data. |
| 3890 | 3890 | ||
| 3891 | @smallexample | 3891 | @smallexample |
| @@ -3959,7 +3959,7 @@ Next, let's add the line we got from our least-squares fit. | |||
| 3959 | (If you are reading this tutorial on-line while running Calc, typing | 3959 | (If you are reading this tutorial on-line while running Calc, typing |
| 3960 | @kbd{g a} may cause the tutorial to disappear from its window and be | 3960 | @kbd{g a} may cause the tutorial to disappear from its window and be |
| 3961 | replaced by a buffer named @samp{*Gnuplot Commands*}. The tutorial | 3961 | replaced by a buffer named @samp{*Gnuplot Commands*}. The tutorial |
| 3962 | will reappear when you terminate GNUPLOT by typing @kbd{g q}.) | 3962 | will reappear when you terminate GNUPLOT by typing @kbd{g q}.) |
| 3963 | @end ifinfo | 3963 | @end ifinfo |
| 3964 | 3964 | ||
| 3965 | @smallexample | 3965 | @smallexample |
| @@ -4138,7 +4138,7 @@ command to enable multi-line display of vectors.) | |||
| 4138 | @c [fix-ref Numerical Solutions] | 4138 | @c [fix-ref Numerical Solutions] |
| 4139 | (@bullet{}) @strong{Exercise 8.} Compute a list of values of Bessel's | 4139 | (@bullet{}) @strong{Exercise 8.} Compute a list of values of Bessel's |
| 4140 | @texline @math{J_1(x)} | 4140 | @texline @math{J_1(x)} |
| 4141 | @infoline @expr{J1} | 4141 | @infoline @expr{J1} |
| 4142 | function @samp{besJ(1,x)} for @expr{x} from 0 to 5 in steps of 0.25. | 4142 | function @samp{besJ(1,x)} for @expr{x} from 0 to 5 in steps of 0.25. |
| 4143 | Find the value of @expr{x} (from among the above set of values) for | 4143 | Find the value of @expr{x} (from among the above set of values) for |
| 4144 | which @samp{besJ(1,x)} is a maximum. Use an ``automatic'' method, | 4144 | which @samp{besJ(1,x)} is a maximum. Use an ``automatic'' method, |
| @@ -4150,7 +4150,7 @@ of thing automatically; @pxref{Numerical Solutions}.) | |||
| 4150 | @cindex Digits, vectors of | 4150 | @cindex Digits, vectors of |
| 4151 | (@bullet{}) @strong{Exercise 9.} You are given an integer in the range | 4151 | (@bullet{}) @strong{Exercise 9.} You are given an integer in the range |
| 4152 | @texline @math{0 \le N < 10^m} | 4152 | @texline @math{0 \le N < 10^m} |
| 4153 | @infoline @expr{0 <= N < 10^m} | 4153 | @infoline @expr{0 <= N < 10^m} |
| 4154 | for @expr{m=12} (i.e., an integer of less than | 4154 | for @expr{m=12} (i.e., an integer of less than |
| 4155 | twelve digits). Convert this integer into a vector of @expr{m} | 4155 | twelve digits). Convert this integer into a vector of @expr{m} |
| 4156 | digits, each in the range from 0 to 9. In vector-of-digits notation, | 4156 | digits, each in the range from 0 to 9. In vector-of-digits notation, |
| @@ -4164,12 +4164,12 @@ to try is 25129925999. @xref{List Answer 9, 9}. (@bullet{}) | |||
| 4164 | happened? How would you do this test? @xref{List Answer 10, 10}. (@bullet{}) | 4164 | happened? How would you do this test? @xref{List Answer 10, 10}. (@bullet{}) |
| 4165 | 4165 | ||
| 4166 | (@bullet{}) @strong{Exercise 11.} The area of a circle of radius one | 4166 | (@bullet{}) @strong{Exercise 11.} The area of a circle of radius one |
| 4167 | is @cpi{}. The area of the | 4167 | is @cpi{}. The area of the |
| 4168 | @texline @math{2\times2} | 4168 | @texline @math{2\times2} |
| 4169 | @infoline 2x2 | 4169 | @infoline 2x2 |
| 4170 | square that encloses that circle is 4. So if we throw @var{n} darts at | 4170 | square that encloses that circle is 4. So if we throw @var{n} darts at |
| 4171 | random points in the square, about @cpiover{4} of them will land inside | 4171 | random points in the square, about @cpiover{4} of them will land inside |
| 4172 | the circle. This gives us an entertaining way to estimate the value of | 4172 | the circle. This gives us an entertaining way to estimate the value of |
| 4173 | @cpi{}. The @w{@kbd{k r}} | 4173 | @cpi{}. The @w{@kbd{k r}} |
| 4174 | command picks a random number between zero and the value on the stack. | 4174 | command picks a random number between zero and the value on the stack. |
| 4175 | We could get a random floating-point number between @mathit{-1} and 1 by typing | 4175 | We could get a random floating-point number between @mathit{-1} and 1 by typing |
| @@ -4183,12 +4183,12 @@ points lie inside the unit circle. Hint: Use the @kbd{v b} command. | |||
| 4183 | another way to calculate @cpi{}. Say you have an infinite field | 4183 | another way to calculate @cpi{}. Say you have an infinite field |
| 4184 | of vertical lines with a spacing of one inch. Toss a one-inch matchstick | 4184 | of vertical lines with a spacing of one inch. Toss a one-inch matchstick |
| 4185 | onto the field. The probability that the matchstick will land crossing | 4185 | onto the field. The probability that the matchstick will land crossing |
| 4186 | a line turns out to be | 4186 | a line turns out to be |
| 4187 | @texline @math{2/\pi}. | 4187 | @texline @math{2/\pi}. |
| 4188 | @infoline @expr{2/pi}. | 4188 | @infoline @expr{2/pi}. |
| 4189 | Toss 100 matchsticks to estimate @cpi{}. (If you want still more fun, | 4189 | Toss 100 matchsticks to estimate @cpi{}. (If you want still more fun, |
| 4190 | the probability that the GCD (@w{@kbd{k g}}) of two large integers is | 4190 | the probability that the GCD (@w{@kbd{k g}}) of two large integers is |
| 4191 | one turns out to be | 4191 | one turns out to be |
| 4192 | @texline @math{6/\pi^2}. | 4192 | @texline @math{6/\pi^2}. |
| 4193 | @infoline @expr{6/pi^2}. | 4193 | @infoline @expr{6/pi^2}. |
| 4194 | That provides yet another way to estimate @cpi{}.) | 4194 | That provides yet another way to estimate @cpi{}.) |
| @@ -4488,7 +4488,7 @@ a 60% chance that the result is correct within 0.59 degrees. | |||
| 4488 | @cindex Torus, volume of | 4488 | @cindex Torus, volume of |
| 4489 | (@bullet{}) @strong{Exercise 7.} The volume of a torus (a donut shape) is | 4489 | (@bullet{}) @strong{Exercise 7.} The volume of a torus (a donut shape) is |
| 4490 | @texline @math{2 \pi^2 R r^2} | 4490 | @texline @math{2 \pi^2 R r^2} |
| 4491 | @infoline @w{@expr{2 pi^2 R r^2}} | 4491 | @infoline @w{@expr{2 pi^2 R r^2}} |
| 4492 | where @expr{R} is the radius of the circle that | 4492 | where @expr{R} is the radius of the circle that |
| 4493 | defines the center of the tube and @expr{r} is the radius of the tube | 4493 | defines the center of the tube and @expr{r} is the radius of the tube |
| 4494 | itself. Suppose @expr{R} is 20 cm and @expr{r} is 4 cm, each known to | 4494 | itself. Suppose @expr{R} is 20 cm and @expr{r} is 4 cm, each known to |
| @@ -4569,7 +4569,7 @@ In this last step, Calc has divided by 5 modulo 24; i.e., it has found a | |||
| 4569 | new number which, when multiplied by 5 modulo 24, produces the original | 4569 | new number which, when multiplied by 5 modulo 24, produces the original |
| 4570 | number, 21. If @var{m} is prime and the divisor is not a multiple of | 4570 | number, 21. If @var{m} is prime and the divisor is not a multiple of |
| 4571 | @var{m}, it is always possible to find such a number. For non-prime | 4571 | @var{m}, it is always possible to find such a number. For non-prime |
| 4572 | @var{m} like 24, it is only sometimes possible. | 4572 | @var{m} like 24, it is only sometimes possible. |
| 4573 | 4573 | ||
| 4574 | @smallexample | 4574 | @smallexample |
| 4575 | @group | 4575 | @group |
| @@ -4587,7 +4587,7 @@ that arises in the second one. | |||
| 4587 | 4587 | ||
| 4588 | @cindex Fermat, primality test of | 4588 | @cindex Fermat, primality test of |
| 4589 | (@bullet{}) @strong{Exercise 10.} A theorem of Pierre de Fermat | 4589 | (@bullet{}) @strong{Exercise 10.} A theorem of Pierre de Fermat |
| 4590 | says that | 4590 | says that |
| 4591 | @texline @w{@math{x^{n-1} \bmod n = 1}} | 4591 | @texline @w{@math{x^{n-1} \bmod n = 1}} |
| 4592 | @infoline @expr{x^(n-1) mod n = 1} | 4592 | @infoline @expr{x^(n-1) mod n = 1} |
| 4593 | if @expr{n} is a prime number and @expr{x} is an integer less than | 4593 | if @expr{n} is a prime number and @expr{x} is an integer less than |
| @@ -4615,9 +4615,9 @@ of day on the stack as an HMS/modulo form. | |||
| 4615 | This calculation tells me it is six hours and 22 minutes until midnight. | 4615 | This calculation tells me it is six hours and 22 minutes until midnight. |
| 4616 | 4616 | ||
| 4617 | (@bullet{}) @strong{Exercise 11.} A rule of thumb is that one year | 4617 | (@bullet{}) @strong{Exercise 11.} A rule of thumb is that one year |
| 4618 | is about | 4618 | is about |
| 4619 | @texline @math{\pi \times 10^7} | 4619 | @texline @math{\pi \times 10^7} |
| 4620 | @infoline @w{@expr{pi * 10^7}} | 4620 | @infoline @w{@expr{pi * 10^7}} |
| 4621 | seconds. What time will it be that many seconds from right now? | 4621 | seconds. What time will it be that many seconds from right now? |
| 4622 | @xref{Types Answer 11, 11}. (@bullet{}) | 4622 | @xref{Types Answer 11, 11}. (@bullet{}) |
| 4623 | 4623 | ||
| @@ -5093,18 +5093,18 @@ One way to do it is again with vector mapping and reduction: | |||
| 5093 | @end smallexample | 5093 | @end smallexample |
| 5094 | 5094 | ||
| 5095 | (@bullet{}) @strong{Exercise 3.} Find the integral from 1 to @expr{y} | 5095 | (@bullet{}) @strong{Exercise 3.} Find the integral from 1 to @expr{y} |
| 5096 | of | 5096 | of |
| 5097 | @texline @math{x \sin \pi x} | 5097 | @texline @math{x \sin \pi x} |
| 5098 | @infoline @w{@expr{x sin(pi x)}} | 5098 | @infoline @w{@expr{x sin(pi x)}} |
| 5099 | (where the sine is calculated in radians). Find the values of the | 5099 | (where the sine is calculated in radians). Find the values of the |
| 5100 | integral for integers @expr{y} from 1 to 5. @xref{Algebra Answer 3, | 5100 | integral for integers @expr{y} from 1 to 5. @xref{Algebra Answer 3, |
| 5101 | 3}. (@bullet{}) | 5101 | 3}. (@bullet{}) |
| 5102 | 5102 | ||
| 5103 | Calc's integrator can do many simple integrals symbolically, but many | 5103 | Calc's integrator can do many simple integrals symbolically, but many |
| 5104 | others are beyond its capabilities. Suppose we wish to find the area | 5104 | others are beyond its capabilities. Suppose we wish to find the area |
| 5105 | under the curve | 5105 | under the curve |
| 5106 | @texline @math{\sin x \ln x} | 5106 | @texline @math{\sin x \ln x} |
| 5107 | @infoline @expr{sin(x) ln(x)} | 5107 | @infoline @expr{sin(x) ln(x)} |
| 5108 | over the same range of @expr{x}. If you entered this formula and typed | 5108 | over the same range of @expr{x}. If you entered this formula and typed |
| 5109 | @kbd{a i x @key{RET}} (don't bother to try this), Calc would work for a | 5109 | @kbd{a i x @key{RET}} (don't bother to try this), Calc would work for a |
| 5110 | long time but would be unable to find a solution. In fact, there is no | 5110 | long time but would be unable to find a solution. In fact, there is no |
| @@ -5242,10 +5242,10 @@ $$ h (f(a) + f(a+h) + f(a+2h) + f(a+3h) + \cdots | |||
| 5242 | \afterdisplay | 5242 | \afterdisplay |
| 5243 | @end tex | 5243 | @end tex |
| 5244 | 5244 | ||
| 5245 | Compute the integral from 1 to 2 of | 5245 | Compute the integral from 1 to 2 of |
| 5246 | @texline @math{\sin x \ln x} | 5246 | @texline @math{\sin x \ln x} |
| 5247 | @infoline @expr{sin(x) ln(x)} | 5247 | @infoline @expr{sin(x) ln(x)} |
| 5248 | using Simpson's rule with 10 slices. | 5248 | using Simpson's rule with 10 slices. |
| 5249 | @xref{Algebra Answer 4, 4}. (@bullet{}) | 5249 | @xref{Algebra Answer 4, 4}. (@bullet{}) |
| 5250 | 5250 | ||
| 5251 | Calc has a built-in @kbd{a I} command for doing numerical integration. | 5251 | Calc has a built-in @kbd{a I} command for doing numerical integration. |
| @@ -5396,7 +5396,7 @@ having to retype it. | |||
| 5396 | 5396 | ||
| 5397 | To edit a variable, type @kbd{s e} and the variable name, use regular | 5397 | To edit a variable, type @kbd{s e} and the variable name, use regular |
| 5398 | Emacs editing commands as necessary, then type @kbd{C-c C-c} to store | 5398 | Emacs editing commands as necessary, then type @kbd{C-c C-c} to store |
| 5399 | the edited value back into the variable. | 5399 | the edited value back into the variable. |
| 5400 | You can also use @w{@kbd{s e}} to create a new variable if you wish. | 5400 | You can also use @w{@kbd{s e}} to create a new variable if you wish. |
| 5401 | 5401 | ||
| 5402 | Notice that the first time you use each rule, Calc puts up a ``compiling'' | 5402 | Notice that the first time you use each rule, Calc puts up a ``compiling'' |
| @@ -5780,7 +5780,7 @@ in @samp{a + 1} for @samp{x} in the defining formula. | |||
| 5780 | @tindex Si | 5780 | @tindex Si |
| 5781 | (@bullet{}) @strong{Exercise 1.} The ``sine integral'' function | 5781 | (@bullet{}) @strong{Exercise 1.} The ``sine integral'' function |
| 5782 | @texline @math{{\rm Si}(x)} | 5782 | @texline @math{{\rm Si}(x)} |
| 5783 | @infoline @expr{Si(x)} | 5783 | @infoline @expr{Si(x)} |
| 5784 | is defined as the integral of @samp{sin(t)/t} for | 5784 | is defined as the integral of @samp{sin(t)/t} for |
| 5785 | @expr{t = 0} to @expr{x} in radians. (It was invented because this | 5785 | @expr{t = 0} to @expr{x} in radians. (It was invented because this |
| 5786 | integral has no solution in terms of basic functions; if you give it | 5786 | integral has no solution in terms of basic functions; if you give it |
| @@ -5857,9 +5857,9 @@ the following functions: | |||
| 5857 | 5857 | ||
| 5858 | @enumerate | 5858 | @enumerate |
| 5859 | @item | 5859 | @item |
| 5860 | Compute | 5860 | Compute |
| 5861 | @texline @math{\displaystyle{\sin x \over x}}, | 5861 | @texline @math{\displaystyle{\sin x \over x}}, |
| 5862 | @infoline @expr{sin(x) / x}, | 5862 | @infoline @expr{sin(x) / x}, |
| 5863 | where @expr{x} is the number on the top of the stack. | 5863 | where @expr{x} is the number on the top of the stack. |
| 5864 | 5864 | ||
| 5865 | @item | 5865 | @item |
| @@ -5923,15 +5923,15 @@ key if you have one, makes a copy of the number in level 2.) | |||
| 5923 | @cindex Golden ratio | 5923 | @cindex Golden ratio |
| 5924 | @cindex Phi, golden ratio | 5924 | @cindex Phi, golden ratio |
| 5925 | A fascinating property of the Fibonacci numbers is that the @expr{n}th | 5925 | A fascinating property of the Fibonacci numbers is that the @expr{n}th |
| 5926 | Fibonacci number can be found directly by computing | 5926 | Fibonacci number can be found directly by computing |
| 5927 | @texline @math{\phi^n / \sqrt{5}} | 5927 | @texline @math{\phi^n / \sqrt{5}} |
| 5928 | @infoline @expr{phi^n / sqrt(5)} | 5928 | @infoline @expr{phi^n / sqrt(5)} |
| 5929 | and then rounding to the nearest integer, where | 5929 | and then rounding to the nearest integer, where |
| 5930 | @texline @math{\phi} (``phi''), | 5930 | @texline @math{\phi} (``phi''), |
| 5931 | @infoline @expr{phi}, | 5931 | @infoline @expr{phi}, |
| 5932 | the ``golden ratio,'' is | 5932 | the ``golden ratio,'' is |
| 5933 | @texline @math{(1 + \sqrt{5}) / 2}. | 5933 | @texline @math{(1 + \sqrt{5}) / 2}. |
| 5934 | @infoline @expr{(1 + sqrt(5)) / 2}. | 5934 | @infoline @expr{(1 + sqrt(5)) / 2}. |
| 5935 | (For convenience, this constant is available from the @code{phi} | 5935 | (For convenience, this constant is available from the @code{phi} |
| 5936 | variable, or the @kbd{I H P} command.) | 5936 | variable, or the @kbd{I H P} command.) |
| 5937 | 5937 | ||
| @@ -5946,19 +5946,19 @@ variable, or the @kbd{I H P} command.) | |||
| 5946 | 5946 | ||
| 5947 | @cindex Continued fractions | 5947 | @cindex Continued fractions |
| 5948 | (@bullet{}) @strong{Exercise 5.} The @dfn{continued fraction} | 5948 | (@bullet{}) @strong{Exercise 5.} The @dfn{continued fraction} |
| 5949 | representation of | 5949 | representation of |
| 5950 | @texline @math{\phi} | 5950 | @texline @math{\phi} |
| 5951 | @infoline @expr{phi} | 5951 | @infoline @expr{phi} |
| 5952 | is | 5952 | is |
| 5953 | @texline @math{1 + 1/(1 + 1/(1 + 1/( \ldots )))}. | 5953 | @texline @math{1 + 1/(1 + 1/(1 + 1/( \ldots )))}. |
| 5954 | @infoline @expr{1 + 1/(1 + 1/(1 + 1/( ...@: )))}. | 5954 | @infoline @expr{1 + 1/(1 + 1/(1 + 1/( ...@: )))}. |
| 5955 | We can compute an approximate value by carrying this however far | 5955 | We can compute an approximate value by carrying this however far |
| 5956 | and then replacing the innermost | 5956 | and then replacing the innermost |
| 5957 | @texline @math{1/( \ldots )} | 5957 | @texline @math{1/( \ldots )} |
| 5958 | @infoline @expr{1/( ...@: )} | 5958 | @infoline @expr{1/( ...@: )} |
| 5959 | by 1. Approximate | 5959 | by 1. Approximate |
| 5960 | @texline @math{\phi} | 5960 | @texline @math{\phi} |
| 5961 | @infoline @expr{phi} | 5961 | @infoline @expr{phi} |
| 5962 | using a twenty-term continued fraction. | 5962 | using a twenty-term continued fraction. |
| 5963 | @xref{Programming Answer 5, 5}. (@bullet{}) | 5963 | @xref{Programming Answer 5, 5}. (@bullet{}) |
| 5964 | 5964 | ||
| @@ -6056,9 +6056,9 @@ survive past the @kbd{Z '} command. | |||
| 6056 | The @dfn{Bernoulli numbers} are a sequence with the interesting | 6056 | The @dfn{Bernoulli numbers} are a sequence with the interesting |
| 6057 | property that all of the odd Bernoulli numbers are zero, and the | 6057 | property that all of the odd Bernoulli numbers are zero, and the |
| 6058 | even ones, while difficult to compute, can be roughly approximated | 6058 | even ones, while difficult to compute, can be roughly approximated |
| 6059 | by the formula | 6059 | by the formula |
| 6060 | @texline @math{\displaystyle{2 n! \over (2 \pi)^n}}. | 6060 | @texline @math{\displaystyle{2 n! \over (2 \pi)^n}}. |
| 6061 | @infoline @expr{2 n!@: / (2 pi)^n}. | 6061 | @infoline @expr{2 n!@: / (2 pi)^n}. |
| 6062 | Let's write a keyboard macro to compute (approximate) Bernoulli numbers. | 6062 | Let's write a keyboard macro to compute (approximate) Bernoulli numbers. |
| 6063 | (Calc has a command, @kbd{k b}, to compute exact Bernoulli numbers, but | 6063 | (Calc has a command, @kbd{k b}, to compute exact Bernoulli numbers, but |
| 6064 | this command is very slow for large @expr{n} since the higher Bernoulli | 6064 | this command is very slow for large @expr{n} since the higher Bernoulli |
| @@ -6166,7 +6166,7 @@ Z` ;; calc-kbd-push (Save local values) | |||
| 6166 | 0 ;; calc digits (Push a zero onto the stack) | 6166 | 0 ;; calc digits (Push a zero onto the stack) |
| 6167 | st ;; calc-store-into (Store it in the following variable) | 6167 | st ;; calc-store-into (Store it in the following variable) |
| 6168 | 1 ;; calc quick variable (Quick variable q1) | 6168 | 1 ;; calc quick variable (Quick variable q1) |
| 6169 | 1 ;; calc digits (Initial value for the loop) | 6169 | 1 ;; calc digits (Initial value for the loop) |
| 6170 | TAB ;; calc-roll-down (Swap initial and final) | 6170 | TAB ;; calc-roll-down (Swap initial and final) |
| 6171 | Z( ;; calc-kbd-for (Begin the "for" loop) | 6171 | Z( ;; calc-kbd-for (Begin the "for" loop) |
| 6172 | & ;; calc-inv (Take the reciprocal) | 6172 | & ;; calc-inv (Take the reciprocal) |
| @@ -6193,10 +6193,10 @@ Press @kbd{C-c C-c} to finish editing and return to the Calculator. | |||
| 6193 | 6193 | ||
| 6194 | The @file{edmacro} package defines a handy @code{read-kbd-macro} command | 6194 | The @file{edmacro} package defines a handy @code{read-kbd-macro} command |
| 6195 | which reads the current region of the current buffer as a sequence of | 6195 | which reads the current region of the current buffer as a sequence of |
| 6196 | keystroke names, and defines that sequence on the @kbd{X} | 6196 | keystroke names, and defines that sequence on the @kbd{X} |
| 6197 | (and @kbd{C-x e}) key. Because this is so useful, Calc puts this | 6197 | (and @kbd{C-x e}) key. Because this is so useful, Calc puts this |
| 6198 | command on the @kbd{C-x * m} key. Try reading in this macro in the | 6198 | command on the @kbd{C-x * m} key. Try reading in this macro in the |
| 6199 | following form: Press @kbd{C-@@} (or @kbd{C-@key{SPC}}) at | 6199 | following form: Press @kbd{C-@@} (or @kbd{C-@key{SPC}}) at |
| 6200 | one end of the text below, then type @kbd{C-x * m} at the other. | 6200 | one end of the text below, then type @kbd{C-x * m} at the other. |
| 6201 | 6201 | ||
| 6202 | @example | 6202 | @example |
| @@ -6230,12 +6230,12 @@ $$ x_{\rm new} = x - {f(x) \over f^{\prime}(x)} $$ | |||
| 6230 | where @expr{f'(x)} is the derivative of @expr{f}. The @expr{x} | 6230 | where @expr{f'(x)} is the derivative of @expr{f}. The @expr{x} |
| 6231 | values will quickly converge to a solution, i.e., eventually | 6231 | values will quickly converge to a solution, i.e., eventually |
| 6232 | @texline @math{x_{\rm new}} | 6232 | @texline @math{x_{\rm new}} |
| 6233 | @infoline @expr{new_x} | 6233 | @infoline @expr{new_x} |
| 6234 | and @expr{x} will be equal to within the limits | 6234 | and @expr{x} will be equal to within the limits |
| 6235 | of the current precision. Write a program which takes a formula | 6235 | of the current precision. Write a program which takes a formula |
| 6236 | involving the variable @expr{x}, and an initial guess @expr{x_0}, | 6236 | involving the variable @expr{x}, and an initial guess @expr{x_0}, |
| 6237 | on the stack, and produces a value of @expr{x} for which the formula | 6237 | on the stack, and produces a value of @expr{x} for which the formula |
| 6238 | is zero. Use it to find a solution of | 6238 | is zero. Use it to find a solution of |
| 6239 | @texline @math{\sin(\cos x) = 0.5} | 6239 | @texline @math{\sin(\cos x) = 0.5} |
| 6240 | @infoline @expr{sin(cos(x)) = 0.5} | 6240 | @infoline @expr{sin(cos(x)) = 0.5} |
| 6241 | near @expr{x = 4.5}. (Use angles measured in radians.) Note that | 6241 | near @expr{x = 4.5}. (Use angles measured in radians.) Note that |
| @@ -6245,12 +6245,12 @@ method when it is able. @xref{Programming Answer 8, 8}. (@bullet{}) | |||
| 6245 | @cindex Digamma function | 6245 | @cindex Digamma function |
| 6246 | @cindex Gamma constant, Euler's | 6246 | @cindex Gamma constant, Euler's |
| 6247 | @cindex Euler's gamma constant | 6247 | @cindex Euler's gamma constant |
| 6248 | (@bullet{}) @strong{Exercise 9.} The @dfn{digamma} function | 6248 | (@bullet{}) @strong{Exercise 9.} The @dfn{digamma} function |
| 6249 | @texline @math{\psi(z) (``psi'')} | 6249 | @texline @math{\psi(z) (``psi'')} |
| 6250 | @infoline @expr{psi(z)} | 6250 | @infoline @expr{psi(z)} |
| 6251 | is defined as the derivative of | 6251 | is defined as the derivative of |
| 6252 | @texline @math{\ln \Gamma(z)}. | 6252 | @texline @math{\ln \Gamma(z)}. |
| 6253 | @infoline @expr{ln(gamma(z))}. | 6253 | @infoline @expr{ln(gamma(z))}. |
| 6254 | For large values of @expr{z}, it can be approximated by the infinite sum | 6254 | For large values of @expr{z}, it can be approximated by the infinite sum |
| 6255 | 6255 | ||
| 6256 | @ifnottex | 6256 | @ifnottex |
| @@ -6267,9 +6267,9 @@ $$ | |||
| 6267 | @end tex | 6267 | @end tex |
| 6268 | 6268 | ||
| 6269 | @noindent | 6269 | @noindent |
| 6270 | where | 6270 | where |
| 6271 | @texline @math{\sum} | 6271 | @texline @math{\sum} |
| 6272 | @infoline @expr{sum} | 6272 | @infoline @expr{sum} |
| 6273 | represents the sum over @expr{n} from 1 to infinity | 6273 | represents the sum over @expr{n} from 1 to infinity |
| 6274 | (or to some limit high enough to give the desired accuracy), and | 6274 | (or to some limit high enough to give the desired accuracy), and |
| 6275 | the @code{bern} function produces (exact) Bernoulli numbers. | 6275 | the @code{bern} function produces (exact) Bernoulli numbers. |
| @@ -6277,27 +6277,27 @@ While this sum is not guaranteed to converge, in practice it is safe. | |||
| 6277 | An interesting mathematical constant is Euler's gamma, which is equal | 6277 | An interesting mathematical constant is Euler's gamma, which is equal |
| 6278 | to about 0.5772. One way to compute it is by the formula, | 6278 | to about 0.5772. One way to compute it is by the formula, |
| 6279 | @texline @math{\gamma = -\psi(1)}. | 6279 | @texline @math{\gamma = -\psi(1)}. |
| 6280 | @infoline @expr{gamma = -psi(1)}. | 6280 | @infoline @expr{gamma = -psi(1)}. |
| 6281 | Unfortunately, 1 isn't a large enough argument | 6281 | Unfortunately, 1 isn't a large enough argument |
| 6282 | for the above formula to work (5 is a much safer value for @expr{z}). | 6282 | for the above formula to work (5 is a much safer value for @expr{z}). |
| 6283 | Fortunately, we can compute | 6283 | Fortunately, we can compute |
| 6284 | @texline @math{\psi(1)} | 6284 | @texline @math{\psi(1)} |
| 6285 | @infoline @expr{psi(1)} | 6285 | @infoline @expr{psi(1)} |
| 6286 | from | 6286 | from |
| 6287 | @texline @math{\psi(5)} | 6287 | @texline @math{\psi(5)} |
| 6288 | @infoline @expr{psi(5)} | 6288 | @infoline @expr{psi(5)} |
| 6289 | using the recurrence | 6289 | using the recurrence |
| 6290 | @texline @math{\psi(z+1) = \psi(z) + {1 \over z}}. | 6290 | @texline @math{\psi(z+1) = \psi(z) + {1 \over z}}. |
| 6291 | @infoline @expr{psi(z+1) = psi(z) + 1/z}. | 6291 | @infoline @expr{psi(z+1) = psi(z) + 1/z}. |
| 6292 | Your task: Develop a program to compute | 6292 | Your task: Develop a program to compute |
| 6293 | @texline @math{\psi(z)}; | 6293 | @texline @math{\psi(z)}; |
| 6294 | @infoline @expr{psi(z)}; | 6294 | @infoline @expr{psi(z)}; |
| 6295 | it should ``pump up'' @expr{z} | 6295 | it should ``pump up'' @expr{z} |
| 6296 | if necessary to be greater than 5, then use the above summation | 6296 | if necessary to be greater than 5, then use the above summation |
| 6297 | formula. Use looping commands to compute the sum. Use your function | 6297 | formula. Use looping commands to compute the sum. Use your function |
| 6298 | to compute | 6298 | to compute |
| 6299 | @texline @math{\gamma} | 6299 | @texline @math{\gamma} |
| 6300 | @infoline @expr{gamma} | 6300 | @infoline @expr{gamma} |
| 6301 | to twelve decimal places. (Calc has a built-in command | 6301 | to twelve decimal places. (Calc has a built-in command |
| 6302 | for Euler's constant, @kbd{I P}, which you can use to check your answer.) | 6302 | for Euler's constant, @kbd{I P}, which you can use to check your answer.) |
| 6303 | @xref{Programming Answer 9, 9}. (@bullet{}) | 6303 | @xref{Programming Answer 9, 9}. (@bullet{}) |
| @@ -6470,7 +6470,7 @@ This section includes answers to all the exercises in the Calc tutorial. | |||
| 6470 | @noindent | 6470 | @noindent |
| 6471 | @kbd{1 @key{RET} 2 @key{RET} 3 @key{RET} 4 + * -} | 6471 | @kbd{1 @key{RET} 2 @key{RET} 3 @key{RET} 4 + * -} |
| 6472 | 6472 | ||
| 6473 | The result is | 6473 | The result is |
| 6474 | @texline @math{1 - (2 \times (3 + 4)) = -13}. | 6474 | @texline @math{1 - (2 \times (3 + 4)) = -13}. |
| 6475 | @infoline @expr{1 - (2 * (3 + 4)) = -13}. | 6475 | @infoline @expr{1 - (2 * (3 + 4)) = -13}. |
| 6476 | 6476 | ||
| @@ -6481,9 +6481,9 @@ The result is | |||
| 6481 | @texline @math{2\times4 + 7\times9.5 + {5\over4} = 75.75} | 6481 | @texline @math{2\times4 + 7\times9.5 + {5\over4} = 75.75} |
| 6482 | @infoline @expr{2*4 + 7*9.5 + 5/4 = 75.75} | 6482 | @infoline @expr{2*4 + 7*9.5 + 5/4 = 75.75} |
| 6483 | 6483 | ||
| 6484 | After computing the intermediate term | 6484 | After computing the intermediate term |
| 6485 | @texline @math{2\times4 = 8}, | 6485 | @texline @math{2\times4 = 8}, |
| 6486 | @infoline @expr{2*4 = 8}, | 6486 | @infoline @expr{2*4 = 8}, |
| 6487 | you can leave that result on the stack while you compute the second | 6487 | you can leave that result on the stack while you compute the second |
| 6488 | term. With both of these results waiting on the stack you can then | 6488 | term. With both of these results waiting on the stack you can then |
| 6489 | compute the final term, then press @kbd{+ +} to add everything up. | 6489 | compute the final term, then press @kbd{+ +} to add everything up. |
| @@ -6790,7 +6790,7 @@ Dividing two integers that are larger than the current precision may | |||
| 6790 | give a floating-point result that is inaccurate even when rounded | 6790 | give a floating-point result that is inaccurate even when rounded |
| 6791 | down to an integer. Consider @expr{123456789 / 2} when the current | 6791 | down to an integer. Consider @expr{123456789 / 2} when the current |
| 6792 | precision is 6 digits. The true answer is @expr{61728394.5}, but | 6792 | precision is 6 digits. The true answer is @expr{61728394.5}, but |
| 6793 | with a precision of 6 this will be rounded to | 6793 | with a precision of 6 this will be rounded to |
| 6794 | @texline @math{12345700.0/2.0 = 61728500.0}. | 6794 | @texline @math{12345700.0/2.0 = 61728500.0}. |
| 6795 | @infoline @expr{12345700.@: / 2.@: = 61728500.}. | 6795 | @infoline @expr{12345700.@: / 2.@: = 61728500.}. |
| 6796 | The result, when converted to an integer, will be off by 106. | 6796 | The result, when converted to an integer, will be off by 106. |
| @@ -6900,18 +6900,18 @@ Type @kbd{d N} to return to Normal display mode afterwards. | |||
| 6900 | @subsection Matrix Tutorial Exercise 3 | 6900 | @subsection Matrix Tutorial Exercise 3 |
| 6901 | 6901 | ||
| 6902 | @noindent | 6902 | @noindent |
| 6903 | To solve | 6903 | To solve |
| 6904 | @texline @math{A^T A \, X = A^T B}, | 6904 | @texline @math{A^T A \, X = A^T B}, |
| 6905 | @infoline @expr{trn(A) * A * X = trn(A) * B}, | 6905 | @infoline @expr{trn(A) * A * X = trn(A) * B}, |
| 6906 | first we compute | 6906 | first we compute |
| 6907 | @texline @math{A' = A^T A} | 6907 | @texline @math{A' = A^T A} |
| 6908 | @infoline @expr{A2 = trn(A) * A} | 6908 | @infoline @expr{A2 = trn(A) * A} |
| 6909 | and | 6909 | and |
| 6910 | @texline @math{B' = A^T B}; | 6910 | @texline @math{B' = A^T B}; |
| 6911 | @infoline @expr{B2 = trn(A) * B}; | 6911 | @infoline @expr{B2 = trn(A) * B}; |
| 6912 | now, we have a system | 6912 | now, we have a system |
| 6913 | @texline @math{A' X = B'} | 6913 | @texline @math{A' X = B'} |
| 6914 | @infoline @expr{A2 * X = B2} | 6914 | @infoline @expr{A2 * X = B2} |
| 6915 | which we can solve using Calc's @samp{/} command. | 6915 | which we can solve using Calc's @samp{/} command. |
| 6916 | 6916 | ||
| 6917 | @ifnottex | 6917 | @ifnottex |
| @@ -6942,7 +6942,7 @@ $$ | |||
| 6942 | The first step is to enter the coefficient matrix. We'll store it in | 6942 | The first step is to enter the coefficient matrix. We'll store it in |
| 6943 | quick variable number 7 for later reference. Next, we compute the | 6943 | quick variable number 7 for later reference. Next, we compute the |
| 6944 | @texline @math{B'} | 6944 | @texline @math{B'} |
| 6945 | @infoline @expr{B2} | 6945 | @infoline @expr{B2} |
| 6946 | vector. | 6946 | vector. |
| 6947 | 6947 | ||
| 6948 | @smallexample | 6948 | @smallexample |
| @@ -6958,9 +6958,9 @@ vector. | |||
| 6958 | @end smallexample | 6958 | @end smallexample |
| 6959 | 6959 | ||
| 6960 | @noindent | 6960 | @noindent |
| 6961 | Now we compute the matrix | 6961 | Now we compute the matrix |
| 6962 | @texline @math{A'} | 6962 | @texline @math{A'} |
| 6963 | @infoline @expr{A2} | 6963 | @infoline @expr{A2} |
| 6964 | and divide. | 6964 | and divide. |
| 6965 | 6965 | ||
| 6966 | @smallexample | 6966 | @smallexample |
| @@ -6979,16 +6979,16 @@ and divide. | |||
| 6979 | (The actual computed answer will be slightly inexact due to | 6979 | (The actual computed answer will be slightly inexact due to |
| 6980 | round-off error.) | 6980 | round-off error.) |
| 6981 | 6981 | ||
| 6982 | Notice that the answers are similar to those for the | 6982 | Notice that the answers are similar to those for the |
| 6983 | @texline @math{3\times3} | 6983 | @texline @math{3\times3} |
| 6984 | @infoline 3x3 | 6984 | @infoline 3x3 |
| 6985 | system solved in the text. That's because the fourth equation that was | 6985 | system solved in the text. That's because the fourth equation that was |
| 6986 | added to the system is almost identical to the first one multiplied | 6986 | added to the system is almost identical to the first one multiplied |
| 6987 | by two. (If it were identical, we would have gotten the exact same | 6987 | by two. (If it were identical, we would have gotten the exact same |
| 6988 | answer since the | 6988 | answer since the |
| 6989 | @texline @math{4\times3} | 6989 | @texline @math{4\times3} |
| 6990 | @infoline 4x3 | 6990 | @infoline 4x3 |
| 6991 | system would be equivalent to the original | 6991 | system would be equivalent to the original |
| 6992 | @texline @math{3\times3} | 6992 | @texline @math{3\times3} |
| 6993 | @infoline 3x3 | 6993 | @infoline 3x3 |
| 6994 | system.) | 6994 | system.) |
| @@ -7064,7 +7064,7 @@ $$ m \times x + b \times 1 = y $$ | |||
| 7064 | \afterdisplay | 7064 | \afterdisplay |
| 7065 | @end tex | 7065 | @end tex |
| 7066 | 7066 | ||
| 7067 | Thus we want a | 7067 | Thus we want a |
| 7068 | @texline @math{19\times2} | 7068 | @texline @math{19\times2} |
| 7069 | @infoline 19x2 | 7069 | @infoline 19x2 |
| 7070 | matrix with our @expr{x} vector as one column and | 7070 | matrix with our @expr{x} vector as one column and |
| @@ -7083,12 +7083,12 @@ we combine the two columns to form our @expr{A} matrix. | |||
| 7083 | @end smallexample | 7083 | @end smallexample |
| 7084 | 7084 | ||
| 7085 | @noindent | 7085 | @noindent |
| 7086 | Now we compute | 7086 | Now we compute |
| 7087 | @texline @math{A^T y} | 7087 | @texline @math{A^T y} |
| 7088 | @infoline @expr{trn(A) * y} | 7088 | @infoline @expr{trn(A) * y} |
| 7089 | and | 7089 | and |
| 7090 | @texline @math{A^T A} | 7090 | @texline @math{A^T A} |
| 7091 | @infoline @expr{trn(A) * A} | 7091 | @infoline @expr{trn(A) * A} |
| 7092 | and divide. | 7092 | and divide. |
| 7093 | 7093 | ||
| 7094 | @smallexample | 7094 | @smallexample |
| @@ -7114,9 +7114,9 @@ and divide. | |||
| 7114 | @end group | 7114 | @end group |
| 7115 | @end smallexample | 7115 | @end smallexample |
| 7116 | 7116 | ||
| 7117 | Since we were solving equations of the form | 7117 | Since we were solving equations of the form |
| 7118 | @texline @math{m \times x + b \times 1 = y}, | 7118 | @texline @math{m \times x + b \times 1 = y}, |
| 7119 | @infoline @expr{m*x + b*1 = y}, | 7119 | @infoline @expr{m*x + b*1 = y}, |
| 7120 | these numbers should be @expr{m} and @expr{b}, respectively. Sure | 7120 | these numbers should be @expr{m} and @expr{b}, respectively. Sure |
| 7121 | enough, they agree exactly with the result computed using @kbd{V M} and | 7121 | enough, they agree exactly with the result computed using @kbd{V M} and |
| 7122 | @kbd{V R}! | 7122 | @kbd{V R}! |
| @@ -7177,9 +7177,9 @@ then raise the number to that power.) | |||
| 7177 | @subsection List Tutorial Exercise 4 | 7177 | @subsection List Tutorial Exercise 4 |
| 7178 | 7178 | ||
| 7179 | @noindent | 7179 | @noindent |
| 7180 | A number @expr{j} is a divisor of @expr{n} if | 7180 | A number @expr{j} is a divisor of @expr{n} if |
| 7181 | @texline @math{n \mathbin{\hbox{\code{\%}}} j = 0}. | 7181 | @texline @math{n \mathbin{\hbox{\code{\%}}} j = 0}. |
| 7182 | @infoline @samp{n % j = 0}. | 7182 | @infoline @samp{n % j = 0}. |
| 7183 | The first step is to get a vector that identifies the divisors. | 7183 | The first step is to get a vector that identifies the divisors. |
| 7184 | 7184 | ||
| 7185 | @smallexample | 7185 | @smallexample |
| @@ -7248,9 +7248,9 @@ so that the mapping operation works; no prime factor will ever be | |||
| 7248 | zero, so adding zeros on the left and right is safe. From then on | 7248 | zero, so adding zeros on the left and right is safe. From then on |
| 7249 | the job is pretty straightforward. | 7249 | the job is pretty straightforward. |
| 7250 | 7250 | ||
| 7251 | Incidentally, Calc provides the | 7251 | Incidentally, Calc provides the |
| 7252 | @texline @dfn{M@"obius} @math{\mu} | 7252 | @texline @dfn{M@"obius} @math{\mu} |
| 7253 | @infoline @dfn{Moebius mu} | 7253 | @infoline @dfn{Moebius mu} |
| 7254 | function which is zero if and only if its argument is square-free. It | 7254 | function which is zero if and only if its argument is square-free. It |
| 7255 | would be a much more convenient way to do the above test in practice. | 7255 | would be a much more convenient way to do the above test in practice. |
| 7256 | 7256 | ||
| @@ -7282,7 +7282,7 @@ exercise and type @kbd{1 -} to subtract one from all the elements. | |||
| 7282 | The numbers down the lefthand edge of the list we desire are called | 7282 | The numbers down the lefthand edge of the list we desire are called |
| 7283 | the ``triangular numbers'' (now you know why!). The @expr{n}th | 7283 | the ``triangular numbers'' (now you know why!). The @expr{n}th |
| 7284 | triangular number is the sum of the integers from 1 to @expr{n}, and | 7284 | triangular number is the sum of the integers from 1 to @expr{n}, and |
| 7285 | can be computed directly by the formula | 7285 | can be computed directly by the formula |
| 7286 | @texline @math{n (n+1) \over 2}. | 7286 | @texline @math{n (n+1) \over 2}. |
| 7287 | @infoline @expr{n * (n+1) / 2}. | 7287 | @infoline @expr{n * (n+1) / 2}. |
| 7288 | 7288 | ||
| @@ -7378,7 +7378,7 @@ A way to isolate the maximum value is to compute the maximum using | |||
| 7378 | 7378 | ||
| 7379 | @noindent | 7379 | @noindent |
| 7380 | It's a good idea to verify, as in the last step above, that only | 7380 | It's a good idea to verify, as in the last step above, that only |
| 7381 | one value is equal to the maximum. (After all, a plot of | 7381 | one value is equal to the maximum. (After all, a plot of |
| 7382 | @texline @math{\sin x} | 7382 | @texline @math{\sin x} |
| 7383 | @infoline @expr{sin(x)} | 7383 | @infoline @expr{sin(x)} |
| 7384 | might have many points all equal to the maximum value, 1.) | 7384 | might have many points all equal to the maximum value, 1.) |
| @@ -7650,12 +7650,12 @@ return to full-sized display of vectors. | |||
| 7650 | This problem can be made a lot easier by taking advantage of some | 7650 | This problem can be made a lot easier by taking advantage of some |
| 7651 | symmetries. First of all, after some thought it's clear that the | 7651 | symmetries. First of all, after some thought it's clear that the |
| 7652 | @expr{y} axis can be ignored altogether. Just pick a random @expr{x} | 7652 | @expr{y} axis can be ignored altogether. Just pick a random @expr{x} |
| 7653 | component for one end of the match, pick a random direction | 7653 | component for one end of the match, pick a random direction |
| 7654 | @texline @math{\theta}, | 7654 | @texline @math{\theta}, |
| 7655 | @infoline @expr{theta}, | 7655 | @infoline @expr{theta}, |
| 7656 | and see if @expr{x} and | 7656 | and see if @expr{x} and |
| 7657 | @texline @math{x + \cos \theta} | 7657 | @texline @math{x + \cos \theta} |
| 7658 | @infoline @expr{x + cos(theta)} | 7658 | @infoline @expr{x + cos(theta)} |
| 7659 | (which is the @expr{x} coordinate of the other endpoint) cross a line. | 7659 | (which is the @expr{x} coordinate of the other endpoint) cross a line. |
| 7660 | The lines are at integer coordinates, so this happens when the two | 7660 | The lines are at integer coordinates, so this happens when the two |
| 7661 | numbers surround an integer. | 7661 | numbers surround an integer. |
| @@ -7670,9 +7670,9 @@ In fact, since the field of lines is infinite we can choose the | |||
| 7670 | coordinates 0 and 1 for the lines on either side of the leftmost | 7670 | coordinates 0 and 1 for the lines on either side of the leftmost |
| 7671 | endpoint. The rightmost endpoint will be between 0 and 1 if the | 7671 | endpoint. The rightmost endpoint will be between 0 and 1 if the |
| 7672 | match does not cross a line, or between 1 and 2 if it does. So: | 7672 | match does not cross a line, or between 1 and 2 if it does. So: |
| 7673 | Pick random @expr{x} and | 7673 | Pick random @expr{x} and |
| 7674 | @texline @math{\theta}, | 7674 | @texline @math{\theta}, |
| 7675 | @infoline @expr{theta}, | 7675 | @infoline @expr{theta}, |
| 7676 | compute | 7676 | compute |
| 7677 | @texline @math{x + \cos \theta}, | 7677 | @texline @math{x + \cos \theta}, |
| 7678 | @infoline @expr{x + cos(theta)}, | 7678 | @infoline @expr{x + cos(theta)}, |
| @@ -8997,7 +8997,7 @@ Each of these functions can be computed using the stack, or using | |||
| 8997 | algebraic entry, whichever way you prefer: | 8997 | algebraic entry, whichever way you prefer: |
| 8998 | 8998 | ||
| 8999 | @noindent | 8999 | @noindent |
| 9000 | Computing | 9000 | Computing |
| 9001 | @texline @math{\displaystyle{\sin x \over x}}: | 9001 | @texline @math{\displaystyle{\sin x \over x}}: |
| 9002 | @infoline @expr{sin(x) / x}: | 9002 | @infoline @expr{sin(x) / x}: |
| 9003 | 9003 | ||
| @@ -9068,7 +9068,7 @@ C-x ( ' [0, 1; 1, 1] ^ ($-1) * [1, 1] @key{RET} v u @key{DEL} C-x ) | |||
| 9068 | 9068 | ||
| 9069 | @noindent | 9069 | @noindent |
| 9070 | This program is quite efficient because Calc knows how to raise a | 9070 | This program is quite efficient because Calc knows how to raise a |
| 9071 | matrix (or other value) to the power @expr{n} in only | 9071 | matrix (or other value) to the power @expr{n} in only |
| 9072 | @texline @math{\log_2 n} | 9072 | @texline @math{\log_2 n} |
| 9073 | @infoline @expr{log(n,2)} | 9073 | @infoline @expr{log(n,2)} |
| 9074 | steps. For example, this program can compute the 1000th Fibonacci | 9074 | steps. For example, this program can compute the 1000th Fibonacci |
| @@ -9122,7 +9122,7 @@ harmonic number is 4.02. | |||
| 9122 | 9122 | ||
| 9123 | @noindent | 9123 | @noindent |
| 9124 | The first step is to compute the derivative @expr{f'(x)} and thus | 9124 | The first step is to compute the derivative @expr{f'(x)} and thus |
| 9125 | the formula | 9125 | the formula |
| 9126 | @texline @math{\displaystyle{x - {f(x) \over f'(x)}}}. | 9126 | @texline @math{\displaystyle{x - {f(x) \over f'(x)}}}. |
| 9127 | @infoline @expr{x - f(x)/f'(x)}. | 9127 | @infoline @expr{x - f(x)/f'(x)}. |
| 9128 | 9128 | ||
| @@ -9239,12 +9239,12 @@ method (among others) to look for numerical solutions to any equation. | |||
| 9239 | @noindent | 9239 | @noindent |
| 9240 | The first step is to adjust @expr{z} to be greater than 5. A simple | 9240 | The first step is to adjust @expr{z} to be greater than 5. A simple |
| 9241 | ``for'' loop will do the job here. If @expr{z} is less than 5, we | 9241 | ``for'' loop will do the job here. If @expr{z} is less than 5, we |
| 9242 | reduce the problem using | 9242 | reduce the problem using |
| 9243 | @texline @math{\psi(z) = \psi(z+1) - 1/z}. | 9243 | @texline @math{\psi(z) = \psi(z+1) - 1/z}. |
| 9244 | @infoline @expr{psi(z) = psi(z+1) - 1/z}. We go | 9244 | @infoline @expr{psi(z) = psi(z+1) - 1/z}. We go |
| 9245 | on to compute | 9245 | on to compute |
| 9246 | @texline @math{\psi(z+1)}, | 9246 | @texline @math{\psi(z+1)}, |
| 9247 | @infoline @expr{psi(z+1)}, | 9247 | @infoline @expr{psi(z+1)}, |
| 9248 | and remember to add back a factor of @expr{-1/z} when we're done. This | 9248 | and remember to add back a factor of @expr{-1/z} when we're done. This |
| 9249 | step is repeated until @expr{z > 5}. | 9249 | step is repeated until @expr{z > 5}. |
| 9250 | 9250 | ||
| @@ -9283,7 +9283,7 @@ are exactly equal, not just equal to within the current precision.) | |||
| 9283 | @end group | 9283 | @end group |
| 9284 | @end smallexample | 9284 | @end smallexample |
| 9285 | 9285 | ||
| 9286 | Now we compute the initial part of the sum: | 9286 | Now we compute the initial part of the sum: |
| 9287 | @texline @math{\ln z - {1 \over 2z}} | 9287 | @texline @math{\ln z - {1 \over 2z}} |
| 9288 | @infoline @expr{ln(z) - 1/2z} | 9288 | @infoline @expr{ln(z) - 1/2z} |
| 9289 | minus the adjustment factor. | 9289 | minus the adjustment factor. |
| @@ -9326,9 +9326,9 @@ up the value of @expr{2 n}. (Calc does have a summation command, | |||
| 9326 | @end group | 9326 | @end group |
| 9327 | @end smallexample | 9327 | @end smallexample |
| 9328 | 9328 | ||
| 9329 | This is the value of | 9329 | This is the value of |
| 9330 | @texline @math{-\gamma}, | 9330 | @texline @math{-\gamma}, |
| 9331 | @infoline @expr{- gamma}, | 9331 | @infoline @expr{- gamma}, |
| 9332 | with a slight bit of roundoff error. To get a full 12 digits, let's use | 9332 | with a slight bit of roundoff error. To get a full 12 digits, let's use |
| 9333 | a higher precision: | 9333 | a higher precision: |
| 9334 | 9334 | ||
| @@ -9361,9 +9361,9 @@ C-x ) | |||
| 9361 | 9361 | ||
| 9362 | @noindent | 9362 | @noindent |
| 9363 | Taking the derivative of a term of the form @expr{x^n} will produce | 9363 | Taking the derivative of a term of the form @expr{x^n} will produce |
| 9364 | a term like | 9364 | a term like |
| 9365 | @texline @math{n x^{n-1}}. | 9365 | @texline @math{n x^{n-1}}. |
| 9366 | @infoline @expr{n x^(n-1)}. | 9366 | @infoline @expr{n x^(n-1)}. |
| 9367 | Taking the derivative of a constant | 9367 | Taking the derivative of a constant |
| 9368 | produces zero. From this it is easy to see that the @expr{n}th | 9368 | produces zero. From this it is easy to see that the @expr{n}th |
| 9369 | derivative of a polynomial, evaluated at @expr{x = 0}, will equal the | 9369 | derivative of a polynomial, evaluated at @expr{x = 0}, will equal the |
| @@ -9652,7 +9652,7 @@ still exists and is updated silently. @xref{Trail Commands}. | |||
| 9652 | @mindex @null | 9652 | @mindex @null |
| 9653 | @end ignore | 9653 | @end ignore |
| 9654 | In most installations, the @kbd{C-x * c} key sequence is a more | 9654 | In most installations, the @kbd{C-x * c} key sequence is a more |
| 9655 | convenient way to start the Calculator. Also, @kbd{C-x * *} | 9655 | convenient way to start the Calculator. Also, @kbd{C-x * *} |
| 9656 | is a synonym for @kbd{C-x * c} unless you last used Calc | 9656 | is a synonym for @kbd{C-x * c} unless you last used Calc |
| 9657 | in its Keypad mode. | 9657 | in its Keypad mode. |
| 9658 | 9658 | ||
| @@ -9908,9 +9908,9 @@ additional notes from the summary that apply to this command. | |||
| 9908 | The @kbd{h f} (@code{calc-describe-function}) command looks up an | 9908 | The @kbd{h f} (@code{calc-describe-function}) command looks up an |
| 9909 | algebraic function or a command name in the Calc manual. Enter an | 9909 | algebraic function or a command name in the Calc manual. Enter an |
| 9910 | algebraic function name to look up that function in the Function | 9910 | algebraic function name to look up that function in the Function |
| 9911 | Index or enter a command name beginning with @samp{calc-} to look it | 9911 | Index or enter a command name beginning with @samp{calc-} to look it |
| 9912 | up in the Command Index. This command will also look up operator | 9912 | up in the Command Index. This command will also look up operator |
| 9913 | symbols that can appear in algebraic formulas, like @samp{%} and | 9913 | symbols that can appear in algebraic formulas, like @samp{%} and |
| 9914 | @samp{=>}. | 9914 | @samp{=>}. |
| 9915 | 9915 | ||
| 9916 | @kindex h v | 9916 | @kindex h v |
| @@ -10038,7 +10038,7 @@ During numeric entry, the only editing key available is @key{DEL}. | |||
| 10038 | @cindex Formulas, entering | 10038 | @cindex Formulas, entering |
| 10039 | The @kbd{'} (@code{calc-algebraic-entry}) command can be used to enter | 10039 | The @kbd{'} (@code{calc-algebraic-entry}) command can be used to enter |
| 10040 | calculations in algebraic form. This is accomplished by typing the | 10040 | calculations in algebraic form. This is accomplished by typing the |
| 10041 | apostrophe key, ', followed by the expression in standard format: | 10041 | apostrophe key, ', followed by the expression in standard format: |
| 10042 | 10042 | ||
| 10043 | @example | 10043 | @example |
| 10044 | ' 2+3*4 @key{RET}. | 10044 | ' 2+3*4 @key{RET}. |
| @@ -10047,7 +10047,7 @@ apostrophe key, ', followed by the expression in standard format: | |||
| 10047 | @noindent | 10047 | @noindent |
| 10048 | This will compute | 10048 | This will compute |
| 10049 | @texline @math{2+(3\times4) = 14} | 10049 | @texline @math{2+(3\times4) = 14} |
| 10050 | @infoline @expr{2+(3*4) = 14} | 10050 | @infoline @expr{2+(3*4) = 14} |
| 10051 | and push it on the stack. If you wish you can | 10051 | and push it on the stack. If you wish you can |
| 10052 | ignore the RPN aspect of Calc altogether and simply enter algebraic | 10052 | ignore the RPN aspect of Calc altogether and simply enter algebraic |
| 10053 | expressions in this way. You may want to use @key{DEL} every so often to | 10053 | expressions in this way. You may want to use @key{DEL} every so often to |
| @@ -10453,9 +10453,9 @@ is greater than this, it will recompute @cpi{} using a series | |||
| 10453 | approximation. This value will not need to be recomputed ever again | 10453 | approximation. This value will not need to be recomputed ever again |
| 10454 | unless you raise the precision still further. Many operations such as | 10454 | unless you raise the precision still further. Many operations such as |
| 10455 | logarithms and sines make use of similarly cached values such as | 10455 | logarithms and sines make use of similarly cached values such as |
| 10456 | @cpiover{4} and | 10456 | @cpiover{4} and |
| 10457 | @texline @math{\ln 2}. | 10457 | @texline @math{\ln 2}. |
| 10458 | @infoline @expr{ln(2)}. | 10458 | @infoline @expr{ln(2)}. |
| 10459 | The visible effect of caching is that | 10459 | The visible effect of caching is that |
| 10460 | high-precision computations may seem to do extra work the first time. | 10460 | high-precision computations may seem to do extra work the first time. |
| 10461 | Other things cached include powers of two (for the binary arithmetic | 10461 | Other things cached include powers of two (for the binary arithmetic |
| @@ -10612,10 +10612,10 @@ form). The numerator and denominator always use the same radix. | |||
| 10612 | A floating-point number or @dfn{float} is a number stored in scientific | 10612 | A floating-point number or @dfn{float} is a number stored in scientific |
| 10613 | notation. The number of significant digits in the fractional part is | 10613 | notation. The number of significant digits in the fractional part is |
| 10614 | governed by the current floating precision (@pxref{Precision}). The | 10614 | governed by the current floating precision (@pxref{Precision}). The |
| 10615 | range of acceptable values is from | 10615 | range of acceptable values is from |
| 10616 | @texline @math{10^{-3999999}} | 10616 | @texline @math{10^{-3999999}} |
| 10617 | @infoline @expr{10^-3999999} | 10617 | @infoline @expr{10^-3999999} |
| 10618 | (inclusive) to | 10618 | (inclusive) to |
| 10619 | @texline @math{10^{4000000}} | 10619 | @texline @math{10^{4000000}} |
| 10620 | @infoline @expr{10^4000000} | 10620 | @infoline @expr{10^4000000} |
| 10621 | (exclusive), plus the corresponding negative values and zero. | 10621 | (exclusive), plus the corresponding negative values and zero. |
| @@ -10666,7 +10666,7 @@ and displayed in any radix just like integers and fractions. Since a | |||
| 10666 | float that is entered in a radix other that 10 will be converted to | 10666 | float that is entered in a radix other that 10 will be converted to |
| 10667 | decimal, the number that Calc stores may not be exactly the number that | 10667 | decimal, the number that Calc stores may not be exactly the number that |
| 10668 | was entered, it will be the closest decimal approximation given the | 10668 | was entered, it will be the closest decimal approximation given the |
| 10669 | current precison. The notation @samp{@var{radix}#@var{ddd}.@var{ddd}} | 10669 | current precision. The notation @samp{@var{radix}#@var{ddd}.@var{ddd}} |
| 10670 | is a floating-point number whose digits are in the specified radix. | 10670 | is a floating-point number whose digits are in the specified radix. |
| 10671 | Note that the @samp{.} is more aptly referred to as a ``radix point'' | 10671 | Note that the @samp{.} is more aptly referred to as a ``radix point'' |
| 10672 | than as a decimal point in this case. The number @samp{8#123.4567} is | 10672 | than as a decimal point in this case. The number @samp{8#123.4567} is |
| @@ -10690,18 +10690,18 @@ polar. The default format is rectangular, displayed in the form | |||
| 10690 | Rectangular complex numbers can also be displayed in @samp{@var{a}+@var{b}i} | 10690 | Rectangular complex numbers can also be displayed in @samp{@var{a}+@var{b}i} |
| 10691 | notation; @pxref{Complex Formats}. | 10691 | notation; @pxref{Complex Formats}. |
| 10692 | 10692 | ||
| 10693 | Polar complex numbers are displayed in the form | 10693 | Polar complex numbers are displayed in the form |
| 10694 | @texline `@tfn{(}@var{r}@tfn{;}@math{\theta}@tfn{)}' | 10694 | @texline `@tfn{(}@var{r}@tfn{;}@math{\theta}@tfn{)}' |
| 10695 | @infoline `@tfn{(}@var{r}@tfn{;}@var{theta}@tfn{)}' | 10695 | @infoline `@tfn{(}@var{r}@tfn{;}@var{theta}@tfn{)}' |
| 10696 | where @var{r} is the nonnegative magnitude and | 10696 | where @var{r} is the nonnegative magnitude and |
| 10697 | @texline @math{\theta} | 10697 | @texline @math{\theta} |
| 10698 | @infoline @var{theta} | 10698 | @infoline @var{theta} |
| 10699 | is the argument or phase angle. The range of | 10699 | is the argument or phase angle. The range of |
| 10700 | @texline @math{\theta} | 10700 | @texline @math{\theta} |
| 10701 | @infoline @var{theta} | 10701 | @infoline @var{theta} |
| 10702 | depends on the current angular mode (@pxref{Angular Modes}); it is | 10702 | depends on the current angular mode (@pxref{Angular Modes}); it is |
| 10703 | generally between @mathit{-180} and @mathit{+180} degrees or the equivalent range | 10703 | generally between @mathit{-180} and @mathit{+180} degrees or the equivalent range |
| 10704 | in radians. | 10704 | in radians. |
| 10705 | 10705 | ||
| 10706 | Complex numbers are entered in stages using incomplete objects. | 10706 | Complex numbers are entered in stages using incomplete objects. |
| 10707 | @xref{Incomplete Objects}. | 10707 | @xref{Incomplete Objects}. |
| @@ -10742,9 +10742,9 @@ really mean is that @expr{1 / x}, as @expr{x} becomes larger and | |||
| 10742 | larger, becomes arbitrarily close to zero. So you can imagine | 10742 | larger, becomes arbitrarily close to zero. So you can imagine |
| 10743 | that if @expr{x} got ``all the way to infinity,'' then @expr{1 / x} | 10743 | that if @expr{x} got ``all the way to infinity,'' then @expr{1 / x} |
| 10744 | would go all the way to zero. Similarly, when they say that | 10744 | would go all the way to zero. Similarly, when they say that |
| 10745 | @samp{exp(inf) = inf}, they mean that | 10745 | @samp{exp(inf) = inf}, they mean that |
| 10746 | @texline @math{e^x} | 10746 | @texline @math{e^x} |
| 10747 | @infoline @expr{exp(x)} | 10747 | @infoline @expr{exp(x)} |
| 10748 | grows without bound as @expr{x} grows. The symbol @samp{-inf} likewise | 10748 | grows without bound as @expr{x} grows. The symbol @samp{-inf} likewise |
| 10749 | stands for an infinitely negative real value; for example, we say that | 10749 | stands for an infinitely negative real value; for example, we say that |
| 10750 | @samp{exp(-inf) = 0}. You can have an infinity pointing in any | 10750 | @samp{exp(-inf) = 0}. You can have an infinity pointing in any |
| @@ -10839,7 +10839,7 @@ of its elements. | |||
| 10839 | @end ignore | 10839 | @end ignore |
| 10840 | @tindex vec | 10840 | @tindex vec |
| 10841 | Algebraic functions for building vectors include @samp{vec(a, b, c)} | 10841 | Algebraic functions for building vectors include @samp{vec(a, b, c)} |
| 10842 | to build @samp{[a, b, c]}, @samp{cvec(a, n, m)} to build an | 10842 | to build @samp{[a, b, c]}, @samp{cvec(a, n, m)} to build an |
| 10843 | @texline @math{n\times m} | 10843 | @texline @math{n\times m} |
| 10844 | @infoline @var{n}x@var{m} | 10844 | @infoline @var{n}x@var{m} |
| 10845 | matrix of @samp{a}s, and @samp{index(n)} to build a vector of integers | 10845 | matrix of @samp{a}s, and @samp{index(n)} to build a vector of integers |
| @@ -11184,9 +11184,9 @@ there is no solution to this equation (which can happen only when | |||
| 11184 | division is left in symbolic form. Other operations, such as square | 11184 | division is left in symbolic form. Other operations, such as square |
| 11185 | roots, are not yet supported for modulo forms. (Note that, although | 11185 | roots, are not yet supported for modulo forms. (Note that, although |
| 11186 | @w{`@tfn{(}@var{a} @tfn{mod} @var{M}@tfn{)^.5}'} will compute a ``modulo square root'' | 11186 | @w{`@tfn{(}@var{a} @tfn{mod} @var{M}@tfn{)^.5}'} will compute a ``modulo square root'' |
| 11187 | in the sense of reducing | 11187 | in the sense of reducing |
| 11188 | @texline @math{\sqrt a} | 11188 | @texline @math{\sqrt a} |
| 11189 | @infoline @expr{sqrt(a)} | 11189 | @infoline @expr{sqrt(a)} |
| 11190 | modulo @expr{M}, this is not a useful definition from the | 11190 | modulo @expr{M}, this is not a useful definition from the |
| 11191 | number-theoretical point of view.) | 11191 | number-theoretical point of view.) |
| 11192 | 11192 | ||
| @@ -11220,11 +11220,11 @@ The algebraic function @samp{makemod(a, m)} builds the modulo form | |||
| 11220 | @cindex Standard deviations | 11220 | @cindex Standard deviations |
| 11221 | An @dfn{error form} is a number with an associated standard | 11221 | An @dfn{error form} is a number with an associated standard |
| 11222 | deviation, as in @samp{2.3 +/- 0.12}. The notation | 11222 | deviation, as in @samp{2.3 +/- 0.12}. The notation |
| 11223 | @texline `@var{x} @tfn{+/-} @math{\sigma}' | 11223 | @texline `@var{x} @tfn{+/-} @math{\sigma}' |
| 11224 | @infoline `@var{x} @tfn{+/-} sigma' | 11224 | @infoline `@var{x} @tfn{+/-} sigma' |
| 11225 | stands for an uncertain value which follows | 11225 | stands for an uncertain value which follows |
| 11226 | a normal or Gaussian distribution of mean @expr{x} and standard | 11226 | a normal or Gaussian distribution of mean @expr{x} and standard |
| 11227 | deviation or ``error'' | 11227 | deviation or ``error'' |
| 11228 | @texline @math{\sigma}. | 11228 | @texline @math{\sigma}. |
| 11229 | @infoline @expr{sigma}. | 11229 | @infoline @expr{sigma}. |
| 11230 | Both the mean and the error can be either numbers or | 11230 | Both the mean and the error can be either numbers or |
| @@ -11235,7 +11235,7 @@ regular number by the Calculator. | |||
| 11235 | 11235 | ||
| 11236 | All arithmetic and transcendental functions accept error forms as input. | 11236 | All arithmetic and transcendental functions accept error forms as input. |
| 11237 | Operations on the mean-value part work just like operations on regular | 11237 | Operations on the mean-value part work just like operations on regular |
| 11238 | numbers. The error part for any function @expr{f(x)} (such as | 11238 | numbers. The error part for any function @expr{f(x)} (such as |
| 11239 | @texline @math{\sin x} | 11239 | @texline @math{\sin x} |
| 11240 | @infoline @expr{sin(x)}) | 11240 | @infoline @expr{sin(x)}) |
| 11241 | is defined by the error of @expr{x} times the derivative of @expr{f} | 11241 | is defined by the error of @expr{x} times the derivative of @expr{f} |
| @@ -11267,35 +11267,35 @@ Consult a good text on error analysis for a discussion of the proper use | |||
| 11267 | of standard deviations. Actual errors often are neither Gaussian-distributed | 11267 | of standard deviations. Actual errors often are neither Gaussian-distributed |
| 11268 | nor uncorrelated, and the above formulas are valid only when errors | 11268 | nor uncorrelated, and the above formulas are valid only when errors |
| 11269 | are small. As an example, the error arising from | 11269 | are small. As an example, the error arising from |
| 11270 | @texline `@tfn{sin(}@var{x} @tfn{+/-} @math{\sigma}@tfn{)}' | 11270 | @texline `@tfn{sin(}@var{x} @tfn{+/-} @math{\sigma}@tfn{)}' |
| 11271 | @infoline `@tfn{sin(}@var{x} @tfn{+/-} @var{sigma}@tfn{)}' | 11271 | @infoline `@tfn{sin(}@var{x} @tfn{+/-} @var{sigma}@tfn{)}' |
| 11272 | is | 11272 | is |
| 11273 | @texline `@math{\sigma} @tfn{abs(cos(}@var{x}@tfn{))}'. | 11273 | @texline `@math{\sigma} @tfn{abs(cos(}@var{x}@tfn{))}'. |
| 11274 | @infoline `@var{sigma} @tfn{abs(cos(}@var{x}@tfn{))}'. | 11274 | @infoline `@var{sigma} @tfn{abs(cos(}@var{x}@tfn{))}'. |
| 11275 | When @expr{x} is close to zero, | 11275 | When @expr{x} is close to zero, |
| 11276 | @texline @math{\cos x} | 11276 | @texline @math{\cos x} |
| 11277 | @infoline @expr{cos(x)} | 11277 | @infoline @expr{cos(x)} |
| 11278 | is close to one so the error in the sine is close to | 11278 | is close to one so the error in the sine is close to |
| 11279 | @texline @math{\sigma}; | 11279 | @texline @math{\sigma}; |
| 11280 | @infoline @expr{sigma}; | 11280 | @infoline @expr{sigma}; |
| 11281 | this makes sense, since | 11281 | this makes sense, since |
| 11282 | @texline @math{\sin x} | 11282 | @texline @math{\sin x} |
| 11283 | @infoline @expr{sin(x)} | 11283 | @infoline @expr{sin(x)} |
| 11284 | is approximately @expr{x} near zero, so a given error in @expr{x} will | 11284 | is approximately @expr{x} near zero, so a given error in @expr{x} will |
| 11285 | produce about the same error in the sine. Likewise, near 90 degrees | 11285 | produce about the same error in the sine. Likewise, near 90 degrees |
| 11286 | @texline @math{\cos x} | 11286 | @texline @math{\cos x} |
| 11287 | @infoline @expr{cos(x)} | 11287 | @infoline @expr{cos(x)} |
| 11288 | is nearly zero and so the computed error is | 11288 | is nearly zero and so the computed error is |
| 11289 | small: The sine curve is nearly flat in that region, so an error in @expr{x} | 11289 | small: The sine curve is nearly flat in that region, so an error in @expr{x} |
| 11290 | has relatively little effect on the value of | 11290 | has relatively little effect on the value of |
| 11291 | @texline @math{\sin x}. | 11291 | @texline @math{\sin x}. |
| 11292 | @infoline @expr{sin(x)}. | 11292 | @infoline @expr{sin(x)}. |
| 11293 | However, consider @samp{sin(90 +/- 1000)}. The cosine of 90 is zero, so | 11293 | However, consider @samp{sin(90 +/- 1000)}. The cosine of 90 is zero, so |
| 11294 | Calc will report zero error! We get an obviously wrong result because | 11294 | Calc will report zero error! We get an obviously wrong result because |
| 11295 | we have violated the small-error approximation underlying the error | 11295 | we have violated the small-error approximation underlying the error |
| 11296 | analysis. If the error in @expr{x} had been small, the error in | 11296 | analysis. If the error in @expr{x} had been small, the error in |
| 11297 | @texline @math{\sin x} | 11297 | @texline @math{\sin x} |
| 11298 | @infoline @expr{sin(x)} | 11298 | @infoline @expr{sin(x)} |
| 11299 | would indeed have been negligible. | 11299 | would indeed have been negligible. |
| 11300 | 11300 | ||
| 11301 | @ignore | 11301 | @ignore |
| @@ -11402,14 +11402,14 @@ contain zero inside them Calc is forced to give the result, | |||
| 11402 | 11402 | ||
| 11403 | While it may seem that intervals and error forms are similar, they are | 11403 | While it may seem that intervals and error forms are similar, they are |
| 11404 | based on entirely different concepts of inexact quantities. An error | 11404 | based on entirely different concepts of inexact quantities. An error |
| 11405 | form | 11405 | form |
| 11406 | @texline `@var{x} @tfn{+/-} @math{\sigma}' | 11406 | @texline `@var{x} @tfn{+/-} @math{\sigma}' |
| 11407 | @infoline `@var{x} @tfn{+/-} @var{sigma}' | 11407 | @infoline `@var{x} @tfn{+/-} @var{sigma}' |
| 11408 | means a variable is random, and its value could | 11408 | means a variable is random, and its value could |
| 11409 | be anything but is ``probably'' within one | 11409 | be anything but is ``probably'' within one |
| 11410 | @texline @math{\sigma} | 11410 | @texline @math{\sigma} |
| 11411 | @infoline @var{sigma} | 11411 | @infoline @var{sigma} |
| 11412 | of the mean value @expr{x}. An interval | 11412 | of the mean value @expr{x}. An interval |
| 11413 | `@tfn{[}@var{a} @tfn{..@:} @var{b}@tfn{]}' means a | 11413 | `@tfn{[}@var{a} @tfn{..@:} @var{b}@tfn{]}' means a |
| 11414 | variable's value is unknown, but guaranteed to lie in the specified | 11414 | variable's value is unknown, but guaranteed to lie in the specified |
| 11415 | range. Error forms are statistical or ``average case'' approximations; | 11415 | range. Error forms are statistical or ``average case'' approximations; |
| @@ -11641,7 +11641,7 @@ the C-style ``if'' operator @samp{a?b:c} [@code{if}]; | |||
| 11641 | @samp{=>} [@code{evalto}]. | 11641 | @samp{=>} [@code{evalto}]. |
| 11642 | 11642 | ||
| 11643 | Note that, unlike in usual computer notation, multiplication binds more | 11643 | Note that, unlike in usual computer notation, multiplication binds more |
| 11644 | strongly than division: @samp{a*b/c*d} is equivalent to | 11644 | strongly than division: @samp{a*b/c*d} is equivalent to |
| 11645 | @texline @math{a b \over c d}. | 11645 | @texline @math{a b \over c d}. |
| 11646 | @infoline @expr{(a*b)/(c*d)}. | 11646 | @infoline @expr{(a*b)/(c*d)}. |
| 11647 | 11647 | ||
| @@ -11858,13 +11858,13 @@ next higher level. For example, with @samp{10 20 30 40 50} on the | |||
| 11858 | stack and the point on the line containing @samp{30}, @kbd{C-x C-t} | 11858 | stack and the point on the line containing @samp{30}, @kbd{C-x C-t} |
| 11859 | creates @samp{10 20 40 30 50}. More generally, @kbd{C-x C-t} acts on | 11859 | creates @samp{10 20 40 30 50}. More generally, @kbd{C-x C-t} acts on |
| 11860 | the stack objects determined by the current point (and mark) similar | 11860 | the stack objects determined by the current point (and mark) similar |
| 11861 | to how the text-mode command @code{transpose-lines} acts on | 11861 | to how the text-mode command @code{transpose-lines} acts on |
| 11862 | lines. With argument @var{n}, @kbd{C-x C-t} will move the stack object | 11862 | lines. With argument @var{n}, @kbd{C-x C-t} will move the stack object |
| 11863 | at the level above the current point and move it past N other objects; | 11863 | at the level above the current point and move it past N other objects; |
| 11864 | for example, with @samp{10 20 30 40 50} on the stack and the point on | 11864 | for example, with @samp{10 20 30 40 50} on the stack and the point on |
| 11865 | the line containing @samp{30}, @kbd{C-u 2 C-x C-t} creates | 11865 | the line containing @samp{30}, @kbd{C-u 2 C-x C-t} creates |
| 11866 | @samp{10 40 20 30 50}. With an argument of 0, @kbd{C-x C-t} will switch | 11866 | @samp{10 40 20 30 50}. With an argument of 0, @kbd{C-x C-t} will switch |
| 11867 | the stack objects at the levels determined by the point and the mark. | 11867 | the stack objects at the levels determined by the point and the mark. |
| 11868 | 11868 | ||
| 11869 | @node Editing Stack Entries, Trail Commands, Stack Manipulation, Stack and Trail | 11869 | @node Editing Stack Entries, Trail Commands, Stack Manipulation, Stack and Trail |
| 11870 | @section Editing Stack Entries | 11870 | @section Editing Stack Entries |
| @@ -12056,7 +12056,7 @@ the stack contains the arguments and the result: @samp{2 3 5}. | |||
| 12056 | With the exception of keyboard macros, this works for all commands that | 12056 | With the exception of keyboard macros, this works for all commands that |
| 12057 | take arguments off the stack. (To avoid potentially unpleasant behavior, | 12057 | take arguments off the stack. (To avoid potentially unpleasant behavior, |
| 12058 | a @kbd{K} prefix before a keyboard macro will be ignored. A @kbd{K} | 12058 | a @kbd{K} prefix before a keyboard macro will be ignored. A @kbd{K} |
| 12059 | prefix called @emph{within} the keyboard macro will still take effect.) | 12059 | prefix called @emph{within} the keyboard macro will still take effect.) |
| 12060 | As another example, @kbd{K a s} simplifies a formula, pushing the | 12060 | As another example, @kbd{K a s} simplifies a formula, pushing the |
| 12061 | simplified version of the formula onto the stack after the original | 12061 | simplified version of the formula onto the stack after the original |
| 12062 | formula (rather than replacing the original formula). Note that you | 12062 | formula (rather than replacing the original formula). Note that you |
| @@ -12064,7 +12064,7 @@ could get the same effect by typing @kbd{@key{RET} a s}, copying the | |||
| 12064 | formula and then simplifying the copy. One difference is that for a very | 12064 | formula and then simplifying the copy. One difference is that for a very |
| 12065 | large formula the time taken to format the intermediate copy in | 12065 | large formula the time taken to format the intermediate copy in |
| 12066 | @kbd{@key{RET} a s} could be noticeable; @kbd{K a s} would avoid this | 12066 | @kbd{@key{RET} a s} could be noticeable; @kbd{K a s} would avoid this |
| 12067 | extra work. | 12067 | extra work. |
| 12068 | 12068 | ||
| 12069 | Even stack manipulation commands are affected. @key{TAB} works by | 12069 | Even stack manipulation commands are affected. @key{TAB} works by |
| 12070 | popping two values and pushing them back in the opposite order, | 12070 | popping two values and pushing them back in the opposite order, |
| @@ -12155,7 +12155,7 @@ discussion of the @code{calc-settings-file} variable; @pxref{Customizing Calc}. | |||
| 12155 | If the file name you give is your user init file (typically | 12155 | If the file name you give is your user init file (typically |
| 12156 | @file{~/.emacs}), @kbd{m F} will not automatically load the new file. This | 12156 | @file{~/.emacs}), @kbd{m F} will not automatically load the new file. This |
| 12157 | is because your user init file may contain other things you don't want | 12157 | is because your user init file may contain other things you don't want |
| 12158 | to reread. You can give | 12158 | to reread. You can give |
| 12159 | a numeric prefix argument of 1 to @kbd{m F} to force it to read the | 12159 | a numeric prefix argument of 1 to @kbd{m F} to force it to read the |
| 12160 | file no matter what. Conversely, an argument of @mathit{-1} tells | 12160 | file no matter what. Conversely, an argument of @mathit{-1} tells |
| 12161 | @kbd{m F} @emph{not} to read the new file. An argument of 2 or @mathit{-2} | 12161 | @kbd{m F} @emph{not} to read the new file. An argument of 2 or @mathit{-2} |
| @@ -12274,7 +12274,7 @@ corresponding base command (@code{calc-sin} in this case). | |||
| 12274 | @pindex calc-option | 12274 | @pindex calc-option |
| 12275 | The @kbd{O} key (@code{calc-option}) sets another flag, the | 12275 | The @kbd{O} key (@code{calc-option}) sets another flag, the |
| 12276 | @dfn{Option Flag}, which also can alter the subsequent Calc command in | 12276 | @dfn{Option Flag}, which also can alter the subsequent Calc command in |
| 12277 | various ways. | 12277 | various ways. |
| 12278 | 12278 | ||
| 12279 | The Inverse, Hyperbolic and Option flags apply only to the next | 12279 | The Inverse, Hyperbolic and Option flags apply only to the next |
| 12280 | Calculator command, after which they are automatically cleared. (They | 12280 | Calculator command, after which they are automatically cleared. (They |
| @@ -12366,7 +12366,7 @@ result cannot be expressed as an integer. In some cases you would | |||
| 12366 | rather get an exact fractional answer. One way to accomplish this is | 12366 | rather get an exact fractional answer. One way to accomplish this is |
| 12367 | to use the @kbd{:} (@code{calc-fdiv}) [@code{fdiv}] command, which | 12367 | to use the @kbd{:} (@code{calc-fdiv}) [@code{fdiv}] command, which |
| 12368 | divides the two integers on the top of the stack to produce a fraction: | 12368 | divides the two integers on the top of the stack to produce a fraction: |
| 12369 | @kbd{6 @key{RET} 4 :} produces @expr{3:2} even though | 12369 | @kbd{6 @key{RET} 4 :} produces @expr{3:2} even though |
| 12370 | @kbd{6 @key{RET} 4 /} produces @expr{1.5}. | 12370 | @kbd{6 @key{RET} 4 /} produces @expr{1.5}. |
| 12371 | 12371 | ||
| 12372 | @kindex m f | 12372 | @kindex m f |
| @@ -13155,11 +13155,11 @@ represent the integer and no more. The @kbd{d z} (@code{calc-leading-zeros}) | |||
| 13155 | command causes integers to be padded out with leading zeros according to the | 13155 | command causes integers to be padded out with leading zeros according to the |
| 13156 | current binary word size. (@xref{Binary Functions}, for a discussion of | 13156 | current binary word size. (@xref{Binary Functions}, for a discussion of |
| 13157 | word size.) If the absolute value of the word size is @expr{w}, all integers | 13157 | word size.) If the absolute value of the word size is @expr{w}, all integers |
| 13158 | are displayed with at least enough digits to represent | 13158 | are displayed with at least enough digits to represent |
| 13159 | @texline @math{2^w-1} | 13159 | @texline @math{2^w-1} |
| 13160 | @infoline @expr{(2^w)-1} | 13160 | @infoline @expr{(2^w)-1} |
| 13161 | in the current radix. (Larger integers will still be displayed in their | 13161 | in the current radix. (Larger integers will still be displayed in their |
| 13162 | entirety.) | 13162 | entirety.) |
| 13163 | 13163 | ||
| 13164 | @cindex Two's complements | 13164 | @cindex Two's complements |
| 13165 | Calc can display @expr{w}-bit integers using two's complement | 13165 | Calc can display @expr{w}-bit integers using two's complement |
| @@ -13181,7 +13181,7 @@ the integers from @expr{0} to | |||
| 13181 | are represented by themselves and the integers from | 13181 | are represented by themselves and the integers from |
| 13182 | @texline @math{-2^{w-1}} | 13182 | @texline @math{-2^{w-1}} |
| 13183 | @infoline @expr{-2^(w-1)} | 13183 | @infoline @expr{-2^(w-1)} |
| 13184 | to @expr{-1} are represented by the integers from | 13184 | to @expr{-1} are represented by the integers from |
| 13185 | @texline @math{2^{w-1}} | 13185 | @texline @math{2^{w-1}} |
| 13186 | @infoline @expr{2^(w-1)} | 13186 | @infoline @expr{2^(w-1)} |
| 13187 | to @expr{2^w-1} (the integer @expr{k} is represented by @expr{k+2^w}). | 13187 | to @expr{2^w-1} (the integer @expr{k} is represented by @expr{k+2^w}). |
| @@ -13190,7 +13190,7 @@ Calc will display a two's complement integer by the radix (either | |||
| 13190 | representation (including any leading zeros necessary to include all | 13190 | representation (including any leading zeros necessary to include all |
| 13191 | @expr{w} bits). In a two's complement display mode, numbers that | 13191 | @expr{w} bits). In a two's complement display mode, numbers that |
| 13192 | are not displayed in two's complement notation (i.e., that aren't | 13192 | are not displayed in two's complement notation (i.e., that aren't |
| 13193 | integers from | 13193 | integers from |
| 13194 | @texline @math{-2^{w-1}} | 13194 | @texline @math{-2^{w-1}} |
| 13195 | @infoline @expr{-2^(w-1)} | 13195 | @infoline @expr{-2^(w-1)} |
| 13196 | to | 13196 | to |
| @@ -14095,13 +14095,13 @@ the @samp{$} sign has the same meaning it always does in algebraic | |||
| 14095 | formulas (a reference to an existing entry on the stack). | 14095 | formulas (a reference to an existing entry on the stack). |
| 14096 | 14096 | ||
| 14097 | Complex numbers are displayed as in @samp{3 + 4i}. Fractions and | 14097 | Complex numbers are displayed as in @samp{3 + 4i}. Fractions and |
| 14098 | quotients are written using @code{\over} in @TeX{} mode (as in | 14098 | quotients are written using @code{\over} in @TeX{} mode (as in |
| 14099 | @code{@{a \over b@}}) and @code{\frac} in La@TeX{} mode (as in | 14099 | @code{@{a \over b@}}) and @code{\frac} in La@TeX{} mode (as in |
| 14100 | @code{\frac@{a@}@{b@}}); binomial coefficients are written with | 14100 | @code{\frac@{a@}@{b@}}); binomial coefficients are written with |
| 14101 | @code{\choose} in @TeX{} mode (as in @code{@{a \choose b@}}) and | 14101 | @code{\choose} in @TeX{} mode (as in @code{@{a \choose b@}}) and |
| 14102 | @code{\binom} in La@TeX{} mode (as in @code{\binom@{a@}@{b@}}). | 14102 | @code{\binom} in La@TeX{} mode (as in @code{\binom@{a@}@{b@}}). |
| 14103 | Interval forms are written with @code{\ldots}, and error forms are | 14103 | Interval forms are written with @code{\ldots}, and error forms are |
| 14104 | written with @code{\pm}. Absolute values are written as in | 14104 | written with @code{\pm}. Absolute values are written as in |
| 14105 | @samp{|x + 1|}, and the floor and ceiling functions are written with | 14105 | @samp{|x + 1|}, and the floor and ceiling functions are written with |
| 14106 | @code{\lfloor}, @code{\rfloor}, etc. The words @code{\left} and | 14106 | @code{\lfloor}, @code{\rfloor}, etc. The words @code{\left} and |
| 14107 | @code{\right} are ignored when reading formulas in @TeX{} and La@TeX{} | 14107 | @code{\right} are ignored when reading formulas in @TeX{} and La@TeX{} |
| @@ -14114,10 +14114,10 @@ and La@TeX{} have special names (like @code{\sin}) will use curly braces | |||
| 14114 | instead of parentheses for very simple arguments. During input, curly | 14114 | instead of parentheses for very simple arguments. During input, curly |
| 14115 | braces and parentheses work equally well for grouping, but when the | 14115 | braces and parentheses work equally well for grouping, but when the |
| 14116 | document is formatted the curly braces will be invisible. Thus the | 14116 | document is formatted the curly braces will be invisible. Thus the |
| 14117 | printed result is | 14117 | printed result is |
| 14118 | @texline @math{\sin{2 x}} | 14118 | @texline @math{\sin{2 x}} |
| 14119 | @infoline @expr{sin 2x} | 14119 | @infoline @expr{sin 2x} |
| 14120 | but | 14120 | but |
| 14121 | @texline @math{\sin(2 + x)}. | 14121 | @texline @math{\sin(2 + x)}. |
| 14122 | @infoline @expr{sin(2 + x)}. | 14122 | @infoline @expr{sin(2 + x)}. |
| 14123 | 14123 | ||
| @@ -14131,7 +14131,7 @@ italic letters in the printed document. If you invoke @kbd{d T} or | |||
| 14131 | @kbd{d L} with a positive numeric prefix argument, names of more than | 14131 | @kbd{d L} with a positive numeric prefix argument, names of more than |
| 14132 | one character will instead be enclosed in a protective commands that | 14132 | one character will instead be enclosed in a protective commands that |
| 14133 | will prevent them from being typeset in the math italics; they will be | 14133 | will prevent them from being typeset in the math italics; they will be |
| 14134 | written @samp{\hbox@{@var{name}@}} in @TeX{} mode and | 14134 | written @samp{\hbox@{@var{name}@}} in @TeX{} mode and |
| 14135 | @samp{\text@{@var{name}@}} in La@TeX{} mode. The | 14135 | @samp{\text@{@var{name}@}} in La@TeX{} mode. The |
| 14136 | @samp{\hbox@{ @}} and @samp{\text@{ @}} notations are ignored during | 14136 | @samp{\hbox@{ @}} and @samp{\text@{ @}} notations are ignored during |
| 14137 | reading. If you use a negative prefix argument, such function names are | 14137 | reading. If you use a negative prefix argument, such function names are |
| @@ -14143,7 +14143,7 @@ any @TeX{} mode.) | |||
| 14143 | 14143 | ||
| 14144 | During reading, text of the form @samp{\matrix@{ ...@: @}} is replaced | 14144 | During reading, text of the form @samp{\matrix@{ ...@: @}} is replaced |
| 14145 | by @samp{[ ...@: ]}. The same also applies to @code{\pmatrix} and | 14145 | by @samp{[ ...@: ]}. The same also applies to @code{\pmatrix} and |
| 14146 | @code{\bmatrix}. In La@TeX{} mode this also applies to | 14146 | @code{\bmatrix}. In La@TeX{} mode this also applies to |
| 14147 | @samp{\begin@{matrix@} ... \end@{matrix@}}, | 14147 | @samp{\begin@{matrix@} ... \end@{matrix@}}, |
| 14148 | @samp{\begin@{bmatrix@} ... \end@{bmatrix@}}, | 14148 | @samp{\begin@{bmatrix@} ... \end@{bmatrix@}}, |
| 14149 | @samp{\begin@{pmatrix@} ... \end@{pmatrix@}}, as well as | 14149 | @samp{\begin@{pmatrix@} ... \end@{pmatrix@}}, as well as |
| @@ -14151,12 +14151,12 @@ by @samp{[ ...@: ]}. The same also applies to @code{\pmatrix} and | |||
| 14151 | The symbol @samp{&} is interpreted as a comma, | 14151 | The symbol @samp{&} is interpreted as a comma, |
| 14152 | and the symbols @samp{\cr} and @samp{\\} are interpreted as semicolons. | 14152 | and the symbols @samp{\cr} and @samp{\\} are interpreted as semicolons. |
| 14153 | During output, matrices are displayed in @samp{\matrix@{ a & b \\ c & d@}} | 14153 | During output, matrices are displayed in @samp{\matrix@{ a & b \\ c & d@}} |
| 14154 | format in @TeX{} mode and in | 14154 | format in @TeX{} mode and in |
| 14155 | @samp{\begin@{pmatrix@} a & b \\ c & d \end@{pmatrix@}} format in | 14155 | @samp{\begin@{pmatrix@} a & b \\ c & d \end@{pmatrix@}} format in |
| 14156 | La@TeX{} mode; you may need to edit this afterwards to change to your | 14156 | La@TeX{} mode; you may need to edit this afterwards to change to your |
| 14157 | preferred matrix form. If you invoke @kbd{d T} or @kbd{d L} with an | 14157 | preferred matrix form. If you invoke @kbd{d T} or @kbd{d L} with an |
| 14158 | argument of 2 or -2, then matrices will be displayed in two-dimensional | 14158 | argument of 2 or -2, then matrices will be displayed in two-dimensional |
| 14159 | form, such as | 14159 | form, such as |
| 14160 | 14160 | ||
| 14161 | @example | 14161 | @example |
| 14162 | \begin@{pmatrix@} | 14162 | \begin@{pmatrix@} |
| @@ -14300,25 +14300,25 @@ in Calc, @TeX{}, La@TeX{} and @dfn{eqn} (described in the next section): | |||
| 14300 | @example | 14300 | @example |
| 14301 | Calc TeX LaTeX eqn | 14301 | Calc TeX LaTeX eqn |
| 14302 | ---- --- ----- --- | 14302 | ---- --- ----- --- |
| 14303 | acute \acute \acute | 14303 | acute \acute \acute |
| 14304 | Acute \Acute | 14304 | Acute \Acute |
| 14305 | bar \bar \bar bar | 14305 | bar \bar \bar bar |
| 14306 | Bar \Bar | 14306 | Bar \Bar |
| 14307 | breve \breve \breve | 14307 | breve \breve \breve |
| 14308 | Breve \Breve | 14308 | Breve \Breve |
| 14309 | check \check \check | 14309 | check \check \check |
| 14310 | Check \Check | 14310 | Check \Check |
| 14311 | dddot \dddot | 14311 | dddot \dddot |
| 14312 | ddddot \ddddot | 14312 | ddddot \ddddot |
| 14313 | dot \dot \dot dot | 14313 | dot \dot \dot dot |
| 14314 | Dot \Dot | 14314 | Dot \Dot |
| 14315 | dotdot \ddot \ddot dotdot | 14315 | dotdot \ddot \ddot dotdot |
| 14316 | DotDot \Ddot | 14316 | DotDot \Ddot |
| 14317 | dyad dyad | 14317 | dyad dyad |
| 14318 | grave \grave \grave | 14318 | grave \grave \grave |
| 14319 | Grave \Grave | 14319 | Grave \Grave |
| 14320 | hat \hat \hat hat | 14320 | hat \hat \hat hat |
| 14321 | Hat \Hat | 14321 | Hat \Hat |
| 14322 | Prime prime | 14322 | Prime prime |
| 14323 | tilde \tilde \tilde tilde | 14323 | tilde \tilde \tilde tilde |
| 14324 | Tilde \Tilde | 14324 | Tilde \Tilde |
| @@ -14363,7 +14363,7 @@ reading is: | |||
| 14363 | 14363 | ||
| 14364 | Note that, because these symbols are ignored, reading a @TeX{} or | 14364 | Note that, because these symbols are ignored, reading a @TeX{} or |
| 14365 | La@TeX{} formula into Calc and writing it back out may lose spacing and | 14365 | La@TeX{} formula into Calc and writing it back out may lose spacing and |
| 14366 | font information. | 14366 | font information. |
| 14367 | 14367 | ||
| 14368 | Also, the ``discretionary multiplication sign'' @samp{\*} is read | 14368 | Also, the ``discretionary multiplication sign'' @samp{\*} is read |
| 14369 | the same as @samp{*}. | 14369 | the same as @samp{*}. |
| @@ -14542,7 +14542,7 @@ are treated the same as curly braces: @samp{sqrt "1+x"} is equivalent to | |||
| 14542 | of quotes in @dfn{eqn}, but it is good enough for most uses. | 14542 | of quotes in @dfn{eqn}, but it is good enough for most uses. |
| 14543 | 14543 | ||
| 14544 | Accent codes (@samp{@var{x} dot}) are handled by treating them as | 14544 | Accent codes (@samp{@var{x} dot}) are handled by treating them as |
| 14545 | function calls (@samp{dot(@var{x})}) internally. | 14545 | function calls (@samp{dot(@var{x})}) internally. |
| 14546 | @xref{TeX and LaTeX Language Modes}, for a table of these accent | 14546 | @xref{TeX and LaTeX Language Modes}, for a table of these accent |
| 14547 | functions. The @code{prime} accent is treated specially if it occurs on | 14547 | functions. The @code{prime} accent is treated specially if it occurs on |
| 14548 | a variable or function name: @samp{f prime prime @w{( x prime )}} is | 14548 | a variable or function name: @samp{f prime prime @w{( x prime )}} is |
| @@ -14572,7 +14572,7 @@ if the matrix justification mode so specifies. | |||
| 14572 | The @kbd{d Y} (@code{calc-yacas-language}) command selects the | 14572 | The @kbd{d Y} (@code{calc-yacas-language}) command selects the |
| 14573 | conventions of Yacas, a free computer algebra system. While the | 14573 | conventions of Yacas, a free computer algebra system. While the |
| 14574 | operators and functions in Yacas are similar to those of Calc, the names | 14574 | operators and functions in Yacas are similar to those of Calc, the names |
| 14575 | of built-in functions in Yacas are capitalized. The Calc formula | 14575 | of built-in functions in Yacas are capitalized. The Calc formula |
| 14576 | @samp{sin(2 x)}, for example, is entered and displayed @samp{Sin(2 x)} | 14576 | @samp{sin(2 x)}, for example, is entered and displayed @samp{Sin(2 x)} |
| 14577 | in Yacas mode, and `@samp{arcsin(x^2)} is @samp{ArcSin(x^2)} in Yacas | 14577 | in Yacas mode, and `@samp{arcsin(x^2)} is @samp{ArcSin(x^2)} in Yacas |
| 14578 | mode. Complex numbers are written are written @samp{3 + 4 I}. | 14578 | mode. Complex numbers are written are written @samp{3 + 4 I}. |
| @@ -14581,9 +14581,9 @@ The standard special constants are written @code{Pi}, @code{E}, | |||
| 14581 | represents both @code{inf} and @code{uinf}, and @code{Undefined} | 14581 | represents both @code{inf} and @code{uinf}, and @code{Undefined} |
| 14582 | represents @code{nan}. | 14582 | represents @code{nan}. |
| 14583 | 14583 | ||
| 14584 | Certain operators on functions, such as @code{D} for differentiation | 14584 | Certain operators on functions, such as @code{D} for differentiation |
| 14585 | and @code{Integrate} for integration, take a prefix form in Yacas. For | 14585 | and @code{Integrate} for integration, take a prefix form in Yacas. For |
| 14586 | example, the derivative of @w{@samp{e^x sin(x)}} can be computed with | 14586 | example, the derivative of @w{@samp{e^x sin(x)}} can be computed with |
| 14587 | @w{@samp{D(x) Exp(x)*Sin(x)}}. | 14587 | @w{@samp{D(x) Exp(x)*Sin(x)}}. |
| 14588 | 14588 | ||
| 14589 | Other notable differences between Yacas and standard Calc expressions | 14589 | Other notable differences between Yacas and standard Calc expressions |
| @@ -14602,7 +14602,7 @@ use square brackets. If, for example, @samp{A} represents the list | |||
| 14602 | The @kbd{d X} (@code{calc-maxima-language}) command selects the | 14602 | The @kbd{d X} (@code{calc-maxima-language}) command selects the |
| 14603 | conventions of Maxima, another free computer algebra system. The | 14603 | conventions of Maxima, another free computer algebra system. The |
| 14604 | function names in Maxima are similar, but not always identical, to Calc. | 14604 | function names in Maxima are similar, but not always identical, to Calc. |
| 14605 | For example, instead of @samp{arcsin(x)}, Maxima will use | 14605 | For example, instead of @samp{arcsin(x)}, Maxima will use |
| 14606 | @samp{asin(x)}. Complex numbers are written @samp{3 + 4 %i}. The | 14606 | @samp{asin(x)}. Complex numbers are written @samp{3 + 4 %i}. The |
| 14607 | standard special constants are written @code{%pi}, @code{%e}, | 14607 | standard special constants are written @code{%pi}, @code{%e}, |
| 14608 | @code{%i}, @code{%phi} and @code{%gamma}. In Maxima, @code{inf} means | 14608 | @code{%i}, @code{%phi} and @code{%gamma}. In Maxima, @code{inf} means |
| @@ -14610,8 +14610,8 @@ the same as in Calc, but @code{infinity} represents Calc's @code{uinf}. | |||
| 14610 | 14610 | ||
| 14611 | Underscores as well as percent signs are allowed in function and | 14611 | Underscores as well as percent signs are allowed in function and |
| 14612 | variable names in Maxima mode. The underscore again is equivalent to | 14612 | variable names in Maxima mode. The underscore again is equivalent to |
| 14613 | the @samp{#} in Normal mode, and the percent sign is equivalent to | 14613 | the @samp{#} in Normal mode, and the percent sign is equivalent to |
| 14614 | @samp{o'o}. | 14614 | @samp{o'o}. |
| 14615 | 14615 | ||
| 14616 | Maxima uses square brackets for lists and vectors, and matrices are | 14616 | Maxima uses square brackets for lists and vectors, and matrices are |
| 14617 | written as calls to the function @code{matrix}, given the row vectors of | 14617 | written as calls to the function @code{matrix}, given the row vectors of |
| @@ -14629,7 +14629,7 @@ conventions of Giac, another free computer algebra system. The function | |||
| 14629 | names in Giac are similar to Maxima. Complex numbers are written | 14629 | names in Giac are similar to Maxima. Complex numbers are written |
| 14630 | @samp{3 + 4 i}. The standard special constants in Giac are the same as | 14630 | @samp{3 + 4 i}. The standard special constants in Giac are the same as |
| 14631 | in Calc, except that @code{infinity} represents both Calc's @code{inf} | 14631 | in Calc, except that @code{infinity} represents both Calc's @code{inf} |
| 14632 | and @code{uinf}. | 14632 | and @code{uinf}. |
| 14633 | 14633 | ||
| 14634 | Underscores are allowed in function and variable names in Giac mode. | 14634 | Underscores are allowed in function and variable names in Giac mode. |
| 14635 | Brackets are used for subscripts. In Giac, indexing of lists begins at | 14635 | Brackets are used for subscripts. In Giac, indexing of lists begins at |
| @@ -15786,9 +15786,9 @@ Command is @kbd{m p}. | |||
| 15786 | @item | 15786 | @item |
| 15787 | Matrix/Scalar mode. Default value is @mathit{-1}. Value is 0 for Scalar | 15787 | Matrix/Scalar mode. Default value is @mathit{-1}. Value is 0 for Scalar |
| 15788 | mode, @mathit{-2} for Matrix mode, @mathit{-3} for square Matrix mode, | 15788 | mode, @mathit{-2} for Matrix mode, @mathit{-3} for square Matrix mode, |
| 15789 | or @var{N} for | 15789 | or @var{N} for |
| 15790 | @texline @math{N\times N} | 15790 | @texline @math{N\times N} |
| 15791 | @infoline @var{N}x@var{N} | 15791 | @infoline @var{N}x@var{N} |
| 15792 | Matrix mode. Command is @kbd{m v}. | 15792 | Matrix mode. Command is @kbd{m v}. |
| 15793 | 15793 | ||
| 15794 | @item | 15794 | @item |
| @@ -16178,7 +16178,7 @@ whereas @w{@samp{[-2 ..@: 3] ^ 2}} is @samp{[0 ..@: 9]}. | |||
| 16178 | @mindex @null | 16178 | @mindex @null |
| 16179 | @end ignore | 16179 | @end ignore |
| 16180 | @tindex / | 16180 | @tindex / |
| 16181 | The @kbd{/} (@code{calc-divide}) command divides two numbers. | 16181 | The @kbd{/} (@code{calc-divide}) command divides two numbers. |
| 16182 | 16182 | ||
| 16183 | When combining multiplication and division in an algebraic formula, it | 16183 | When combining multiplication and division in an algebraic formula, it |
| 16184 | is good style to use parentheses to distinguish between possible | 16184 | is good style to use parentheses to distinguish between possible |
| @@ -16187,7 +16187,7 @@ interpretations; the expression @samp{a/b*c} should be written | |||
| 16187 | parentheses, Calc will interpret @samp{a/b*c} as @samp{a/(b*c)}, since | 16187 | parentheses, Calc will interpret @samp{a/b*c} as @samp{a/(b*c)}, since |
| 16188 | in algebraic entry Calc gives division a lower precedence than | 16188 | in algebraic entry Calc gives division a lower precedence than |
| 16189 | multiplication. (This is not standard across all computer languages, and | 16189 | multiplication. (This is not standard across all computer languages, and |
| 16190 | Calc may change the precedence depending on the language mode being used. | 16190 | Calc may change the precedence depending on the language mode being used. |
| 16191 | @xref{Language Modes}.) This default ordering can be changed by setting | 16191 | @xref{Language Modes}.) This default ordering can be changed by setting |
| 16192 | the customizable variable @code{calc-multiplication-has-precedence} to | 16192 | the customizable variable @code{calc-multiplication-has-precedence} to |
| 16193 | @code{nil} (@pxref{Customizing Calc}); this will give multiplication and | 16193 | @code{nil} (@pxref{Customizing Calc}); this will give multiplication and |
| @@ -16373,7 +16373,7 @@ all the arguments.) | |||
| 16373 | The @kbd{f M} (@code{calc-mant-part}) [@code{mant}] function extracts | 16373 | The @kbd{f M} (@code{calc-mant-part}) [@code{mant}] function extracts |
| 16374 | the ``mantissa'' part @expr{m} of its floating-point argument; @kbd{f X} | 16374 | the ``mantissa'' part @expr{m} of its floating-point argument; @kbd{f X} |
| 16375 | (@code{calc-xpon-part}) [@code{xpon}] extracts the ``exponent'' part | 16375 | (@code{calc-xpon-part}) [@code{xpon}] extracts the ``exponent'' part |
| 16376 | @expr{e}. The original number is equal to | 16376 | @expr{e}. The original number is equal to |
| 16377 | @texline @math{m \times 10^e}, | 16377 | @texline @math{m \times 10^e}, |
| 16378 | @infoline @expr{m * 10^e}, | 16378 | @infoline @expr{m * 10^e}, |
| 16379 | where @expr{m} is in the interval @samp{[1.0 ..@: 10.0)} except that | 16379 | where @expr{m} is in the interval @samp{[1.0 ..@: 10.0)} except that |
| @@ -16406,9 +16406,9 @@ floating-point numbers, the change is by one unit in the last place. | |||
| 16406 | For example, incrementing @samp{12.3456} when the current precision | 16406 | For example, incrementing @samp{12.3456} when the current precision |
| 16407 | is 6 digits yields @samp{12.3457}. If the current precision had been | 16407 | is 6 digits yields @samp{12.3457}. If the current precision had been |
| 16408 | 8 digits, the result would have been @samp{12.345601}. Incrementing | 16408 | 8 digits, the result would have been @samp{12.345601}. Incrementing |
| 16409 | @samp{0.0} produces | 16409 | @samp{0.0} produces |
| 16410 | @texline @math{10^{-p}}, | 16410 | @texline @math{10^{-p}}, |
| 16411 | @infoline @expr{10^-p}, | 16411 | @infoline @expr{10^-p}, |
| 16412 | where @expr{p} is the current | 16412 | where @expr{p} is the current |
| 16413 | precision. These operations are defined only on integers and floats. | 16413 | precision. These operations are defined only on integers and floats. |
| 16414 | With numeric prefix arguments, they change the number by @expr{n} units. | 16414 | With numeric prefix arguments, they change the number by @expr{n} units. |
| @@ -16852,7 +16852,7 @@ The last two arguments default to zero if omitted. | |||
| 16852 | The @kbd{t J} (@code{calc-julian}) [@code{julian}] command converts | 16852 | The @kbd{t J} (@code{calc-julian}) [@code{julian}] command converts |
| 16853 | a date form into a Julian day count, which is the number of days | 16853 | a date form into a Julian day count, which is the number of days |
| 16854 | since noon (GMT) on Jan 1, 4713 BC. A pure date is converted to an | 16854 | since noon (GMT) on Jan 1, 4713 BC. A pure date is converted to an |
| 16855 | integer Julian count representing noon of that day. A date/time form | 16855 | integer Julian count representing noon of that day. A date/time form |
| 16856 | is converted to an exact floating-point Julian count, adjusted to | 16856 | is converted to an exact floating-point Julian count, adjusted to |
| 16857 | interpret the date form in the current time zone but the Julian | 16857 | interpret the date form in the current time zone but the Julian |
| 16858 | day count in Greenwich Mean Time. A numeric prefix argument allows | 16858 | day count in Greenwich Mean Time. A numeric prefix argument allows |
| @@ -17294,12 +17294,12 @@ With no arguments, @code{calc-time-zone} or @samp{tzone()} will by | |||
| 17294 | default get the time zone and daylight saving information from the | 17294 | default get the time zone and daylight saving information from the |
| 17295 | calendar (@pxref{Daylight Saving,Calendar/Diary,The Calendar and the Diary, | 17295 | calendar (@pxref{Daylight Saving,Calendar/Diary,The Calendar and the Diary, |
| 17296 | emacs,The GNU Emacs Manual}). To use a different time zone, or if the | 17296 | emacs,The GNU Emacs Manual}). To use a different time zone, or if the |
| 17297 | calendar does not give the desired result, you can set the Calc variable | 17297 | calendar does not give the desired result, you can set the Calc variable |
| 17298 | @code{TimeZone} (which is by default @code{nil}) to an appropriate | 17298 | @code{TimeZone} (which is by default @code{nil}) to an appropriate |
| 17299 | time zone name. (The easiest way to do this is to edit the | 17299 | time zone name. (The easiest way to do this is to edit the |
| 17300 | @code{TimeZone} variable using Calc's @kbd{s T} command, then use the | 17300 | @code{TimeZone} variable using Calc's @kbd{s T} command, then use the |
| 17301 | @kbd{s p} (@code{calc-permanent-variable}) command to save the value of | 17301 | @kbd{s p} (@code{calc-permanent-variable}) command to save the value of |
| 17302 | @code{TimeZone} permanently.) | 17302 | @code{TimeZone} permanently.) |
| 17303 | If the time zone given by @code{TimeZone} is a generalized time zone, | 17303 | If the time zone given by @code{TimeZone} is a generalized time zone, |
| 17304 | e.g., @code{EGT}, Calc examines the date being converted to tell whether | 17304 | e.g., @code{EGT}, Calc examines the date being converted to tell whether |
| 17305 | to use standard or daylight saving time. But if the current time zone | 17305 | to use standard or daylight saving time. But if the current time zone |
| @@ -17311,12 +17311,12 @@ from the calendar. | |||
| 17311 | 17311 | ||
| 17312 | The @kbd{t J} and @code{t U} commands with no numeric prefix | 17312 | The @kbd{t J} and @code{t U} commands with no numeric prefix |
| 17313 | arguments do the same thing as @samp{tzone()}; namely, use the | 17313 | arguments do the same thing as @samp{tzone()}; namely, use the |
| 17314 | information from the calendar if @code{TimeZone} is @code{nil}, | 17314 | information from the calendar if @code{TimeZone} is @code{nil}, |
| 17315 | otherwise use the time zone given by @code{TimeZone}. | 17315 | otherwise use the time zone given by @code{TimeZone}. |
| 17316 | 17316 | ||
| 17317 | @vindex math-daylight-savings-hook | 17317 | @vindex math-daylight-savings-hook |
| 17318 | @findex math-std-daylight-savings | 17318 | @findex math-std-daylight-savings |
| 17319 | When Calc computes the daylight saving information itself (i.e., when | 17319 | When Calc computes the daylight saving information itself (i.e., when |
| 17320 | the @code{TimeZone} variable is set), it will by default consider | 17320 | the @code{TimeZone} variable is set), it will by default consider |
| 17321 | daylight saving time to begin at 2 a.m.@: on the second Sunday of March | 17321 | daylight saving time to begin at 2 a.m.@: on the second Sunday of March |
| 17322 | (for years from 2007 on) or on the last Sunday in April (for years | 17322 | (for years from 2007 on) or on the last Sunday in April (for years |
| @@ -17392,7 +17392,7 @@ falls in this hour results in a time value for the following hour, | |||
| 17392 | from 3 a.m.@: to 4 a.m. At the end of daylight saving time, the | 17392 | from 3 a.m.@: to 4 a.m. At the end of daylight saving time, the |
| 17393 | hour from 1 a.m.@: to 2 a.m.@: repeats itself; converting a date/time | 17393 | hour from 1 a.m.@: to 2 a.m.@: repeats itself; converting a date/time |
| 17394 | form that falls in this hour results in a time value for the first | 17394 | form that falls in this hour results in a time value for the first |
| 17395 | manifestation of that time (@emph{not} the one that occurs one hour | 17395 | manifestation of that time (@emph{not} the one that occurs one hour |
| 17396 | later). | 17396 | later). |
| 17397 | 17397 | ||
| 17398 | If @code{math-daylight-savings-hook} is @code{nil}, then the | 17398 | If @code{math-daylight-savings-hook} is @code{nil}, then the |
| @@ -17995,12 +17995,12 @@ particular, negative arguments are converted to positive integers modulo | |||
| 17995 | @expr{2^w} by all binary functions. | 17995 | @expr{2^w} by all binary functions. |
| 17996 | 17996 | ||
| 17997 | If the word size is negative, binary operations produce twos-complement | 17997 | If the word size is negative, binary operations produce twos-complement |
| 17998 | integers from | 17998 | integers from |
| 17999 | @texline @math{-2^{-w-1}} | 17999 | @texline @math{-2^{-w-1}} |
| 18000 | @infoline @expr{-(2^(-w-1))} | 18000 | @infoline @expr{-(2^(-w-1))} |
| 18001 | to | 18001 | to |
| 18002 | @texline @math{2^{-w-1}-1} | 18002 | @texline @math{2^{-w-1}-1} |
| 18003 | @infoline @expr{2^(-w-1)-1} | 18003 | @infoline @expr{2^(-w-1)-1} |
| 18004 | inclusive. Either mode accepts inputs in any range; the sign of | 18004 | inclusive. Either mode accepts inputs in any range; the sign of |
| 18005 | @expr{w} affects only the results produced. | 18005 | @expr{w} affects only the results produced. |
| 18006 | 18006 | ||
| @@ -18182,13 +18182,13 @@ flag keys must be used to get some of these functions from the keyboard. | |||
| 18182 | One miscellaneous command is shift-@kbd{P} (@code{calc-pi}), which pushes | 18182 | One miscellaneous command is shift-@kbd{P} (@code{calc-pi}), which pushes |
| 18183 | the value of @cpi{} (at the current precision) onto the stack. With the | 18183 | the value of @cpi{} (at the current precision) onto the stack. With the |
| 18184 | Hyperbolic flag, it pushes the value @expr{e}, the base of natural logarithms. | 18184 | Hyperbolic flag, it pushes the value @expr{e}, the base of natural logarithms. |
| 18185 | With the Inverse flag, it pushes Euler's constant | 18185 | With the Inverse flag, it pushes Euler's constant |
| 18186 | @texline @math{\gamma} | 18186 | @texline @math{\gamma} |
| 18187 | @infoline @expr{gamma} | 18187 | @infoline @expr{gamma} |
| 18188 | (about 0.5772). With both Inverse and Hyperbolic, it | 18188 | (about 0.5772). With both Inverse and Hyperbolic, it |
| 18189 | pushes the ``golden ratio'' | 18189 | pushes the ``golden ratio'' |
| 18190 | @texline @math{\phi} | 18190 | @texline @math{\phi} |
| 18191 | @infoline @expr{phi} | 18191 | @infoline @expr{phi} |
| 18192 | (about 1.618). (At present, Euler's constant is not available | 18192 | (about 1.618). (At present, Euler's constant is not available |
| 18193 | to unlimited precision; Calc knows only the first 100 digits.) | 18193 | to unlimited precision; Calc knows only the first 100 digits.) |
| 18194 | In Symbolic mode, these commands push the | 18194 | In Symbolic mode, these commands push the |
| @@ -18266,7 +18266,7 @@ The @kbd{H L} (@code{calc-log10}) [@code{log10}] command computes the common | |||
| 18266 | (base-10) logarithm of a number. (With the Inverse flag [@code{exp10}], | 18266 | (base-10) logarithm of a number. (With the Inverse flag [@code{exp10}], |
| 18267 | it raises ten to a given power.) Note that the common logarithm of a | 18267 | it raises ten to a given power.) Note that the common logarithm of a |
| 18268 | complex number is computed by taking the natural logarithm and dividing | 18268 | complex number is computed by taking the natural logarithm and dividing |
| 18269 | by | 18269 | by |
| 18270 | @texline @math{\ln10}. | 18270 | @texline @math{\ln10}. |
| 18271 | @infoline @expr{ln(10)}. | 18271 | @infoline @expr{ln(10)}. |
| 18272 | 18272 | ||
| @@ -18278,7 +18278,7 @@ by | |||
| 18278 | The @kbd{B} (@code{calc-log}) [@code{log}] command computes a logarithm | 18278 | The @kbd{B} (@code{calc-log}) [@code{log}] command computes a logarithm |
| 18279 | to any base. For example, @kbd{1024 @key{RET} 2 B} produces 10, since | 18279 | to any base. For example, @kbd{1024 @key{RET} 2 B} produces 10, since |
| 18280 | @texline @math{2^{10} = 1024}. | 18280 | @texline @math{2^{10} = 1024}. |
| 18281 | @infoline @expr{2^10 = 1024}. | 18281 | @infoline @expr{2^10 = 1024}. |
| 18282 | In certain cases like @samp{log(3,9)}, the result | 18282 | In certain cases like @samp{log(3,9)}, the result |
| 18283 | will be either @expr{1:2} or @expr{0.5} depending on the current Fraction | 18283 | will be either @expr{1:2} or @expr{0.5} depending on the current Fraction |
| 18284 | mode setting. With the Inverse flag [@code{alog}], this command is | 18284 | mode setting. With the Inverse flag [@code{alog}], this command is |
| @@ -18300,11 +18300,11 @@ integer arithmetic is used; otherwise, this is equivalent to | |||
| 18300 | @tindex expm1 | 18300 | @tindex expm1 |
| 18301 | The @kbd{f E} (@code{calc-expm1}) [@code{expm1}] command computes | 18301 | The @kbd{f E} (@code{calc-expm1}) [@code{expm1}] command computes |
| 18302 | @texline @math{e^x - 1}, | 18302 | @texline @math{e^x - 1}, |
| 18303 | @infoline @expr{exp(x)-1}, | 18303 | @infoline @expr{exp(x)-1}, |
| 18304 | but using an algorithm that produces a more accurate | 18304 | but using an algorithm that produces a more accurate |
| 18305 | answer when the result is close to zero, i.e., when | 18305 | answer when the result is close to zero, i.e., when |
| 18306 | @texline @math{e^x} | 18306 | @texline @math{e^x} |
| 18307 | @infoline @expr{exp(x)} | 18307 | @infoline @expr{exp(x)} |
| 18308 | is close to one. | 18308 | is close to one. |
| 18309 | 18309 | ||
| 18310 | @kindex f L | 18310 | @kindex f L |
| @@ -18312,7 +18312,7 @@ is close to one. | |||
| 18312 | @tindex lnp1 | 18312 | @tindex lnp1 |
| 18313 | The @kbd{f L} (@code{calc-lnp1}) [@code{lnp1}] command computes | 18313 | The @kbd{f L} (@code{calc-lnp1}) [@code{lnp1}] command computes |
| 18314 | @texline @math{\ln(x+1)}, | 18314 | @texline @math{\ln(x+1)}, |
| 18315 | @infoline @expr{ln(x+1)}, | 18315 | @infoline @expr{ln(x+1)}, |
| 18316 | producing a more accurate answer when @expr{x} is close to zero. | 18316 | producing a more accurate answer when @expr{x} is close to zero. |
| 18317 | 18317 | ||
| 18318 | @node Trigonometric and Hyperbolic Functions, Advanced Math Functions, Logarithmic Functions, Scientific Functions | 18318 | @node Trigonometric and Hyperbolic Functions, Advanced Math Functions, Logarithmic Functions, Scientific Functions |
| @@ -18515,9 +18515,9 @@ The @kbd{f g} (@code{calc-gamma}) [@code{gamma}] command computes the Euler | |||
| 18515 | gamma function. For positive integer arguments, this is related to the | 18515 | gamma function. For positive integer arguments, this is related to the |
| 18516 | factorial function: @samp{gamma(n+1) = fact(n)}. For general complex | 18516 | factorial function: @samp{gamma(n+1) = fact(n)}. For general complex |
| 18517 | arguments the gamma function can be defined by the following definite | 18517 | arguments the gamma function can be defined by the following definite |
| 18518 | integral: | 18518 | integral: |
| 18519 | @texline @math{\Gamma(a) = \int_0^\infty t^{a-1} e^t dt}. | 18519 | @texline @math{\Gamma(a) = \int_0^\infty t^{a-1} e^t dt}. |
| 18520 | @infoline @expr{gamma(a) = integ(t^(a-1) exp(t), t, 0, inf)}. | 18520 | @infoline @expr{gamma(a) = integ(t^(a-1) exp(t), t, 0, inf)}. |
| 18521 | (The actual implementation uses far more efficient computational methods.) | 18521 | (The actual implementation uses far more efficient computational methods.) |
| 18522 | 18522 | ||
| 18523 | @kindex f G | 18523 | @kindex f G |
| @@ -18549,7 +18549,7 @@ integral: | |||
| 18549 | @tindex gammaG | 18549 | @tindex gammaG |
| 18550 | The @kbd{f G} (@code{calc-inc-gamma}) [@code{gammaP}] command computes | 18550 | The @kbd{f G} (@code{calc-inc-gamma}) [@code{gammaP}] command computes |
| 18551 | the incomplete gamma function, denoted @samp{P(a,x)}. This is defined by | 18551 | the incomplete gamma function, denoted @samp{P(a,x)}. This is defined by |
| 18552 | the integral, | 18552 | the integral, |
| 18553 | @texline @math{P(a,x) = \left( \int_0^x t^{a-1} e^t dt \right) / \Gamma(a)}. | 18553 | @texline @math{P(a,x) = \left( \int_0^x t^{a-1} e^t dt \right) / \Gamma(a)}. |
| 18554 | @infoline @expr{gammaP(a,x) = integ(t^(a-1) exp(t), t, 0, x) / gamma(a)}. | 18554 | @infoline @expr{gammaP(a,x) = integ(t^(a-1) exp(t), t, 0, x) / gamma(a)}. |
| 18555 | This implies that @samp{gammaP(a,inf) = 1} for any @expr{a} (see the | 18555 | This implies that @samp{gammaP(a,inf) = 1} for any @expr{a} (see the |
| @@ -18583,7 +18583,7 @@ You can obtain these using the \kbd{H f G} [\code{gammag}] and | |||
| 18583 | The @kbd{f b} (@code{calc-beta}) [@code{beta}] command computes the | 18583 | The @kbd{f b} (@code{calc-beta}) [@code{beta}] command computes the |
| 18584 | Euler beta function, which is defined in terms of the gamma function as | 18584 | Euler beta function, which is defined in terms of the gamma function as |
| 18585 | @texline @math{B(a,b) = \Gamma(a) \Gamma(b) / \Gamma(a+b)}, | 18585 | @texline @math{B(a,b) = \Gamma(a) \Gamma(b) / \Gamma(a+b)}, |
| 18586 | @infoline @expr{beta(a,b) = gamma(a) gamma(b) / gamma(a+b)}, | 18586 | @infoline @expr{beta(a,b) = gamma(a) gamma(b) / gamma(a+b)}, |
| 18587 | or by | 18587 | or by |
| 18588 | @texline @math{B(a,b) = \int_0^1 t^{a-1} (1-t)^{b-1} dt}. | 18588 | @texline @math{B(a,b) = \int_0^1 t^{a-1} (1-t)^{b-1} dt}. |
| 18589 | @infoline @expr{beta(a,b) = integ(t^(a-1) (1-t)^(b-1), t, 0, 1)}. | 18589 | @infoline @expr{beta(a,b) = integ(t^(a-1) (1-t)^(b-1), t, 0, 1)}. |
| @@ -18606,7 +18606,7 @@ un-normalized version [@code{betaB}]. | |||
| 18606 | @tindex erf | 18606 | @tindex erf |
| 18607 | @tindex erfc | 18607 | @tindex erfc |
| 18608 | The @kbd{f e} (@code{calc-erf}) [@code{erf}] command computes the | 18608 | The @kbd{f e} (@code{calc-erf}) [@code{erf}] command computes the |
| 18609 | error function | 18609 | error function |
| 18610 | @texline @math{\hbox{erf}(x) = {2 \over \sqrt{\pi}} \int_0^x e^{-t^2} dt}. | 18610 | @texline @math{\hbox{erf}(x) = {2 \over \sqrt{\pi}} \int_0^x e^{-t^2} dt}. |
| 18611 | @infoline @expr{erf(x) = 2 integ(exp(-(t^2)), t, 0, x) / sqrt(pi)}. | 18611 | @infoline @expr{erf(x) = 2 integ(exp(-(t^2)), t, 0, x) / sqrt(pi)}. |
| 18612 | The complementary error function @kbd{I f e} (@code{calc-erfc}) [@code{erfc}] | 18612 | The complementary error function @kbd{I f e} (@code{calc-erfc}) [@code{erfc}] |
| @@ -18784,9 +18784,9 @@ The @kbd{k r} (@code{calc-random}) [@code{random}] command produces | |||
| 18784 | random numbers of various sorts. | 18784 | random numbers of various sorts. |
| 18785 | 18785 | ||
| 18786 | Given a positive numeric prefix argument @expr{M}, it produces a random | 18786 | Given a positive numeric prefix argument @expr{M}, it produces a random |
| 18787 | integer @expr{N} in the range | 18787 | integer @expr{N} in the range |
| 18788 | @texline @math{0 \le N < M}. | 18788 | @texline @math{0 \le N < M}. |
| 18789 | @infoline @expr{0 <= N < M}. | 18789 | @infoline @expr{0 <= N < M}. |
| 18790 | Each possible value @expr{N} appears with equal probability. | 18790 | Each possible value @expr{N} appears with equal probability. |
| 18791 | 18791 | ||
| 18792 | With no numeric prefix argument, the @kbd{k r} command takes its argument | 18792 | With no numeric prefix argument, the @kbd{k r} command takes its argument |
| @@ -18794,17 +18794,17 @@ from the stack instead. Once again, if this is a positive integer @expr{M} | |||
| 18794 | the result is a random integer less than @expr{M}. However, note that | 18794 | the result is a random integer less than @expr{M}. However, note that |
| 18795 | while numeric prefix arguments are limited to six digits or so, an @expr{M} | 18795 | while numeric prefix arguments are limited to six digits or so, an @expr{M} |
| 18796 | taken from the stack can be arbitrarily large. If @expr{M} is negative, | 18796 | taken from the stack can be arbitrarily large. If @expr{M} is negative, |
| 18797 | the result is a random integer in the range | 18797 | the result is a random integer in the range |
| 18798 | @texline @math{M < N \le 0}. | 18798 | @texline @math{M < N \le 0}. |
| 18799 | @infoline @expr{M < N <= 0}. | 18799 | @infoline @expr{M < N <= 0}. |
| 18800 | 18800 | ||
| 18801 | If the value on the stack is a floating-point number @expr{M}, the result | 18801 | If the value on the stack is a floating-point number @expr{M}, the result |
| 18802 | is a random floating-point number @expr{N} in the range | 18802 | is a random floating-point number @expr{N} in the range |
| 18803 | @texline @math{0 \le N < M} | 18803 | @texline @math{0 \le N < M} |
| 18804 | @infoline @expr{0 <= N < M} | 18804 | @infoline @expr{0 <= N < M} |
| 18805 | or | 18805 | or |
| 18806 | @texline @math{M < N \le 0}, | 18806 | @texline @math{M < N \le 0}, |
| 18807 | @infoline @expr{M < N <= 0}, | 18807 | @infoline @expr{M < N <= 0}, |
| 18808 | according to the sign of @expr{M}. | 18808 | according to the sign of @expr{M}. |
| 18809 | 18809 | ||
| 18810 | If @expr{M} is zero, the result is a Gaussian-distributed random real | 18810 | If @expr{M} is zero, the result is a Gaussian-distributed random real |
| @@ -18812,14 +18812,14 @@ number; the distribution has a mean of zero and a standard deviation | |||
| 18812 | of one. The algorithm used generates random numbers in pairs; thus, | 18812 | of one. The algorithm used generates random numbers in pairs; thus, |
| 18813 | every other call to this function will be especially fast. | 18813 | every other call to this function will be especially fast. |
| 18814 | 18814 | ||
| 18815 | If @expr{M} is an error form | 18815 | If @expr{M} is an error form |
| 18816 | @texline @math{m} @code{+/-} @math{\sigma} | 18816 | @texline @math{m} @code{+/-} @math{\sigma} |
| 18817 | @infoline @samp{m +/- s} | 18817 | @infoline @samp{m +/- s} |
| 18818 | where @var{m} and | 18818 | where @var{m} and |
| 18819 | @texline @math{\sigma} | 18819 | @texline @math{\sigma} |
| 18820 | @infoline @var{s} | 18820 | @infoline @var{s} |
| 18821 | are both real numbers, the result uses a Gaussian distribution with mean | 18821 | are both real numbers, the result uses a Gaussian distribution with mean |
| 18822 | @var{m} and standard deviation | 18822 | @var{m} and standard deviation |
| 18823 | @texline @math{\sigma}. | 18823 | @texline @math{\sigma}. |
| 18824 | @infoline @var{s}. | 18824 | @infoline @var{s}. |
| 18825 | 18825 | ||
| @@ -18932,9 +18932,9 @@ generators that are typically used to implement @code{random}. | |||
| 18932 | 18932 | ||
| 18933 | If @code{RandSeed} contains an integer, Calc uses this integer to | 18933 | If @code{RandSeed} contains an integer, Calc uses this integer to |
| 18934 | seed an ``additive congruential'' method (Knuth's algorithm 3.2.2A, | 18934 | seed an ``additive congruential'' method (Knuth's algorithm 3.2.2A, |
| 18935 | computing | 18935 | computing |
| 18936 | @texline @math{X_{n-55} - X_{n-24}}. | 18936 | @texline @math{X_{n-55} - X_{n-24}}. |
| 18937 | @infoline @expr{X_n-55 - X_n-24}). | 18937 | @infoline @expr{X_n-55 - X_n-24}). |
| 18938 | This method expands the seed | 18938 | This method expands the seed |
| 18939 | value into a large table which is maintained internally; the variable | 18939 | value into a large table which is maintained internally; the variable |
| 18940 | @code{RandSeed} is changed from, e.g., 42 to the vector @expr{[42]} | 18940 | @code{RandSeed} is changed from, e.g., 42 to the vector @expr{[42]} |
| @@ -18970,18 +18970,18 @@ value. | |||
| 18970 | To create a random floating-point number with precision @var{p}, Calc | 18970 | To create a random floating-point number with precision @var{p}, Calc |
| 18971 | simply creates a random @var{p}-digit integer and multiplies by | 18971 | simply creates a random @var{p}-digit integer and multiplies by |
| 18972 | @texline @math{10^{-p}}. | 18972 | @texline @math{10^{-p}}. |
| 18973 | @infoline @expr{10^-p}. | 18973 | @infoline @expr{10^-p}. |
| 18974 | The resulting random numbers should be very clean, but note | 18974 | The resulting random numbers should be very clean, but note |
| 18975 | that relatively small numbers will have few significant random digits. | 18975 | that relatively small numbers will have few significant random digits. |
| 18976 | In other words, with a precision of 12, you will occasionally get | 18976 | In other words, with a precision of 12, you will occasionally get |
| 18977 | numbers on the order of | 18977 | numbers on the order of |
| 18978 | @texline @math{10^{-9}} | 18978 | @texline @math{10^{-9}} |
| 18979 | @infoline @expr{10^-9} | 18979 | @infoline @expr{10^-9} |
| 18980 | or | 18980 | or |
| 18981 | @texline @math{10^{-10}}, | 18981 | @texline @math{10^{-10}}, |
| 18982 | @infoline @expr{10^-10}, | 18982 | @infoline @expr{10^-10}, |
| 18983 | but those numbers will only have two or three random digits since they | 18983 | but those numbers will only have two or three random digits since they |
| 18984 | correspond to small integers times | 18984 | correspond to small integers times |
| 18985 | @texline @math{10^{-12}}. | 18985 | @texline @math{10^{-12}}. |
| 18986 | @infoline @expr{10^-12}. | 18986 | @infoline @expr{10^-12}. |
| 18987 | 18987 | ||
| @@ -19032,7 +19032,7 @@ numbers. | |||
| 19032 | @tindex egcd | 19032 | @tindex egcd |
| 19033 | The @kbd{k E} (@code{calc-extended-gcd}) [@code{egcd}] command computes | 19033 | The @kbd{k E} (@code{calc-extended-gcd}) [@code{egcd}] command computes |
| 19034 | the GCD of two integers @expr{x} and @expr{y} and returns a vector | 19034 | the GCD of two integers @expr{x} and @expr{y} and returns a vector |
| 19035 | @expr{[g, a, b]} where | 19035 | @expr{[g, a, b]} where |
| 19036 | @texline @math{g = \gcd(x,y) = a x + b y}. | 19036 | @texline @math{g = \gcd(x,y) = a x + b y}. |
| 19037 | @infoline @expr{g = gcd(x,y) = a x + b y}. | 19037 | @infoline @expr{g = gcd(x,y) = a x + b y}. |
| 19038 | 19038 | ||
| @@ -19119,11 +19119,11 @@ functions. | |||
| 19119 | @tindex stir1 | 19119 | @tindex stir1 |
| 19120 | @tindex stir2 | 19120 | @tindex stir2 |
| 19121 | The @kbd{k s} (@code{calc-stirling-number}) [@code{stir1}] command | 19121 | The @kbd{k s} (@code{calc-stirling-number}) [@code{stir1}] command |
| 19122 | computes a Stirling number of the first | 19122 | computes a Stirling number of the first |
| 19123 | @texline kind@tie{}@math{n \brack m}, | 19123 | @texline kind@tie{}@math{n \brack m}, |
| 19124 | @infoline kind, | 19124 | @infoline kind, |
| 19125 | given two integers @expr{n} and @expr{m} on the stack. The @kbd{H k s} | 19125 | given two integers @expr{n} and @expr{m} on the stack. The @kbd{H k s} |
| 19126 | [@code{stir2}] command computes a Stirling number of the second | 19126 | [@code{stir2}] command computes a Stirling number of the second |
| 19127 | @texline kind@tie{}@math{n \brace m}. | 19127 | @texline kind@tie{}@math{n \brace m}. |
| 19128 | @infoline kind. | 19128 | @infoline kind. |
| 19129 | These are the number of @expr{m}-cycle permutations of @expr{n} objects, | 19129 | These are the number of @expr{m}-cycle permutations of @expr{n} objects, |
| @@ -19202,7 +19202,7 @@ analogously finds the next prime less than a given number. | |||
| 19202 | @pindex calc-totient | 19202 | @pindex calc-totient |
| 19203 | @tindex totient | 19203 | @tindex totient |
| 19204 | The @kbd{k t} (@code{calc-totient}) [@code{totient}] command computes the | 19204 | The @kbd{k t} (@code{calc-totient}) [@code{totient}] command computes the |
| 19205 | Euler ``totient'' | 19205 | Euler ``totient'' |
| 19206 | @texline function@tie{}@math{\phi(n)}, | 19206 | @texline function@tie{}@math{\phi(n)}, |
| 19207 | @infoline function, | 19207 | @infoline function, |
| 19208 | the number of integers less than @expr{n} which | 19208 | the number of integers less than @expr{n} which |
| @@ -19277,7 +19277,7 @@ recover the original arguments but substitute a new value for @expr{x}.) | |||
| 19277 | @tindex ltpc | 19277 | @tindex ltpc |
| 19278 | The @samp{utpc(x,v)} function uses the chi-square distribution with | 19278 | The @samp{utpc(x,v)} function uses the chi-square distribution with |
| 19279 | @texline @math{\nu} | 19279 | @texline @math{\nu} |
| 19280 | @infoline @expr{v} | 19280 | @infoline @expr{v} |
| 19281 | degrees of freedom. It is the probability that a model is | 19281 | degrees of freedom. It is the probability that a model is |
| 19282 | correct if its chi-square statistic is @expr{x}. | 19282 | correct if its chi-square statistic is @expr{x}. |
| 19283 | 19283 | ||
| @@ -19293,10 +19293,10 @@ correct if its chi-square statistic is @expr{x}. | |||
| 19293 | @end ignore | 19293 | @end ignore |
| 19294 | @tindex ltpf | 19294 | @tindex ltpf |
| 19295 | The @samp{utpf(F,v1,v2)} function uses the F distribution, used in | 19295 | The @samp{utpf(F,v1,v2)} function uses the F distribution, used in |
| 19296 | various statistical tests. The parameters | 19296 | various statistical tests. The parameters |
| 19297 | @texline @math{\nu_1} | 19297 | @texline @math{\nu_1} |
| 19298 | @infoline @expr{v1} | 19298 | @infoline @expr{v1} |
| 19299 | and | 19299 | and |
| 19300 | @texline @math{\nu_2} | 19300 | @texline @math{\nu_2} |
| 19301 | @infoline @expr{v2} | 19301 | @infoline @expr{v2} |
| 19302 | are the degrees of freedom in the numerator and denominator, | 19302 | are the degrees of freedom in the numerator and denominator, |
| @@ -19314,9 +19314,9 @@ respectively, used in computing the statistic @expr{F}. | |||
| 19314 | @end ignore | 19314 | @end ignore |
| 19315 | @tindex ltpn | 19315 | @tindex ltpn |
| 19316 | The @samp{utpn(x,m,s)} function uses a normal (Gaussian) distribution | 19316 | The @samp{utpn(x,m,s)} function uses a normal (Gaussian) distribution |
| 19317 | with mean @expr{m} and standard deviation | 19317 | with mean @expr{m} and standard deviation |
| 19318 | @texline @math{\sigma}. | 19318 | @texline @math{\sigma}. |
| 19319 | @infoline @expr{s}. | 19319 | @infoline @expr{s}. |
| 19320 | It is the probability that such a normal-distributed random variable | 19320 | It is the probability that such a normal-distributed random variable |
| 19321 | would exceed @expr{x}. | 19321 | would exceed @expr{x}. |
| 19322 | 19322 | ||
| @@ -19347,20 +19347,20 @@ Poisson random events will occur. | |||
| 19347 | @end ignore | 19347 | @end ignore |
| 19348 | @tindex ltpt | 19348 | @tindex ltpt |
| 19349 | The @samp{utpt(t,v)} function uses the Student's ``t'' distribution | 19349 | The @samp{utpt(t,v)} function uses the Student's ``t'' distribution |
| 19350 | with | 19350 | with |
| 19351 | @texline @math{\nu} | 19351 | @texline @math{\nu} |
| 19352 | @infoline @expr{v} | 19352 | @infoline @expr{v} |
| 19353 | degrees of freedom. It is the probability that a | 19353 | degrees of freedom. It is the probability that a |
| 19354 | t-distributed random variable will be greater than @expr{t}. | 19354 | t-distributed random variable will be greater than @expr{t}. |
| 19355 | (Note: This computes the distribution function | 19355 | (Note: This computes the distribution function |
| 19356 | @texline @math{A(t|\nu)} | 19356 | @texline @math{A(t|\nu)} |
| 19357 | @infoline @expr{A(t|v)} | 19357 | @infoline @expr{A(t|v)} |
| 19358 | where | 19358 | where |
| 19359 | @texline @math{A(0|\nu) = 1} | 19359 | @texline @math{A(0|\nu) = 1} |
| 19360 | @infoline @expr{A(0|v) = 1} | 19360 | @infoline @expr{A(0|v) = 1} |
| 19361 | and | 19361 | and |
| 19362 | @texline @math{A(\infty|\nu) \to 0}. | 19362 | @texline @math{A(\infty|\nu) \to 0}. |
| 19363 | @infoline @expr{A(inf|v) -> 0}. | 19363 | @infoline @expr{A(inf|v) -> 0}. |
| 19364 | The @code{UTPT} operation on the HP-48 uses a different definition which | 19364 | The @code{UTPT} operation on the HP-48 uses a different definition which |
| 19365 | returns half of Calc's value: @samp{UTPT(t,v) = .5*utpt(t,v)}.) | 19365 | returns half of Calc's value: @samp{UTPT(t,v) = .5*utpt(t,v)}.) |
| 19366 | 19366 | ||
| @@ -19670,7 +19670,7 @@ prefix, if specified, must match the size of the vector. If the value on | |||
| 19670 | the stack is a scalar, it is used for each element on the diagonal, and | 19670 | the stack is a scalar, it is used for each element on the diagonal, and |
| 19671 | the prefix argument is required. | 19671 | the prefix argument is required. |
| 19672 | 19672 | ||
| 19673 | To build a constant square matrix, e.g., a | 19673 | To build a constant square matrix, e.g., a |
| 19674 | @texline @math{3\times3} | 19674 | @texline @math{3\times3} |
| 19675 | @infoline 3x3 | 19675 | @infoline 3x3 |
| 19676 | matrix filled with ones, use @kbd{0 M-3 v d 1 +}, i.e., build a zero | 19676 | matrix filled with ones, use @kbd{0 M-3 v d 1 +}, i.e., build a zero |
| @@ -19911,7 +19911,7 @@ command. | |||
| 19911 | With the Hyperbolic flag, @kbd{H v l} [@code{mdims}] computes a vector | 19911 | With the Hyperbolic flag, @kbd{H v l} [@code{mdims}] computes a vector |
| 19912 | of the dimensions of a vector, matrix, or higher-order object. For | 19912 | of the dimensions of a vector, matrix, or higher-order object. For |
| 19913 | example, @samp{mdims([[a,b,c],[d,e,f]])} returns @samp{[2, 3]} since | 19913 | example, @samp{mdims([[a,b,c],[d,e,f]])} returns @samp{[2, 3]} since |
| 19914 | its argument is a | 19914 | its argument is a |
| 19915 | @texline @math{2\times3} | 19915 | @texline @math{2\times3} |
| 19916 | @infoline 2x3 | 19916 | @infoline 2x3 |
| 19917 | matrix. | 19917 | matrix. |
| @@ -19945,17 +19945,17 @@ If the number of columns does not evenly divide the number of elements | |||
| 19945 | in the vector, the last row will be short and the result will not be | 19945 | in the vector, the last row will be short and the result will not be |
| 19946 | suitable for use as a matrix. For example, with the matrix | 19946 | suitable for use as a matrix. For example, with the matrix |
| 19947 | @samp{[[1, 2], @w{[3, 4]}]} on the stack, @kbd{v a 4} produces | 19947 | @samp{[[1, 2], @w{[3, 4]}]} on the stack, @kbd{v a 4} produces |
| 19948 | @samp{[[1, 2, 3, 4]]} (a | 19948 | @samp{[[1, 2, 3, 4]]} (a |
| 19949 | @texline @math{1\times4} | 19949 | @texline @math{1\times4} |
| 19950 | @infoline 1x4 | 19950 | @infoline 1x4 |
| 19951 | matrix), @kbd{v a 1} produces @samp{[[1], [2], [3], [4]]} (a | 19951 | matrix), @kbd{v a 1} produces @samp{[[1], [2], [3], [4]]} (a |
| 19952 | @texline @math{4\times1} | 19952 | @texline @math{4\times1} |
| 19953 | @infoline 4x1 | 19953 | @infoline 4x1 |
| 19954 | matrix), @kbd{v a 2} produces @samp{[[1, 2], [3, 4]]} (the original | 19954 | matrix), @kbd{v a 2} produces @samp{[[1, 2], [3, 4]]} (the original |
| 19955 | @texline @math{2\times2} | 19955 | @texline @math{2\times2} |
| 19956 | @infoline 2x2 | 19956 | @infoline 2x2 |
| 19957 | matrix), @w{@kbd{v a 3}} produces @samp{[[1, 2, 3], [4]]} (not a | 19957 | matrix), @w{@kbd{v a 3}} produces @samp{[[1, 2, 3], [4]]} (not a |
| 19958 | matrix), and @kbd{v a 0} produces the flattened list | 19958 | matrix), and @kbd{v a 0} produces the flattened list |
| 19959 | @samp{[1, 2, @w{3, 4}]}. | 19959 | @samp{[1, 2, @w{3, 4}]}. |
| 19960 | 19960 | ||
| 19961 | @cindex Sorting data | 19961 | @cindex Sorting data |
| @@ -20040,9 +20040,9 @@ If no prefix is given, then you will be prompted for a vector which | |||
| 20040 | will be used to determine the bins. (If a positive integer is given at | 20040 | will be used to determine the bins. (If a positive integer is given at |
| 20041 | this prompt, it will be still treated as if it were given as a | 20041 | this prompt, it will be still treated as if it were given as a |
| 20042 | prefix.) Each bin will consist of the interval of numbers closest to | 20042 | prefix.) Each bin will consist of the interval of numbers closest to |
| 20043 | the corresponding number of this new vector; if the vector | 20043 | the corresponding number of this new vector; if the vector |
| 20044 | @expr{[a, b, c, ...]} is entered at the prompt, the bins will be | 20044 | @expr{[a, b, c, ...]} is entered at the prompt, the bins will be |
| 20045 | @expr{(-inf, (a+b)/2]}, @expr{((a+b)/2, (b+c)/2]}, etc. The result of | 20045 | @expr{(-inf, (a+b)/2]}, @expr{((a+b)/2, (b+c)/2]}, etc. The result of |
| 20046 | this command will be a vector counting how many elements of the | 20046 | this command will be a vector counting how many elements of the |
| 20047 | original vector are in each bin. | 20047 | original vector are in each bin. |
| 20048 | 20048 | ||
| @@ -20313,10 +20313,10 @@ and only if it is in both of the input sets. Thus if the input | |||
| 20313 | sets are disjoint, i.e., if they share no common elements, the result | 20313 | sets are disjoint, i.e., if they share no common elements, the result |
| 20314 | will be the empty vector @samp{[]}. Note that the characters @kbd{V} | 20314 | will be the empty vector @samp{[]}. Note that the characters @kbd{V} |
| 20315 | and @kbd{^} were chosen to be close to the conventional mathematical | 20315 | and @kbd{^} were chosen to be close to the conventional mathematical |
| 20316 | notation for set | 20316 | notation for set |
| 20317 | @texline union@tie{}(@math{A \cup B}) | 20317 | @texline union@tie{}(@math{A \cup B}) |
| 20318 | @infoline union | 20318 | @infoline union |
| 20319 | and | 20319 | and |
| 20320 | @texline intersection@tie{}(@math{A \cap B}). | 20320 | @texline intersection@tie{}(@math{A \cap B}). |
| 20321 | @infoline intersection. | 20321 | @infoline intersection. |
| 20322 | 20322 | ||
| @@ -20432,7 +20432,7 @@ the same set. The set may include positive infinity, but must | |||
| 20432 | not include any negative numbers. The input is interpreted as a | 20432 | not include any negative numbers. The input is interpreted as a |
| 20433 | set of integers in the sense of @kbd{V F} (@code{vfloor}). Beware | 20433 | set of integers in the sense of @kbd{V F} (@code{vfloor}). Beware |
| 20434 | that a simple input like @samp{[100]} can result in a huge integer | 20434 | that a simple input like @samp{[100]} can result in a huge integer |
| 20435 | representation | 20435 | representation |
| 20436 | @texline (@math{2^{100}}, a 31-digit integer, in this case). | 20436 | @texline (@math{2^{100}}, a 31-digit integer, in this case). |
| 20437 | @infoline (@expr{2^100}, a 31-digit integer, in this case). | 20437 | @infoline (@expr{2^100}, a 31-digit integer, in this case). |
| 20438 | 20438 | ||
| @@ -20544,10 +20544,10 @@ plus or minus infinity. | |||
| 20544 | @cindex Mean of data values | 20544 | @cindex Mean of data values |
| 20545 | The @kbd{u M} (@code{calc-vector-mean}) [@code{vmean}] command | 20545 | The @kbd{u M} (@code{calc-vector-mean}) [@code{vmean}] command |
| 20546 | computes the average (arithmetic mean) of the data values. | 20546 | computes the average (arithmetic mean) of the data values. |
| 20547 | If the inputs are error forms | 20547 | If the inputs are error forms |
| 20548 | @texline @math{x \pm \sigma}, | 20548 | @texline @math{x \pm \sigma}, |
| 20549 | @infoline @samp{x +/- s}, | 20549 | @infoline @samp{x +/- s}, |
| 20550 | this is the weighted mean of the @expr{x} values with weights | 20550 | this is the weighted mean of the @expr{x} values with weights |
| 20551 | @texline @math{1 /\sigma^2}. | 20551 | @texline @math{1 /\sigma^2}. |
| 20552 | @infoline @expr{1 / s^2}. | 20552 | @infoline @expr{1 / s^2}. |
| 20553 | @tex | 20553 | @tex |
| @@ -20558,9 +20558,9 @@ If the inputs are not error forms, this is simply the sum of the | |||
| 20558 | values divided by the count of the values. | 20558 | values divided by the count of the values. |
| 20559 | 20559 | ||
| 20560 | Note that a plain number can be considered an error form with | 20560 | Note that a plain number can be considered an error form with |
| 20561 | error | 20561 | error |
| 20562 | @texline @math{\sigma = 0}. | 20562 | @texline @math{\sigma = 0}. |
| 20563 | @infoline @expr{s = 0}. | 20563 | @infoline @expr{s = 0}. |
| 20564 | If the input to @kbd{u M} is a mixture of | 20564 | If the input to @kbd{u M} is a mixture of |
| 20565 | plain numbers and error forms, the result is the mean of the | 20565 | plain numbers and error forms, the result is the mean of the |
| 20566 | plain numbers, ignoring all values with non-zero errors. (By the | 20566 | plain numbers, ignoring all values with non-zero errors. (By the |
| @@ -20662,7 +20662,7 @@ for a vector of numbers simply by using the @kbd{A} command. | |||
| 20662 | @cindex Standard deviation | 20662 | @cindex Standard deviation |
| 20663 | @cindex Sample statistics | 20663 | @cindex Sample statistics |
| 20664 | The @kbd{u S} (@code{calc-vector-sdev}) [@code{vsdev}] command | 20664 | The @kbd{u S} (@code{calc-vector-sdev}) [@code{vsdev}] command |
| 20665 | computes the standard | 20665 | computes the standard |
| 20666 | @texline deviation@tie{}@math{\sigma} | 20666 | @texline deviation@tie{}@math{\sigma} |
| 20667 | @infoline deviation | 20667 | @infoline deviation |
| 20668 | of the data values. If the values are error forms, the errors are used | 20668 | of the data values. If the values are error forms, the errors are used |
| @@ -20677,9 +20677,9 @@ $$ \sigma^2 = {1 \over N - 1} \sum (x_i - \mu)^2 $$ | |||
| 20677 | This function also applies to distributions. The standard deviation | 20677 | This function also applies to distributions. The standard deviation |
| 20678 | of a single error form is simply the error part. The standard deviation | 20678 | of a single error form is simply the error part. The standard deviation |
| 20679 | of a continuous interval happens to equal the difference between the | 20679 | of a continuous interval happens to equal the difference between the |
| 20680 | limits, divided by | 20680 | limits, divided by |
| 20681 | @texline @math{\sqrt{12}}. | 20681 | @texline @math{\sqrt{12}}. |
| 20682 | @infoline @expr{sqrt(12)}. | 20682 | @infoline @expr{sqrt(12)}. |
| 20683 | The standard deviation of an integer interval is the same as the | 20683 | The standard deviation of an integer interval is the same as the |
| 20684 | standard deviation of a vector of those integers. | 20684 | standard deviation of a vector of those integers. |
| 20685 | 20685 | ||
| @@ -20714,7 +20714,7 @@ population standard deviation of the equivalent vector of integers. | |||
| 20714 | The @kbd{H u S} (@code{calc-vector-variance}) [@code{vvar}] and | 20714 | The @kbd{H u S} (@code{calc-vector-variance}) [@code{vvar}] and |
| 20715 | @kbd{H I u S} (@code{calc-vector-pop-variance}) [@code{vpvar}] | 20715 | @kbd{H I u S} (@code{calc-vector-pop-variance}) [@code{vpvar}] |
| 20716 | commands compute the variance of the data values. The variance | 20716 | commands compute the variance of the data values. The variance |
| 20717 | is the | 20717 | is the |
| 20718 | @texline square@tie{}@math{\sigma^2} | 20718 | @texline square@tie{}@math{\sigma^2} |
| 20719 | @infoline square | 20719 | @infoline square |
| 20720 | of the standard deviation, i.e., the sum of the | 20720 | of the standard deviation, i.e., the sum of the |
| @@ -20738,7 +20738,7 @@ The functions in this section take two arguments, which must be | |||
| 20738 | vectors of equal size. The vectors are each flattened in the same | 20738 | vectors of equal size. The vectors are each flattened in the same |
| 20739 | way as by the single-variable statistical functions. Given a numeric | 20739 | way as by the single-variable statistical functions. Given a numeric |
| 20740 | prefix argument of 1, these functions instead take one object from | 20740 | prefix argument of 1, these functions instead take one object from |
| 20741 | the stack, which must be an | 20741 | the stack, which must be an |
| 20742 | @texline @math{N\times2} | 20742 | @texline @math{N\times2} |
| 20743 | @infoline Nx2 | 20743 | @infoline Nx2 |
| 20744 | matrix of data values. Once again, variable names can be used in place | 20744 | matrix of data values. Once again, variable names can be used in place |
| @@ -20996,7 +20996,7 @@ be prompted for the number of arguments to use. | |||
| 20996 | If any argument to @kbd{V M} is a matrix, the operator is normally mapped | 20996 | If any argument to @kbd{V M} is a matrix, the operator is normally mapped |
| 20997 | across all elements of the matrix. For example, given the matrix | 20997 | across all elements of the matrix. For example, given the matrix |
| 20998 | @expr{[[1, -2, 3], [-4, 5, -6]]}, @kbd{V M A} takes six absolute values to | 20998 | @expr{[[1, -2, 3], [-4, 5, -6]]}, @kbd{V M A} takes six absolute values to |
| 20999 | produce another | 20999 | produce another |
| 21000 | @texline @math{3\times2} | 21000 | @texline @math{3\times2} |
| 21001 | @infoline 3x2 | 21001 | @infoline 3x2 |
| 21002 | matrix, @expr{[[1, 2, 3], [4, 5, 6]]}. | 21002 | matrix, @expr{[[1, 2, 3], [4, 5, 6]]}. |
| @@ -21612,8 +21612,8 @@ entire four-term sum. | |||
| 21612 | @pindex calc-break-selections | 21612 | @pindex calc-break-selections |
| 21613 | The @kbd{j b} (@code{calc-break-selections}) command controls a mode | 21613 | The @kbd{j b} (@code{calc-break-selections}) command controls a mode |
| 21614 | in which the ``deep structure'' of these associative formulas shows | 21614 | in which the ``deep structure'' of these associative formulas shows |
| 21615 | through. Calc actually stores the above formulas as | 21615 | through. Calc actually stores the above formulas as |
| 21616 | @samp{((a + b) - c) + d} and @samp{x * (y * z)}. (Note that for certain | 21616 | @samp{((a + b) - c) + d} and @samp{x * (y * z)}. (Note that for certain |
| 21617 | obscure reasons, by default Calc treats multiplication as | 21617 | obscure reasons, by default Calc treats multiplication as |
| 21618 | right-associative.) Once you have enabled @kbd{j b} mode, selecting | 21618 | right-associative.) Once you have enabled @kbd{j b} mode, selecting |
| 21619 | with the cursor on the @samp{-} sign would only select the @samp{a + b - | 21619 | with the cursor on the @samp{-} sign would only select the @samp{a + b - |
| @@ -22098,7 +22098,7 @@ of a quotient you can call it with a zero prefix: @kbd{C-u 0 j *}. For | |||
| 22098 | example, if the formula on the stack is @samp{1 / (sqrt(a) + 1)}, you may | 22098 | example, if the formula on the stack is @samp{1 / (sqrt(a) + 1)}, you may |
| 22099 | wish to eliminate the square root in the denominator by multiplying | 22099 | wish to eliminate the square root in the denominator by multiplying |
| 22100 | the top and bottom by @samp{sqrt(a) - 1}. If you did this simply by using | 22100 | the top and bottom by @samp{sqrt(a) - 1}. If you did this simply by using |
| 22101 | a simple @kbd{j *} command, you would get | 22101 | a simple @kbd{j *} command, you would get |
| 22102 | @samp{(sqrt(a)-1)/ (sqrt(a) (sqrt(a) - 1) + sqrt(a) - 1)}. Instead, | 22102 | @samp{(sqrt(a)-1)/ (sqrt(a) (sqrt(a) - 1) + sqrt(a) - 1)}. Instead, |
| 22103 | you would probably want to use @kbd{C-u 0 j *}, which would expand the | 22103 | you would probably want to use @kbd{C-u 0 j *}, which would expand the |
| 22104 | bottom and give you the desired result @samp{(sqrt(a)-1)/(a-1)}. More | 22104 | bottom and give you the desired result @samp{(sqrt(a)-1)/(a-1)}. More |
| @@ -22405,7 +22405,7 @@ The most basic default simplification is the evaluation of functions. | |||
| 22405 | For example, @expr{2 + 3} is evaluated to @expr{5}, and @expr{@tfn{sqrt}(9)} | 22405 | For example, @expr{2 + 3} is evaluated to @expr{5}, and @expr{@tfn{sqrt}(9)} |
| 22406 | is evaluated to @expr{3}. Evaluation does not occur if the arguments | 22406 | is evaluated to @expr{3}. Evaluation does not occur if the arguments |
| 22407 | to a function are somehow of the wrong type @expr{@tfn{tan}([2,3,4])}), | 22407 | to a function are somehow of the wrong type @expr{@tfn{tan}([2,3,4])}), |
| 22408 | range (@expr{@tfn{tan}(90)}), or number (@expr{@tfn{tan}(3,5)}), | 22408 | range (@expr{@tfn{tan}(90)}), or number (@expr{@tfn{tan}(3,5)}), |
| 22409 | or if the function name is not recognized (@expr{@tfn{f}(5)}), or if | 22409 | or if the function name is not recognized (@expr{@tfn{f}(5)}), or if |
| 22410 | Symbolic mode (@pxref{Symbolic Mode}) prevents evaluation | 22410 | Symbolic mode (@pxref{Symbolic Mode}) prevents evaluation |
| 22411 | (@expr{@tfn{sqrt}(2)}). | 22411 | (@expr{@tfn{sqrt}(2)}). |
| @@ -22452,7 +22452,7 @@ Arithmetic operators like @kbd{+} and @kbd{*} always take two | |||
| 22452 | arguments in Calc's internal form. Sums and products of three or | 22452 | arguments in Calc's internal form. Sums and products of three or |
| 22453 | more terms are arranged by the associative law of algebra into | 22453 | more terms are arranged by the associative law of algebra into |
| 22454 | a left-associative form for sums, @expr{((a + b) + c) + d}, and | 22454 | a left-associative form for sums, @expr{((a + b) + c) + d}, and |
| 22455 | (by default) a right-associative form for products, | 22455 | (by default) a right-associative form for products, |
| 22456 | @expr{a * (b * (c * d))}. Formulas like @expr{(a + b) + (c + d)} are | 22456 | @expr{a * (b * (c * d))}. Formulas like @expr{(a + b) + (c + d)} are |
| 22457 | rearranged to left-associative form, though this rarely matters since | 22457 | rearranged to left-associative form, though this rarely matters since |
| 22458 | Calc's algebra commands are designed to hide the inner structure of sums | 22458 | Calc's algebra commands are designed to hide the inner structure of sums |
| @@ -22533,7 +22533,7 @@ The product @expr{a (b + c)} is distributed over the sum only if | |||
| 22533 | rewritten to @expr{a (c - b)}. | 22533 | rewritten to @expr{a (c - b)}. |
| 22534 | 22534 | ||
| 22535 | The distributive law of products and powers is used for adjacent | 22535 | The distributive law of products and powers is used for adjacent |
| 22536 | terms of the product: @expr{x^a x^b} goes to | 22536 | terms of the product: @expr{x^a x^b} goes to |
| 22537 | @texline @math{x^{a+b}} | 22537 | @texline @math{x^{a+b}} |
| 22538 | @infoline @expr{x^(a+b)} | 22538 | @infoline @expr{x^(a+b)} |
| 22539 | where @expr{a} is a number, or an implicit 1 (as in @expr{x}), | 22539 | where @expr{a} is a number, or an implicit 1 (as in @expr{x}), |
| @@ -22544,9 +22544,9 @@ If the sum of the powers is zero, the product is simplified to | |||
| 22544 | @expr{1} or to @samp{idn(1)} if Matrix mode is enabled. | 22544 | @expr{1} or to @samp{idn(1)} if Matrix mode is enabled. |
| 22545 | 22545 | ||
| 22546 | The product of a negative power times anything but another negative | 22546 | The product of a negative power times anything but another negative |
| 22547 | power is changed to use division: | 22547 | power is changed to use division: |
| 22548 | @texline @math{x^{-2} y} | 22548 | @texline @math{x^{-2} y} |
| 22549 | @infoline @expr{x^(-2) y} | 22549 | @infoline @expr{x^(-2) y} |
| 22550 | goes to @expr{y / x^2} unless Matrix mode is | 22550 | goes to @expr{y / x^2} unless Matrix mode is |
| 22551 | in effect and neither @expr{x} nor @expr{y} are scalar (in which | 22551 | in effect and neither @expr{x} nor @expr{y} are scalar (in which |
| 22552 | case it is considered unsafe to rearrange the order of the terms). | 22552 | case it is considered unsafe to rearrange the order of the terms). |
| @@ -22568,13 +22568,13 @@ The quotient @expr{x / 0} is left unsimplified or changed to an | |||
| 22568 | infinite quantity, as directed by the current infinite mode. | 22568 | infinite quantity, as directed by the current infinite mode. |
| 22569 | @xref{Infinite Mode}. | 22569 | @xref{Infinite Mode}. |
| 22570 | 22570 | ||
| 22571 | The expression | 22571 | The expression |
| 22572 | @texline @math{a / b^{-c}} | 22572 | @texline @math{a / b^{-c}} |
| 22573 | @infoline @expr{a / b^(-c)} | 22573 | @infoline @expr{a / b^(-c)} |
| 22574 | is changed to @expr{a b^c}, where @expr{-c} is any negative-looking | 22574 | is changed to @expr{a b^c}, where @expr{-c} is any negative-looking |
| 22575 | power. Also, @expr{1 / b^c} is changed to | 22575 | power. Also, @expr{1 / b^c} is changed to |
| 22576 | @texline @math{b^{-c}} | 22576 | @texline @math{b^{-c}} |
| 22577 | @infoline @expr{b^(-c)} | 22577 | @infoline @expr{b^(-c)} |
| 22578 | for any power @expr{c}. | 22578 | for any power @expr{c}. |
| 22579 | 22579 | ||
| 22580 | Also, @expr{(-a) / b} and @expr{a / (-b)} go to @expr{-(a/b)}; | 22580 | Also, @expr{(-a) / b} and @expr{a / (-b)} go to @expr{-(a/b)}; |
| @@ -22614,22 +22614,22 @@ are distributed to @expr{a^c b^c}, @expr{a^c / b^c} only if @expr{c} | |||
| 22614 | is an integer, or if either @expr{a} or @expr{b} are nonnegative | 22614 | is an integer, or if either @expr{a} or @expr{b} are nonnegative |
| 22615 | real numbers. Powers of powers @expr{(a^b)^c} are simplified to | 22615 | real numbers. Powers of powers @expr{(a^b)^c} are simplified to |
| 22616 | @texline @math{a^{b c}} | 22616 | @texline @math{a^{b c}} |
| 22617 | @infoline @expr{a^(b c)} | 22617 | @infoline @expr{a^(b c)} |
| 22618 | only when @expr{c} is an integer and @expr{b c} also | 22618 | only when @expr{c} is an integer and @expr{b c} also |
| 22619 | evaluates to an integer. Without these restrictions these simplifications | 22619 | evaluates to an integer. Without these restrictions these simplifications |
| 22620 | would not be safe because of problems with principal values. | 22620 | would not be safe because of problems with principal values. |
| 22621 | (In other words, | 22621 | (In other words, |
| 22622 | @texline @math{((-3)^{1/2})^2} | 22622 | @texline @math{((-3)^{1/2})^2} |
| 22623 | @infoline @expr{((-3)^1:2)^2} | 22623 | @infoline @expr{((-3)^1:2)^2} |
| 22624 | is safe to simplify, but | 22624 | is safe to simplify, but |
| 22625 | @texline @math{((-3)^2)^{1/2}} | 22625 | @texline @math{((-3)^2)^{1/2}} |
| 22626 | @infoline @expr{((-3)^2)^1:2} | 22626 | @infoline @expr{((-3)^2)^1:2} |
| 22627 | is not.) @xref{Declarations}, for ways to inform Calc that your | 22627 | is not.) @xref{Declarations}, for ways to inform Calc that your |
| 22628 | variables satisfy these requirements. | 22628 | variables satisfy these requirements. |
| 22629 | 22629 | ||
| 22630 | As a special case of this rule, @expr{@tfn{sqrt}(x)^n} is simplified to | 22630 | As a special case of this rule, @expr{@tfn{sqrt}(x)^n} is simplified to |
| 22631 | @texline @math{x^{n/2}} | 22631 | @texline @math{x^{n/2}} |
| 22632 | @infoline @expr{x^(n/2)} | 22632 | @infoline @expr{x^(n/2)} |
| 22633 | only for even integers @expr{n}. | 22633 | only for even integers @expr{n}. |
| 22634 | 22634 | ||
| 22635 | If @expr{a} is known to be real, @expr{b} is an even integer, and | 22635 | If @expr{a} is known to be real, @expr{b} is an even integer, and |
| @@ -22642,13 +22642,13 @@ for any negative-looking expression @expr{-a}. | |||
| 22642 | 22642 | ||
| 22643 | Square roots @expr{@tfn{sqrt}(x)} generally act like one-half powers | 22643 | Square roots @expr{@tfn{sqrt}(x)} generally act like one-half powers |
| 22644 | @texline @math{x^{1:2}} | 22644 | @texline @math{x^{1:2}} |
| 22645 | @infoline @expr{x^1:2} | 22645 | @infoline @expr{x^1:2} |
| 22646 | for the purposes of the above-listed simplifications. | 22646 | for the purposes of the above-listed simplifications. |
| 22647 | 22647 | ||
| 22648 | Also, note that | 22648 | Also, note that |
| 22649 | @texline @math{1 / x^{1:2}} | 22649 | @texline @math{1 / x^{1:2}} |
| 22650 | @infoline @expr{1 / x^1:2} | 22650 | @infoline @expr{1 / x^1:2} |
| 22651 | is changed to | 22651 | is changed to |
| 22652 | @texline @math{x^{-1:2}}, | 22652 | @texline @math{x^{-1:2}}, |
| 22653 | @infoline @expr{x^(-1:2)}, | 22653 | @infoline @expr{x^(-1:2)}, |
| 22654 | but @expr{1 / @tfn{sqrt}(x)} is left alone. | 22654 | but @expr{1 / @tfn{sqrt}(x)} is left alone. |
| @@ -22660,9 +22660,9 @@ but @expr{1 / @tfn{sqrt}(x)} is left alone. | |||
| 22660 | Generic identity matrices (@pxref{Matrix Mode}) are simplified by the | 22660 | Generic identity matrices (@pxref{Matrix Mode}) are simplified by the |
| 22661 | following rules: @expr{@tfn{idn}(a) + b} to @expr{a + b} if @expr{b} | 22661 | following rules: @expr{@tfn{idn}(a) + b} to @expr{a + b} if @expr{b} |
| 22662 | is provably scalar, or expanded out if @expr{b} is a matrix; | 22662 | is provably scalar, or expanded out if @expr{b} is a matrix; |
| 22663 | @expr{@tfn{idn}(a) + @tfn{idn}(b)} to @expr{@tfn{idn}(a + b)}; | 22663 | @expr{@tfn{idn}(a) + @tfn{idn}(b)} to @expr{@tfn{idn}(a + b)}; |
| 22664 | @expr{-@tfn{idn}(a)} to @expr{@tfn{idn}(-a)}; @expr{a @tfn{idn}(b)} to | 22664 | @expr{-@tfn{idn}(a)} to @expr{@tfn{idn}(-a)}; @expr{a @tfn{idn}(b)} to |
| 22665 | @expr{@tfn{idn}(a b)} if @expr{a} is provably scalar, or to @expr{a b} | 22665 | @expr{@tfn{idn}(a b)} if @expr{a} is provably scalar, or to @expr{a b} |
| 22666 | if @expr{a} is provably non-scalar; @expr{@tfn{idn}(a) @tfn{idn}(b)} to | 22666 | if @expr{a} is provably non-scalar; @expr{@tfn{idn}(a) @tfn{idn}(b)} to |
| 22667 | @expr{@tfn{idn}(a b)}; analogous simplifications for quotients involving | 22667 | @expr{@tfn{idn}(a b)}; analogous simplifications for quotients involving |
| 22668 | @code{idn}; and @expr{@tfn{idn}(a)^n} to @expr{@tfn{idn}(a^n)} where | 22668 | @code{idn}; and @expr{@tfn{idn}(a)^n} to @expr{@tfn{idn}(a^n)} where |
| @@ -22683,7 +22683,7 @@ The expression @expr{@tfn{abs}(-x)} changes to @expr{@tfn{abs}(x)}. | |||
| 22683 | The expression @expr{@tfn{abs}(@tfn{abs}(x))} changes to | 22683 | The expression @expr{@tfn{abs}(@tfn{abs}(x))} changes to |
| 22684 | @expr{@tfn{abs}(x)}; in fact, @expr{@tfn{abs}(x)} changes to @expr{x} or | 22684 | @expr{@tfn{abs}(x)}; in fact, @expr{@tfn{abs}(x)} changes to @expr{x} or |
| 22685 | @expr{-x} if @expr{x} is provably nonnegative or nonpositive | 22685 | @expr{-x} if @expr{x} is provably nonnegative or nonpositive |
| 22686 | (@pxref{Declarations}). | 22686 | (@pxref{Declarations}). |
| 22687 | 22687 | ||
| 22688 | While most functions do not recognize the variable @code{i} as an | 22688 | While most functions do not recognize the variable @code{i} as an |
| 22689 | imaginary number, the @code{arg} function does handle the two cases | 22689 | imaginary number, the @code{arg} function does handle the two cases |
| @@ -22693,7 +22693,7 @@ The expression @expr{@tfn{conj}(@tfn{conj}(x))} simplifies to @expr{x}. | |||
| 22693 | Various other expressions involving @code{conj}, @code{re}, and | 22693 | Various other expressions involving @code{conj}, @code{re}, and |
| 22694 | @code{im} are simplified, especially if some of the arguments are | 22694 | @code{im} are simplified, especially if some of the arguments are |
| 22695 | provably real or involve the constant @code{i}. For example, | 22695 | provably real or involve the constant @code{i}. For example, |
| 22696 | @expr{@tfn{conj}(a + b i)} is changed to | 22696 | @expr{@tfn{conj}(a + b i)} is changed to |
| 22697 | @expr{@tfn{conj}(a) - @tfn{conj}(b) i}, or to @expr{a - b i} if @expr{a} | 22697 | @expr{@tfn{conj}(a) - @tfn{conj}(b) i}, or to @expr{a - b i} if @expr{a} |
| 22698 | and @expr{b} are known to be real. | 22698 | and @expr{b} are known to be real. |
| 22699 | 22699 | ||
| @@ -22836,7 +22836,7 @@ several ways. (Note that these will be left unevaluated only in | |||
| 22836 | Symbolic mode.) First, square integer or rational factors are | 22836 | Symbolic mode.) First, square integer or rational factors are |
| 22837 | pulled out so that @expr{@tfn{sqrt}(8)} is rewritten as | 22837 | pulled out so that @expr{@tfn{sqrt}(8)} is rewritten as |
| 22838 | @texline @math{2\,@tfn{sqrt}(2)}. | 22838 | @texline @math{2\,@tfn{sqrt}(2)}. |
| 22839 | @infoline @expr{2 sqrt(2)}. | 22839 | @infoline @expr{2 sqrt(2)}. |
| 22840 | Conceptually speaking this implies factoring the argument into primes | 22840 | Conceptually speaking this implies factoring the argument into primes |
| 22841 | and moving pairs of primes out of the square root, but for reasons of | 22841 | and moving pairs of primes out of the square root, but for reasons of |
| 22842 | efficiency Calc only looks for primes up to 29. | 22842 | efficiency Calc only looks for primes up to 29. |
| @@ -22879,7 +22879,7 @@ declared to be an integer. | |||
| 22879 | Trigonometric functions are simplified in several ways. Whenever a | 22879 | Trigonometric functions are simplified in several ways. Whenever a |
| 22880 | products of two trigonometric functions can be replaced by a single | 22880 | products of two trigonometric functions can be replaced by a single |
| 22881 | function, the replacement is made; for example, | 22881 | function, the replacement is made; for example, |
| 22882 | @expr{@tfn{tan}(x) @tfn{cos}(x)} is simplified to @expr{@tfn{sin}(x)}. | 22882 | @expr{@tfn{tan}(x) @tfn{cos}(x)} is simplified to @expr{@tfn{sin}(x)}. |
| 22883 | Reciprocals of trigonometric functions are replaced by their reciprocal | 22883 | Reciprocals of trigonometric functions are replaced by their reciprocal |
| 22884 | function; for example, @expr{1/@tfn{sec}(x)} is simplified to | 22884 | function; for example, @expr{1/@tfn{sec}(x)} is simplified to |
| 22885 | @expr{@tfn{cos}(x)}. The corresponding simplifications for the | 22885 | @expr{@tfn{cos}(x)}. The corresponding simplifications for the |
| @@ -22887,7 +22887,7 @@ hyperbolic functions are also handled. | |||
| 22887 | 22887 | ||
| 22888 | Trigonometric functions of their inverse functions are | 22888 | Trigonometric functions of their inverse functions are |
| 22889 | simplified. The expression @expr{@tfn{sin}(@tfn{arcsin}(x))} is | 22889 | simplified. The expression @expr{@tfn{sin}(@tfn{arcsin}(x))} is |
| 22890 | simplified to @expr{x}, and similarly for @code{cos} and @code{tan}. | 22890 | simplified to @expr{x}, and similarly for @code{cos} and @code{tan}. |
| 22891 | Trigonometric functions of inverses of different trigonometric | 22891 | Trigonometric functions of inverses of different trigonometric |
| 22892 | functions can also be simplified, as in @expr{@tfn{sin}(@tfn{arccos}(x))} | 22892 | functions can also be simplified, as in @expr{@tfn{sin}(@tfn{arccos}(x))} |
| 22893 | to @expr{@tfn{sqrt}(1 - x^2)}. | 22893 | to @expr{@tfn{sqrt}(1 - x^2)}. |
| @@ -22905,30 +22905,30 @@ No simplifications for inverse trigonometric and hyperbolic | |||
| 22905 | functions are known, except for negative arguments of @code{arcsin}, | 22905 | functions are known, except for negative arguments of @code{arcsin}, |
| 22906 | @code{arctan}, @code{arcsinh}, and @code{arctanh}. Note that | 22906 | @code{arctan}, @code{arcsinh}, and @code{arctanh}. Note that |
| 22907 | @expr{@tfn{arcsin}(@tfn{sin}(x))} can @emph{not} safely change to | 22907 | @expr{@tfn{arcsin}(@tfn{sin}(x))} can @emph{not} safely change to |
| 22908 | @expr{x}, since this only correct within an integer multiple of | 22908 | @expr{x}, since this only correct within an integer multiple of |
| 22909 | @texline @math{2 \pi} | 22909 | @texline @math{2 \pi} |
| 22910 | @infoline @expr{2 pi} | 22910 | @infoline @expr{2 pi} |
| 22911 | radians or 360 degrees. However, @expr{@tfn{arcsinh}(@tfn{sinh}(x))} is | 22911 | radians or 360 degrees. However, @expr{@tfn{arcsinh}(@tfn{sinh}(x))} is |
| 22912 | simplified to @expr{x} if @expr{x} is known to be real. | 22912 | simplified to @expr{x} if @expr{x} is known to be real. |
| 22913 | 22913 | ||
| 22914 | Several simplifications that apply to logarithms and exponentials | 22914 | Several simplifications that apply to logarithms and exponentials |
| 22915 | are that @expr{@tfn{exp}(@tfn{ln}(x))}, | 22915 | are that @expr{@tfn{exp}(@tfn{ln}(x))}, |
| 22916 | @texline @tfn{e}@math{^{\ln(x)}}, | 22916 | @texline @tfn{e}@math{^{\ln(x)}}, |
| 22917 | @infoline @expr{e^@tfn{ln}(x)}, | 22917 | @infoline @expr{e^@tfn{ln}(x)}, |
| 22918 | and | 22918 | and |
| 22919 | @texline @math{10^{{\rm log10}(x)}} | 22919 | @texline @math{10^{{\rm log10}(x)}} |
| 22920 | @infoline @expr{10^@tfn{log10}(x)} | 22920 | @infoline @expr{10^@tfn{log10}(x)} |
| 22921 | all reduce to @expr{x}. Also, @expr{@tfn{ln}(@tfn{exp}(x))}, etc., can | 22921 | all reduce to @expr{x}. Also, @expr{@tfn{ln}(@tfn{exp}(x))}, etc., can |
| 22922 | reduce to @expr{x} if @expr{x} is provably real. The form | 22922 | reduce to @expr{x} if @expr{x} is provably real. The form |
| 22923 | @expr{@tfn{exp}(x)^y} is simplified to @expr{@tfn{exp}(x y)}. If @expr{x} | 22923 | @expr{@tfn{exp}(x)^y} is simplified to @expr{@tfn{exp}(x y)}. If @expr{x} |
| 22924 | is a suitable multiple of | 22924 | is a suitable multiple of |
| 22925 | @texline @math{\pi i} | 22925 | @texline @math{\pi i} |
| 22926 | @infoline @expr{pi i} | 22926 | @infoline @expr{pi i} |
| 22927 | (as described above for the trigonometric functions), then | 22927 | (as described above for the trigonometric functions), then |
| 22928 | @expr{@tfn{exp}(x)} or @expr{e^x} will be expanded. Finally, | 22928 | @expr{@tfn{exp}(x)} or @expr{e^x} will be expanded. Finally, |
| 22929 | @expr{@tfn{ln}(x)} is simplified to a form involving @code{pi} and | 22929 | @expr{@tfn{ln}(x)} is simplified to a form involving @code{pi} and |
| 22930 | @code{i} where @expr{x} is provably negative, positive imaginary, or | 22930 | @code{i} where @expr{x} is provably negative, positive imaginary, or |
| 22931 | negative imaginary. | 22931 | negative imaginary. |
| 22932 | 22932 | ||
| 22933 | The error functions @code{erf} and @code{erfc} are simplified when | 22933 | The error functions @code{erf} and @code{erfc} are simplified when |
| 22934 | their arguments are negative-looking or are calls to the @code{conj} | 22934 | their arguments are negative-looking or are calls to the @code{conj} |
| @@ -23006,18 +23006,18 @@ values of @expr{x} in a certain range; outside that range, values | |||
| 23006 | are folded down to the 360-degree range that the inverse trigonometric | 23006 | are folded down to the 360-degree range that the inverse trigonometric |
| 23007 | functions always produce. | 23007 | functions always produce. |
| 23008 | 23008 | ||
| 23009 | Powers of powers @expr{(x^a)^b} are simplified to | 23009 | Powers of powers @expr{(x^a)^b} are simplified to |
| 23010 | @texline @math{x^{a b}} | 23010 | @texline @math{x^{a b}} |
| 23011 | @infoline @expr{x^(a b)} | 23011 | @infoline @expr{x^(a b)} |
| 23012 | for all @expr{a} and @expr{b}. These results will be valid only | 23012 | for all @expr{a} and @expr{b}. These results will be valid only |
| 23013 | in a restricted range of @expr{x}; for example, in | 23013 | in a restricted range of @expr{x}; for example, in |
| 23014 | @texline @math{(x^2)^{1:2}} | 23014 | @texline @math{(x^2)^{1:2}} |
| 23015 | @infoline @expr{(x^2)^1:2} | 23015 | @infoline @expr{(x^2)^1:2} |
| 23016 | the powers cancel to get @expr{x}, which is valid for positive values | 23016 | the powers cancel to get @expr{x}, which is valid for positive values |
| 23017 | of @expr{x} but not for negative or complex values. | 23017 | of @expr{x} but not for negative or complex values. |
| 23018 | 23018 | ||
| 23019 | Similarly, @expr{@tfn{sqrt}(x^a)} and @expr{@tfn{sqrt}(x)^a} are both | 23019 | Similarly, @expr{@tfn{sqrt}(x^a)} and @expr{@tfn{sqrt}(x)^a} are both |
| 23020 | simplified (possibly unsafely) to | 23020 | simplified (possibly unsafely) to |
| 23021 | @texline @math{x^{a/2}}. | 23021 | @texline @math{x^{a/2}}. |
| 23022 | @infoline @expr{x^(a/2)}. | 23022 | @infoline @expr{x^(a/2)}. |
| 23023 | 23023 | ||
| @@ -23027,7 +23027,7 @@ Forms like @expr{@tfn{sqrt}(1 - sin(x)^2)} are simplified to, e.g., | |||
| 23027 | 23027 | ||
| 23028 | Arguments of square roots are partially factored to look for | 23028 | Arguments of square roots are partially factored to look for |
| 23029 | squared terms that can be extracted. For example, | 23029 | squared terms that can be extracted. For example, |
| 23030 | @expr{@tfn{sqrt}(a^2 b^3 + a^3 b^2)} simplifies to | 23030 | @expr{@tfn{sqrt}(a^2 b^3 + a^3 b^2)} simplifies to |
| 23031 | @expr{a b @tfn{sqrt}(a+b)}. | 23031 | @expr{a b @tfn{sqrt}(a+b)}. |
| 23032 | 23032 | ||
| 23033 | The simplifications of @expr{@tfn{ln}(@tfn{exp}(x))}, | 23033 | The simplifications of @expr{@tfn{ln}(@tfn{exp}(x))}, |
| @@ -23093,9 +23093,9 @@ number for an answer, then the quotient simplifies to that number. | |||
| 23093 | 23093 | ||
| 23094 | For powers and square roots, the ``unsafe'' simplifications | 23094 | For powers and square roots, the ``unsafe'' simplifications |
| 23095 | @expr{(a b)^c} to @expr{a^c b^c}, @expr{(a/b)^c} to @expr{a^c / b^c}, | 23095 | @expr{(a b)^c} to @expr{a^c b^c}, @expr{(a/b)^c} to @expr{a^c / b^c}, |
| 23096 | and @expr{(a^b)^c} to | 23096 | and @expr{(a^b)^c} to |
| 23097 | @texline @math{a^{b c}} | 23097 | @texline @math{a^{b c}} |
| 23098 | @infoline @expr{a^(b c)} | 23098 | @infoline @expr{a^(b c)} |
| 23099 | are done if the powers are real numbers. (These are safe in the context | 23099 | are done if the powers are real numbers. (These are safe in the context |
| 23100 | of units because all numbers involved can reasonably be assumed to be | 23100 | of units because all numbers involved can reasonably be assumed to be |
| 23101 | real.) | 23101 | real.) |
| @@ -23108,12 +23108,12 @@ according to the previous paragraph. For example, @samp{acre^1.5} | |||
| 23108 | is simplified by noting that @expr{1.5 = 3:2}, that @samp{acre} | 23108 | is simplified by noting that @expr{1.5 = 3:2}, that @samp{acre} |
| 23109 | is defined in terms of @samp{m^2}, and that the 2 in the power of | 23109 | is defined in terms of @samp{m^2}, and that the 2 in the power of |
| 23110 | @code{m} is a multiple of 2 in @expr{3:2}. Thus, @code{acre^1.5} is | 23110 | @code{m} is a multiple of 2 in @expr{3:2}. Thus, @code{acre^1.5} is |
| 23111 | replaced by approximately | 23111 | replaced by approximately |
| 23112 | @texline @math{(4046 m^2)^{1.5}} | 23112 | @texline @math{(4046 m^2)^{1.5}} |
| 23113 | @infoline @expr{(4046 m^2)^1.5}, | 23113 | @infoline @expr{(4046 m^2)^1.5}, |
| 23114 | which is then changed to | 23114 | which is then changed to |
| 23115 | @texline @math{4046^{1.5} \, (m^2)^{1.5}}, | 23115 | @texline @math{4046^{1.5} \, (m^2)^{1.5}}, |
| 23116 | @infoline @expr{4046^1.5 (m^2)^1.5}, | 23116 | @infoline @expr{4046^1.5 (m^2)^1.5}, |
| 23117 | then to @expr{257440 m^3}. | 23117 | then to @expr{257440 m^3}. |
| 23118 | 23118 | ||
| 23119 | The functions @code{float}, @code{frac}, @code{clean}, @code{abs}, | 23119 | The functions @code{float}, @code{frac}, @code{clean}, @code{abs}, |
| @@ -23401,7 +23401,7 @@ answer! | |||
| 23401 | 23401 | ||
| 23402 | If you use the @code{deriv} function directly in an algebraic formula, | 23402 | If you use the @code{deriv} function directly in an algebraic formula, |
| 23403 | you can write @samp{deriv(f,x,x0)} which represents the derivative | 23403 | you can write @samp{deriv(f,x,x0)} which represents the derivative |
| 23404 | of @expr{f} with respect to @expr{x}, evaluated at the point | 23404 | of @expr{f} with respect to @expr{x}, evaluated at the point |
| 23405 | @texline @math{x=x_0}. | 23405 | @texline @math{x=x_0}. |
| 23406 | @infoline @expr{x=x0}. | 23406 | @infoline @expr{x=x0}. |
| 23407 | 23407 | ||
| @@ -23441,7 +23441,7 @@ respect to a prompted-for variable. The integrator is not guaranteed to | |||
| 23441 | work for all integrable functions, but it is able to integrate several | 23441 | work for all integrable functions, but it is able to integrate several |
| 23442 | large classes of formulas. In particular, any polynomial or rational | 23442 | large classes of formulas. In particular, any polynomial or rational |
| 23443 | function (a polynomial divided by a polynomial) is acceptable. | 23443 | function (a polynomial divided by a polynomial) is acceptable. |
| 23444 | (Rational functions don't have to be in explicit quotient form, however; | 23444 | (Rational functions don't have to be in explicit quotient form, however; |
| 23445 | @texline @math{x/(1+x^{-2})} | 23445 | @texline @math{x/(1+x^{-2})} |
| 23446 | @infoline @expr{x/(1+x^-2)} | 23446 | @infoline @expr{x/(1+x^-2)} |
| 23447 | is not strictly a quotient of polynomials, but it is equivalent to | 23447 | is not strictly a quotient of polynomials, but it is equivalent to |
| @@ -23472,7 +23472,7 @@ integral $\int_a^b f(x) \, dx$. | |||
| 23472 | 23472 | ||
| 23473 | Please note that the current implementation of Calc's integrator sometimes | 23473 | Please note that the current implementation of Calc's integrator sometimes |
| 23474 | produces results that are significantly more complex than they need to | 23474 | produces results that are significantly more complex than they need to |
| 23475 | be. For example, the integral Calc finds for | 23475 | be. For example, the integral Calc finds for |
| 23476 | @texline @math{1/(x+\sqrt{x^2+1})} | 23476 | @texline @math{1/(x+\sqrt{x^2+1})} |
| 23477 | @infoline @expr{1/(x+sqrt(x^2+1))} | 23477 | @infoline @expr{1/(x+sqrt(x^2+1))} |
| 23478 | is several times more complicated than the answer Mathematica | 23478 | is several times more complicated than the answer Mathematica |
| @@ -23480,11 +23480,11 @@ returns for the same input, although the two forms are numerically | |||
| 23480 | equivalent. Also, any indefinite integral should be considered to have | 23480 | equivalent. Also, any indefinite integral should be considered to have |
| 23481 | an arbitrary constant of integration added to it, although Calc does not | 23481 | an arbitrary constant of integration added to it, although Calc does not |
| 23482 | write an explicit constant of integration in its result. For example, | 23482 | write an explicit constant of integration in its result. For example, |
| 23483 | Calc's solution for | 23483 | Calc's solution for |
| 23484 | @texline @math{1/(1+\tan x)} | 23484 | @texline @math{1/(1+\tan x)} |
| 23485 | @infoline @expr{1/(1+tan(x))} | 23485 | @infoline @expr{1/(1+tan(x))} |
| 23486 | differs from the solution given in the @emph{CRC Math Tables} by a | 23486 | differs from the solution given in the @emph{CRC Math Tables} by a |
| 23487 | constant factor of | 23487 | constant factor of |
| 23488 | @texline @math{\pi i / 2} | 23488 | @texline @math{\pi i / 2} |
| 23489 | @infoline @expr{pi i / 2}, | 23489 | @infoline @expr{pi i / 2}, |
| 23490 | due to a different choice of constant of integration. | 23490 | due to a different choice of constant of integration. |
| @@ -23544,9 +23544,9 @@ in your @code{IntegRules}. | |||
| 23544 | @tindex Ei | 23544 | @tindex Ei |
| 23545 | As a more serious example, the expression @samp{exp(x)/x} cannot be | 23545 | As a more serious example, the expression @samp{exp(x)/x} cannot be |
| 23546 | integrated in terms of the standard functions, so the ``exponential | 23546 | integrated in terms of the standard functions, so the ``exponential |
| 23547 | integral'' function | 23547 | integral'' function |
| 23548 | @texline @math{{\rm Ei}(x)} | 23548 | @texline @math{{\rm Ei}(x)} |
| 23549 | @infoline @expr{Ei(x)} | 23549 | @infoline @expr{Ei(x)} |
| 23550 | was invented to describe it. | 23550 | was invented to describe it. |
| 23551 | We can get Calc to do this integral in terms of a made-up @code{Ei} | 23551 | We can get Calc to do this integral in terms of a made-up @code{Ei} |
| 23552 | function by adding the rule @samp{[integtry(exp(x)/x, x) := Ei(x)]} | 23552 | function by adding the rule @samp{[integtry(exp(x)/x, x) := Ei(x)]} |
| @@ -23717,18 +23717,18 @@ form @expr{X = 0}. | |||
| 23717 | 23717 | ||
| 23718 | This command also works for inequalities, as in @expr{y < 3x + 6}. | 23718 | This command also works for inequalities, as in @expr{y < 3x + 6}. |
| 23719 | Some inequalities cannot be solved where the analogous equation could | 23719 | Some inequalities cannot be solved where the analogous equation could |
| 23720 | be; for example, solving | 23720 | be; for example, solving |
| 23721 | @texline @math{a < b \, c} | 23721 | @texline @math{a < b \, c} |
| 23722 | @infoline @expr{a < b c} | 23722 | @infoline @expr{a < b c} |
| 23723 | for @expr{b} is impossible | 23723 | for @expr{b} is impossible |
| 23724 | without knowing the sign of @expr{c}. In this case, @kbd{a S} will | 23724 | without knowing the sign of @expr{c}. In this case, @kbd{a S} will |
| 23725 | produce the result | 23725 | produce the result |
| 23726 | @texline @math{b \mathbin{\hbox{\code{!=}}} a/c} | 23726 | @texline @math{b \mathbin{\hbox{\code{!=}}} a/c} |
| 23727 | @infoline @expr{b != a/c} | 23727 | @infoline @expr{b != a/c} |
| 23728 | (using the not-equal-to operator) to signify that the direction of the | 23728 | (using the not-equal-to operator) to signify that the direction of the |
| 23729 | inequality is now unknown. The inequality | 23729 | inequality is now unknown. The inequality |
| 23730 | @texline @math{a \le b \, c} | 23730 | @texline @math{a \le b \, c} |
| 23731 | @infoline @expr{a <= b c} | 23731 | @infoline @expr{a <= b c} |
| 23732 | is not even partially solved. @xref{Declarations}, for a way to tell | 23732 | is not even partially solved. @xref{Declarations}, for a way to tell |
| 23733 | Calc that the signs of the variables in a formula are in fact known. | 23733 | Calc that the signs of the variables in a formula are in fact known. |
| 23734 | 23734 | ||
| @@ -24186,13 +24186,13 @@ value of the variable which minimizes the formula's value, along | |||
| 24186 | with the minimum value itself. | 24186 | with the minimum value itself. |
| 24187 | 24187 | ||
| 24188 | Note that this command looks for a @emph{local} minimum. Many functions | 24188 | Note that this command looks for a @emph{local} minimum. Many functions |
| 24189 | have more than one minimum; some, like | 24189 | have more than one minimum; some, like |
| 24190 | @texline @math{x \sin x}, | 24190 | @texline @math{x \sin x}, |
| 24191 | @infoline @expr{x sin(x)}, | 24191 | @infoline @expr{x sin(x)}, |
| 24192 | have infinitely many. In fact, there is no easy way to define the | 24192 | have infinitely many. In fact, there is no easy way to define the |
| 24193 | ``global'' minimum of | 24193 | ``global'' minimum of |
| 24194 | @texline @math{x \sin x} | 24194 | @texline @math{x \sin x} |
| 24195 | @infoline @expr{x sin(x)} | 24195 | @infoline @expr{x sin(x)} |
| 24196 | but Calc can still locate any particular local minimum | 24196 | but Calc can still locate any particular local minimum |
| 24197 | for you. Calc basically goes downhill from the initial guess until it | 24197 | for you. Calc basically goes downhill from the initial guess until it |
| 24198 | finds a point at which the function's value is greater both to the left | 24198 | finds a point at which the function's value is greater both to the left |
| @@ -24271,7 +24271,7 @@ to be determined. For a typical set of measured data there will be | |||
| 24271 | no single @expr{m} and @expr{b} that exactly fit the data; in this | 24271 | no single @expr{m} and @expr{b} that exactly fit the data; in this |
| 24272 | case, Calc chooses values of the parameters that provide the closest | 24272 | case, Calc chooses values of the parameters that provide the closest |
| 24273 | possible fit. The model formula can be entered in various ways after | 24273 | possible fit. The model formula can be entered in various ways after |
| 24274 | the key sequence @kbd{a F} is pressed. | 24274 | the key sequence @kbd{a F} is pressed. |
| 24275 | 24275 | ||
| 24276 | If the letter @kbd{P} is pressed after @kbd{a F} but before the model | 24276 | If the letter @kbd{P} is pressed after @kbd{a F} but before the model |
| 24277 | description is entered, the data as well as the model formula will be | 24277 | description is entered, the data as well as the model formula will be |
| @@ -24319,7 +24319,7 @@ the @dfn{parameters} of the model. | |||
| 24319 | 24319 | ||
| 24320 | The @kbd{a F} command takes the data set to be fitted from the stack. | 24320 | The @kbd{a F} command takes the data set to be fitted from the stack. |
| 24321 | By default, it expects the data in the form of a matrix. For example, | 24321 | By default, it expects the data in the form of a matrix. For example, |
| 24322 | for a linear or polynomial fit, this would be a | 24322 | for a linear or polynomial fit, this would be a |
| 24323 | @texline @math{2\times N} | 24323 | @texline @math{2\times N} |
| 24324 | @infoline 2xN | 24324 | @infoline 2xN |
| 24325 | matrix where the first row is a list of @expr{x} values and the second | 24325 | matrix where the first row is a list of @expr{x} values and the second |
| @@ -24327,10 +24327,10 @@ row has the corresponding @expr{y} values. For the multilinear fit | |||
| 24327 | shown above, the matrix would have four rows (@expr{x_1}, @expr{x_2}, | 24327 | shown above, the matrix would have four rows (@expr{x_1}, @expr{x_2}, |
| 24328 | @expr{x_3}, and @expr{y}, respectively). | 24328 | @expr{x_3}, and @expr{y}, respectively). |
| 24329 | 24329 | ||
| 24330 | If you happen to have an | 24330 | If you happen to have an |
| 24331 | @texline @math{N\times2} | 24331 | @texline @math{N\times2} |
| 24332 | @infoline Nx2 | 24332 | @infoline Nx2 |
| 24333 | matrix instead of a | 24333 | matrix instead of a |
| 24334 | @texline @math{2\times N} | 24334 | @texline @math{2\times N} |
| 24335 | @infoline 2xN | 24335 | @infoline 2xN |
| 24336 | matrix, just press @kbd{v t} first to transpose the matrix. | 24336 | matrix, just press @kbd{v t} first to transpose the matrix. |
| @@ -24425,13 +24425,13 @@ $$ \chi^2 = \sum_{i=1}^N (y_i - (a + b x_i))^2 $$ | |||
| 24425 | which is clearly zero if @expr{a + b x} exactly fits all data points, | 24425 | which is clearly zero if @expr{a + b x} exactly fits all data points, |
| 24426 | and increases as various @expr{a + b x_i} values fail to match the | 24426 | and increases as various @expr{a + b x_i} values fail to match the |
| 24427 | corresponding @expr{y_i} values. There are several reasons why the | 24427 | corresponding @expr{y_i} values. There are several reasons why the |
| 24428 | summand is squared, one of them being to ensure that | 24428 | summand is squared, one of them being to ensure that |
| 24429 | @texline @math{\chi^2 \ge 0}. | 24429 | @texline @math{\chi^2 \ge 0}. |
| 24430 | @infoline @expr{chi^2 >= 0}. | 24430 | @infoline @expr{chi^2 >= 0}. |
| 24431 | Least-squares fitting simply chooses the values of @expr{a} and @expr{b} | 24431 | Least-squares fitting simply chooses the values of @expr{a} and @expr{b} |
| 24432 | for which the error | 24432 | for which the error |
| 24433 | @texline @math{\chi^2} | 24433 | @texline @math{\chi^2} |
| 24434 | @infoline @expr{chi^2} | 24434 | @infoline @expr{chi^2} |
| 24435 | is as small as possible. | 24435 | is as small as possible. |
| 24436 | 24436 | ||
| 24437 | Other kinds of models do the same thing but with a different model | 24437 | Other kinds of models do the same thing but with a different model |
| @@ -24593,9 +24593,9 @@ contain error forms. The data values must either all include errors | |||
| 24593 | or all be plain numbers. Error forms can go anywhere but generally | 24593 | or all be plain numbers. Error forms can go anywhere but generally |
| 24594 | go on the numbers in the last row of the data matrix. If the last | 24594 | go on the numbers in the last row of the data matrix. If the last |
| 24595 | row contains error forms | 24595 | row contains error forms |
| 24596 | @texline `@var{y_i}@w{ @tfn{+/-} }@math{\sigma_i}', | 24596 | @texline `@var{y_i}@w{ @tfn{+/-} }@math{\sigma_i}', |
| 24597 | @infoline `@var{y_i}@w{ @tfn{+/-} }@var{sigma_i}', | 24597 | @infoline `@var{y_i}@w{ @tfn{+/-} }@var{sigma_i}', |
| 24598 | then the | 24598 | then the |
| 24599 | @texline @math{\chi^2} | 24599 | @texline @math{\chi^2} |
| 24600 | @infoline @expr{chi^2} | 24600 | @infoline @expr{chi^2} |
| 24601 | statistic is now, | 24601 | statistic is now, |
| @@ -24617,9 +24617,9 @@ the fitting operation. | |||
| 24617 | 24617 | ||
| 24618 | If there are error forms on other rows of the data matrix, all the | 24618 | If there are error forms on other rows of the data matrix, all the |
| 24619 | errors for a given data point are combined; the square root of the | 24619 | errors for a given data point are combined; the square root of the |
| 24620 | sum of the squares of the errors forms the | 24620 | sum of the squares of the errors forms the |
| 24621 | @texline @math{\sigma_i} | 24621 | @texline @math{\sigma_i} |
| 24622 | @infoline @expr{sigma_i} | 24622 | @infoline @expr{sigma_i} |
| 24623 | used for the data point. | 24623 | used for the data point. |
| 24624 | 24624 | ||
| 24625 | Both @kbd{a F} and @kbd{H a F} can accept error forms in the input | 24625 | Both @kbd{a F} and @kbd{H a F} can accept error forms in the input |
| @@ -24627,19 +24627,19 @@ matrix, although if you are concerned about error analysis you will | |||
| 24627 | probably use @kbd{H a F} so that the output also contains error | 24627 | probably use @kbd{H a F} so that the output also contains error |
| 24628 | estimates. | 24628 | estimates. |
| 24629 | 24629 | ||
| 24630 | If the input contains error forms but all the | 24630 | If the input contains error forms but all the |
| 24631 | @texline @math{\sigma_i} | 24631 | @texline @math{\sigma_i} |
| 24632 | @infoline @expr{sigma_i} | 24632 | @infoline @expr{sigma_i} |
| 24633 | values are the same, it is easy to see that the resulting fitted model | 24633 | values are the same, it is easy to see that the resulting fitted model |
| 24634 | will be the same as if the input did not have error forms at all | 24634 | will be the same as if the input did not have error forms at all |
| 24635 | @texline (@math{\chi^2} | 24635 | @texline (@math{\chi^2} |
| 24636 | @infoline (@expr{chi^2} | 24636 | @infoline (@expr{chi^2} |
| 24637 | is simply scaled uniformly by | 24637 | is simply scaled uniformly by |
| 24638 | @texline @math{1 / \sigma^2}, | 24638 | @texline @math{1 / \sigma^2}, |
| 24639 | @infoline @expr{1 / sigma^2}, | 24639 | @infoline @expr{1 / sigma^2}, |
| 24640 | which doesn't affect where it has a minimum). But there @emph{will} be | 24640 | which doesn't affect where it has a minimum). But there @emph{will} be |
| 24641 | a difference in the estimated errors of the coefficients reported by | 24641 | a difference in the estimated errors of the coefficients reported by |
| 24642 | @kbd{H a F}. | 24642 | @kbd{H a F}. |
| 24643 | 24643 | ||
| 24644 | Consult any text on statistical modeling of data for a discussion | 24644 | Consult any text on statistical modeling of data for a discussion |
| 24645 | of where these error estimates come from and how they should be | 24645 | of where these error estimates come from and how they should be |
| @@ -24671,18 +24671,18 @@ will have length @expr{M = d+1} with the constant term first. | |||
| 24671 | The covariance matrix @expr{C} computed from the fit. This is | 24671 | The covariance matrix @expr{C} computed from the fit. This is |
| 24672 | an @var{m}x@var{m} symmetric matrix; the diagonal elements | 24672 | an @var{m}x@var{m} symmetric matrix; the diagonal elements |
| 24673 | @texline @math{C_{jj}} | 24673 | @texline @math{C_{jj}} |
| 24674 | @infoline @expr{C_j_j} | 24674 | @infoline @expr{C_j_j} |
| 24675 | are the variances | 24675 | are the variances |
| 24676 | @texline @math{\sigma_j^2} | 24676 | @texline @math{\sigma_j^2} |
| 24677 | @infoline @expr{sigma_j^2} | 24677 | @infoline @expr{sigma_j^2} |
| 24678 | of the parameters. The other elements are covariances | 24678 | of the parameters. The other elements are covariances |
| 24679 | @texline @math{\sigma_{ij}^2} | 24679 | @texline @math{\sigma_{ij}^2} |
| 24680 | @infoline @expr{sigma_i_j^2} | 24680 | @infoline @expr{sigma_i_j^2} |
| 24681 | that describe the correlation between pairs of parameters. (A related | 24681 | that describe the correlation between pairs of parameters. (A related |
| 24682 | set of numbers, the @dfn{linear correlation coefficients} | 24682 | set of numbers, the @dfn{linear correlation coefficients} |
| 24683 | @texline @math{r_{ij}}, | 24683 | @texline @math{r_{ij}}, |
| 24684 | @infoline @expr{r_i_j}, | 24684 | @infoline @expr{r_i_j}, |
| 24685 | are defined as | 24685 | are defined as |
| 24686 | @texline @math{\sigma_{ij}^2 / \sigma_i \, \sigma_j}.) | 24686 | @texline @math{\sigma_{ij}^2 / \sigma_i \, \sigma_j}.) |
| 24687 | @infoline @expr{sigma_i_j^2 / sigma_i sigma_j}.) | 24687 | @infoline @expr{sigma_i_j^2 / sigma_i sigma_j}.) |
| 24688 | 24688 | ||
| @@ -24693,35 +24693,35 @@ will instead be an empty vector; this is always the case for the | |||
| 24693 | polynomial and multilinear fits described so far. | 24693 | polynomial and multilinear fits described so far. |
| 24694 | 24694 | ||
| 24695 | @item | 24695 | @item |
| 24696 | The value of | 24696 | The value of |
| 24697 | @texline @math{\chi^2} | 24697 | @texline @math{\chi^2} |
| 24698 | @infoline @expr{chi^2} | 24698 | @infoline @expr{chi^2} |
| 24699 | for the fit, calculated by the formulas shown above. This gives a | 24699 | for the fit, calculated by the formulas shown above. This gives a |
| 24700 | measure of the quality of the fit; statisticians consider | 24700 | measure of the quality of the fit; statisticians consider |
| 24701 | @texline @math{\chi^2 \approx N - M} | 24701 | @texline @math{\chi^2 \approx N - M} |
| 24702 | @infoline @expr{chi^2 = N - M} | 24702 | @infoline @expr{chi^2 = N - M} |
| 24703 | to indicate a moderately good fit (where again @expr{N} is the number of | 24703 | to indicate a moderately good fit (where again @expr{N} is the number of |
| 24704 | data points and @expr{M} is the number of parameters). | 24704 | data points and @expr{M} is the number of parameters). |
| 24705 | 24705 | ||
| 24706 | @item | 24706 | @item |
| 24707 | A measure of goodness of fit expressed as a probability @expr{Q}. | 24707 | A measure of goodness of fit expressed as a probability @expr{Q}. |
| 24708 | This is computed from the @code{utpc} probability distribution | 24708 | This is computed from the @code{utpc} probability distribution |
| 24709 | function using | 24709 | function using |
| 24710 | @texline @math{\chi^2} | 24710 | @texline @math{\chi^2} |
| 24711 | @infoline @expr{chi^2} | 24711 | @infoline @expr{chi^2} |
| 24712 | with @expr{N - M} degrees of freedom. A | 24712 | with @expr{N - M} degrees of freedom. A |
| 24713 | value of 0.5 implies a good fit; some texts recommend that often | 24713 | value of 0.5 implies a good fit; some texts recommend that often |
| 24714 | @expr{Q = 0.1} or even 0.001 can signify an acceptable fit. In | 24714 | @expr{Q = 0.1} or even 0.001 can signify an acceptable fit. In |
| 24715 | particular, | 24715 | particular, |
| 24716 | @texline @math{\chi^2} | 24716 | @texline @math{\chi^2} |
| 24717 | @infoline @expr{chi^2} | 24717 | @infoline @expr{chi^2} |
| 24718 | statistics assume the errors in your inputs | 24718 | statistics assume the errors in your inputs |
| 24719 | follow a normal (Gaussian) distribution; if they don't, you may | 24719 | follow a normal (Gaussian) distribution; if they don't, you may |
| 24720 | have to accept smaller values of @expr{Q}. | 24720 | have to accept smaller values of @expr{Q}. |
| 24721 | 24721 | ||
| 24722 | The @expr{Q} value is computed only if the input included error | 24722 | The @expr{Q} value is computed only if the input included error |
| 24723 | estimates. Otherwise, Calc will report the symbol @code{nan} | 24723 | estimates. Otherwise, Calc will report the symbol @code{nan} |
| 24724 | for @expr{Q}. The reason is that in this case the | 24724 | for @expr{Q}. The reason is that in this case the |
| 24725 | @texline @math{\chi^2} | 24725 | @texline @math{\chi^2} |
| 24726 | @infoline @expr{chi^2} | 24726 | @infoline @expr{chi^2} |
| 24727 | value has effectively been used to estimate the original errors | 24727 | value has effectively been used to estimate the original errors |
| @@ -24763,7 +24763,7 @@ Power law. @mathit{a x^b y^c}. | |||
| 24763 | @item q | 24763 | @item q |
| 24764 | Quadratic. @mathit{a + b (x-c)^2 + d (x-e)^2}. | 24764 | Quadratic. @mathit{a + b (x-c)^2 + d (x-e)^2}. |
| 24765 | @item g | 24765 | @item g |
| 24766 | Gaussian. | 24766 | Gaussian. |
| 24767 | @texline @math{{a \over b \sqrt{2 \pi}} \exp\left( -{1 \over 2} \left( x - c \over b \right)^2 \right)}. | 24767 | @texline @math{{a \over b \sqrt{2 \pi}} \exp\left( -{1 \over 2} \left( x - c \over b \right)^2 \right)}. |
| 24768 | @infoline @mathit{(a / b sqrt(2 pi)) exp(-0.5*((x-c)/b)^2)}. | 24768 | @infoline @mathit{(a / b sqrt(2 pi)) exp(-0.5*((x-c)/b)^2)}. |
| 24769 | @item s | 24769 | @item s |
| @@ -24788,7 +24788,7 @@ the parameter values from the vector that is placed in the trail.) | |||
| 24788 | 24788 | ||
| 24789 | All models except Gaussian, logistics, Hubbert and polynomials can | 24789 | All models except Gaussian, logistics, Hubbert and polynomials can |
| 24790 | generalize as shown to any number of independent variables. Also, all | 24790 | generalize as shown to any number of independent variables. Also, all |
| 24791 | the built-in models except for the logistic and Hubbert curves have an | 24791 | the built-in models except for the logistic and Hubbert curves have an |
| 24792 | additive or multiplicative parameter shown as @expr{a} in the above table | 24792 | additive or multiplicative parameter shown as @expr{a} in the above table |
| 24793 | which can be replaced by zero or one, as appropriate, by typing @kbd{h} | 24793 | which can be replaced by zero or one, as appropriate, by typing @kbd{h} |
| 24794 | before the model key. | 24794 | before the model key. |
| @@ -24893,9 +24893,9 @@ form @samp{arcsin(y) = a t + b}. The @code{arcsin} function always | |||
| 24893 | returns results in the range from @mathit{-90} to 90 degrees (or the | 24893 | returns results in the range from @mathit{-90} to 90 degrees (or the |
| 24894 | equivalent range in radians). Suppose you had data that you | 24894 | equivalent range in radians). Suppose you had data that you |
| 24895 | believed to represent roughly three oscillations of a sine wave, | 24895 | believed to represent roughly three oscillations of a sine wave, |
| 24896 | so that the argument of the sine might go from zero to | 24896 | so that the argument of the sine might go from zero to |
| 24897 | @texline @math{3\times360} | 24897 | @texline @math{3\times360} |
| 24898 | @infoline @mathit{3*360} | 24898 | @infoline @mathit{3*360} |
| 24899 | degrees. | 24899 | degrees. |
| 24900 | The above model would appear to be a good way to determine the | 24900 | The above model would appear to be a good way to determine the |
| 24901 | true frequency and phase of the sine wave, but in practice it | 24901 | true frequency and phase of the sine wave, but in practice it |
| @@ -24955,18 +24955,18 @@ ln(y) = ln(a) + b ln(x) | |||
| 24955 | @end example | 24955 | @end example |
| 24956 | 24956 | ||
| 24957 | @noindent | 24957 | @noindent |
| 24958 | which matches the desired form with | 24958 | which matches the desired form with |
| 24959 | @texline @math{Y = \ln(y)}, | 24959 | @texline @math{Y = \ln(y)}, |
| 24960 | @infoline @expr{Y = ln(y)}, | 24960 | @infoline @expr{Y = ln(y)}, |
| 24961 | @texline @math{A = \ln(a)}, | 24961 | @texline @math{A = \ln(a)}, |
| 24962 | @infoline @expr{A = ln(a)}, | 24962 | @infoline @expr{A = ln(a)}, |
| 24963 | @expr{F = 1}, @expr{B = b}, and | 24963 | @expr{F = 1}, @expr{B = b}, and |
| 24964 | @texline @math{G = \ln(x)}. | 24964 | @texline @math{G = \ln(x)}. |
| 24965 | @infoline @expr{G = ln(x)}. | 24965 | @infoline @expr{G = ln(x)}. |
| 24966 | Calc thus computes the logarithms of your @expr{y} and @expr{x} values, | 24966 | Calc thus computes the logarithms of your @expr{y} and @expr{x} values, |
| 24967 | does a linear fit for @expr{A} and @expr{B}, then solves to get | 24967 | does a linear fit for @expr{A} and @expr{B}, then solves to get |
| 24968 | @texline @math{a = \exp(A)} | 24968 | @texline @math{a = \exp(A)} |
| 24969 | @infoline @expr{a = exp(A)} | 24969 | @infoline @expr{a = exp(A)} |
| 24970 | and @expr{b = B}. | 24970 | and @expr{b = B}. |
| 24971 | 24971 | ||
| 24972 | Another interesting example is the ``quadratic'' model, which can | 24972 | Another interesting example is the ``quadratic'' model, which can |
| @@ -25015,7 +25015,7 @@ from the list of parameters when you answer the variables prompt. | |||
| 25015 | 25015 | ||
| 25016 | A last desperate step would be to use the general-purpose | 25016 | A last desperate step would be to use the general-purpose |
| 25017 | @code{minimize} function rather than @code{fit}. After all, both | 25017 | @code{minimize} function rather than @code{fit}. After all, both |
| 25018 | functions solve the problem of minimizing an expression (the | 25018 | functions solve the problem of minimizing an expression (the |
| 25019 | @texline @math{\chi^2} | 25019 | @texline @math{\chi^2} |
| 25020 | @infoline @expr{chi^2} | 25020 | @infoline @expr{chi^2} |
| 25021 | sum) by adjusting certain parameters in the expression. The @kbd{a F} | 25021 | sum) by adjusting certain parameters in the expression. The @kbd{a F} |
| @@ -25026,9 +25026,9 @@ command can do the same thing by brute force. | |||
| 25026 | A compromise would be to pick out a few parameters without which the | 25026 | A compromise would be to pick out a few parameters without which the |
| 25027 | fit is linearizable, and use @code{minimize} on a call to @code{fit} | 25027 | fit is linearizable, and use @code{minimize} on a call to @code{fit} |
| 25028 | which efficiently takes care of the rest of the parameters. The thing | 25028 | which efficiently takes care of the rest of the parameters. The thing |
| 25029 | to be minimized would be the value of | 25029 | to be minimized would be the value of |
| 25030 | @texline @math{\chi^2} | 25030 | @texline @math{\chi^2} |
| 25031 | @infoline @expr{chi^2} | 25031 | @infoline @expr{chi^2} |
| 25032 | returned as the fifth result of the @code{xfit} function: | 25032 | returned as the fifth result of the @code{xfit} function: |
| 25033 | 25033 | ||
| 25034 | @smallexample | 25034 | @smallexample |
| @@ -25086,13 +25086,13 @@ of the sum of the squares of the errors. It then changes @expr{x} | |||
| 25086 | and @expr{y} to be plain numbers, and makes @expr{z} into an error | 25086 | and @expr{y} to be plain numbers, and makes @expr{z} into an error |
| 25087 | form with this combined error. The @expr{Y(x,y,z)} part of the | 25087 | form with this combined error. The @expr{Y(x,y,z)} part of the |
| 25088 | linearized model is evaluated, and the result should be an error | 25088 | linearized model is evaluated, and the result should be an error |
| 25089 | form. The error part of that result is used for | 25089 | form. The error part of that result is used for |
| 25090 | @texline @math{\sigma_i} | 25090 | @texline @math{\sigma_i} |
| 25091 | @infoline @expr{sigma_i} | 25091 | @infoline @expr{sigma_i} |
| 25092 | for the data point. If for some reason @expr{Y(x,y,z)} does not return | 25092 | for the data point. If for some reason @expr{Y(x,y,z)} does not return |
| 25093 | an error form, the combined error from @expr{z} is used directly for | 25093 | an error form, the combined error from @expr{z} is used directly for |
| 25094 | @texline @math{\sigma_i}. | 25094 | @texline @math{\sigma_i}. |
| 25095 | @infoline @expr{sigma_i}. | 25095 | @infoline @expr{sigma_i}. |
| 25096 | Finally, @expr{z} is also stripped of its error | 25096 | Finally, @expr{z} is also stripped of its error |
| 25097 | for use in computing @expr{F(x,y,z)}, @expr{G(x,y,z)} and so on; | 25097 | for use in computing @expr{F(x,y,z)}, @expr{G(x,y,z)} and so on; |
| 25098 | the righthand side of the linearized model is computed in regular | 25098 | the righthand side of the linearized model is computed in regular |
| @@ -25104,7 +25104,7 @@ depends only on the dependent variable @expr{z}, and in fact is | |||
| 25104 | often simply equal to @expr{z}. For common cases like polynomials | 25104 | often simply equal to @expr{z}. For common cases like polynomials |
| 25105 | and multilinear models, the combined error is simply used as the | 25105 | and multilinear models, the combined error is simply used as the |
| 25106 | @texline @math{\sigma} | 25106 | @texline @math{\sigma} |
| 25107 | @infoline @expr{sigma} | 25107 | @infoline @expr{sigma} |
| 25108 | for the data point with no further ado.) | 25108 | for the data point with no further ado.) |
| 25109 | 25109 | ||
| 25110 | @tex | 25110 | @tex |
| @@ -25481,7 +25481,7 @@ this would be a division by zero. But at @expr{k = k_0}, this | |||
| 25481 | formula works out to the indeterminate form @expr{0 / 0}, which | 25481 | formula works out to the indeterminate form @expr{0 / 0}, which |
| 25482 | Calc will not assume is zero. Better would be to use | 25482 | Calc will not assume is zero. Better would be to use |
| 25483 | @samp{(k != k_0) ? 1/(k-k_0) : 0}; the @samp{? :} operator does | 25483 | @samp{(k != k_0) ? 1/(k-k_0) : 0}; the @samp{? :} operator does |
| 25484 | an ``if-then-else'' test: This expression says, ``if | 25484 | an ``if-then-else'' test: This expression says, ``if |
| 25485 | @texline @math{k \ne k_0}, | 25485 | @texline @math{k \ne k_0}, |
| 25486 | @infoline @expr{k != k_0}, | 25486 | @infoline @expr{k != k_0}, |
| 25487 | then @expr{1/(k-k_0)}, else zero.'' Now the formula @expr{1/(k-k_0)} | 25487 | then @expr{1/(k-k_0)}, else zero.'' Now the formula @expr{1/(k-k_0)} |
| @@ -26496,16 +26496,16 @@ f(a b) := a f(b) :: real(a)]} is stored in variable @samp{linearF}, | |||
| 26496 | then the rule set @samp{[f(0) := 0, import(linearF)]} will apply | 26496 | then the rule set @samp{[f(0) := 0, import(linearF)]} will apply |
| 26497 | all three rules. It is possible to modify the imported rules | 26497 | all three rules. It is possible to modify the imported rules |
| 26498 | slightly: @samp{import(x, v1, x1, v2, x2, @dots{})} imports | 26498 | slightly: @samp{import(x, v1, x1, v2, x2, @dots{})} imports |
| 26499 | the rule set @expr{x} with all occurrences of | 26499 | the rule set @expr{x} with all occurrences of |
| 26500 | @texline @math{v_1}, | 26500 | @texline @math{v_1}, |
| 26501 | @infoline @expr{v1}, | 26501 | @infoline @expr{v1}, |
| 26502 | as either a variable name or a function name, replaced with | 26502 | as either a variable name or a function name, replaced with |
| 26503 | @texline @math{x_1} | 26503 | @texline @math{x_1} |
| 26504 | @infoline @expr{x1} | 26504 | @infoline @expr{x1} |
| 26505 | and so on. (If | 26505 | and so on. (If |
| 26506 | @texline @math{v_1} | 26506 | @texline @math{v_1} |
| 26507 | @infoline @expr{v1} | 26507 | @infoline @expr{v1} |
| 26508 | is used as a function name, then | 26508 | is used as a function name, then |
| 26509 | @texline @math{x_1} | 26509 | @texline @math{x_1} |
| 26510 | @infoline @expr{x1} | 26510 | @infoline @expr{x1} |
| 26511 | must be either a function name itself or a @w{@samp{< >}} nameless | 26511 | must be either a function name itself or a @w{@samp{< >}} nameless |
| @@ -27609,7 +27609,7 @@ the keyboard macro @kbd{' tri($) @key{RET}} to make a command that applies | |||
| 27609 | @code{tri} to the value on the top of the stack. @xref{Programming}. | 27609 | @code{tri} to the value on the top of the stack. @xref{Programming}. |
| 27610 | 27610 | ||
| 27611 | @cindex Quaternions | 27611 | @cindex Quaternions |
| 27612 | The following rule set, contributed by | 27612 | The following rule set, contributed by |
| 27613 | @texline Fran\c cois | 27613 | @texline Fran\c cois |
| 27614 | @infoline Francois | 27614 | @infoline Francois |
| 27615 | Pinard, implements @dfn{quaternions}, a generalization of the concept of | 27615 | Pinard, implements @dfn{quaternions}, a generalization of the concept of |
| @@ -27764,9 +27764,9 @@ equivalent temperature on the Fahrenheit scale. | |||
| 27764 | While many of Calc's conversion factors are exact, some are necessarily | 27764 | While many of Calc's conversion factors are exact, some are necessarily |
| 27765 | approximate. If Calc is in fraction mode (@pxref{Fraction Mode}), then | 27765 | approximate. If Calc is in fraction mode (@pxref{Fraction Mode}), then |
| 27766 | unit conversions will try to give exact, rational conversions, but it | 27766 | unit conversions will try to give exact, rational conversions, but it |
| 27767 | isn't always possible. Given @samp{55 mph} in fraction mode, typing | 27767 | isn't always possible. Given @samp{55 mph} in fraction mode, typing |
| 27768 | @kbd{u c m/s @key{RET}} produces @samp{15367:625 m/s}, for example, | 27768 | @kbd{u c m/s @key{RET}} produces @samp{15367:625 m/s}, for example, |
| 27769 | while typing @kbd{u c au/yr @key{RET}} produces | 27769 | while typing @kbd{u c au/yr @key{RET}} produces |
| 27770 | @samp{5.18665819999e-3 au/yr}. | 27770 | @samp{5.18665819999e-3 au/yr}. |
| 27771 | 27771 | ||
| 27772 | If the units you request are inconsistent with the original units, the | 27772 | If the units you request are inconsistent with the original units, the |
| @@ -27994,7 +27994,7 @@ defined by the @TeX{} typesetting system: @samp{72.27 texpt = 1 in}. | |||
| 27994 | Other units used by @TeX{} are available; they are @code{texpc} (a pica), | 27994 | Other units used by @TeX{} are available; they are @code{texpc} (a pica), |
| 27995 | @code{texbp} (a ``big point'', equal to a standard point which is larger | 27995 | @code{texbp} (a ``big point'', equal to a standard point which is larger |
| 27996 | than the point used by @TeX{}), @code{texdd} (a Didot point), | 27996 | than the point used by @TeX{}), @code{texdd} (a Didot point), |
| 27997 | @code{texcc} (a Cicero) and @code{texsp} (a scaled @TeX{} point, | 27997 | @code{texcc} (a Cicero) and @code{texsp} (a scaled @TeX{} point, |
| 27998 | all dimensions representable in @TeX{} are multiples of this value). | 27998 | all dimensions representable in @TeX{} are multiples of this value). |
| 27999 | 27999 | ||
| 28000 | When Calc is using the @TeX{} or La@TeX{} language mode (@pxref{TeX | 28000 | When Calc is using the @TeX{} or La@TeX{} language mode (@pxref{TeX |
| @@ -28131,17 +28131,17 @@ The units @code{dB} (decibels) and @code{Np} (nepers) are logarithmic | |||
| 28131 | units which are manipulated differently than standard units. Calc | 28131 | units which are manipulated differently than standard units. Calc |
| 28132 | provides commands to work with these logarithmic units. | 28132 | provides commands to work with these logarithmic units. |
| 28133 | 28133 | ||
| 28134 | Decibels and nepers are used to measure power quantities as well as | 28134 | Decibels and nepers are used to measure power quantities as well as |
| 28135 | field quantities (quantities whose squares are proportional to power); | 28135 | field quantities (quantities whose squares are proportional to power); |
| 28136 | these two types of quantities are handled slightly different from each | 28136 | these two types of quantities are handled slightly different from each |
| 28137 | other. By default the Calc commands work as if power quantities are | 28137 | other. By default the Calc commands work as if power quantities are |
| 28138 | being used; with the @kbd{H} prefix the Calc commands work as if field | 28138 | being used; with the @kbd{H} prefix the Calc commands work as if field |
| 28139 | quantities are being used. | 28139 | quantities are being used. |
| 28140 | 28140 | ||
| 28141 | The decibel level of a power | 28141 | The decibel level of a power |
| 28142 | @infoline @math{P1}, | 28142 | @infoline @math{P1}, |
| 28143 | @texline @math{P_1}, | 28143 | @texline @math{P_1}, |
| 28144 | relative to a reference power | 28144 | relative to a reference power |
| 28145 | @infoline @math{P0}, | 28145 | @infoline @math{P0}, |
| 28146 | @texline @math{P_0}, | 28146 | @texline @math{P_0}, |
| 28147 | is defined to be | 28147 | is defined to be |
| @@ -28151,10 +28151,10 @@ is defined to be | |||
| 28151 | one-tenth of a bel. The bel, named after Alexander Graham Bell, was | 28151 | one-tenth of a bel. The bel, named after Alexander Graham Bell, was |
| 28152 | considered to be too large of a unit and was effectively replaced by | 28152 | considered to be too large of a unit and was effectively replaced by |
| 28153 | the decibel.) If @math{F} is a field quantity with power | 28153 | the decibel.) If @math{F} is a field quantity with power |
| 28154 | @math{P=k F^2}, then a reference quantity of | 28154 | @math{P=k F^2}, then a reference quantity of |
| 28155 | @infoline @math{F0} | 28155 | @infoline @math{F0} |
| 28156 | @texline @math{F_0} | 28156 | @texline @math{F_0} |
| 28157 | would correspond to a power of | 28157 | would correspond to a power of |
| 28158 | @infoline @math{P0=k F0^2}. | 28158 | @infoline @math{P0=k F0^2}. |
| 28159 | @texline @math{P_{0}=kF_{0}^2}. | 28159 | @texline @math{P_{0}=kF_{0}^2}. |
| 28160 | If | 28160 | If |
| @@ -28163,7 +28163,7 @@ If | |||
| 28163 | then | 28163 | then |
| 28164 | 28164 | ||
| 28165 | @ifnottex | 28165 | @ifnottex |
| 28166 | @example | 28166 | @example |
| 28167 | 10 log10(P1/P0) = 10 log10(F1^2/F0^2) = 20 log10(F1/F0). | 28167 | 10 log10(P1/P0) = 10 log10(F1^2/F0^2) = 20 log10(F1/F0). |
| 28168 | @end example | 28168 | @end example |
| 28169 | @end ifnottex | 28169 | @end ifnottex |
| @@ -28175,42 +28175,42 @@ $$ 10 \log_{10}(P_1/P_0) = 10 \log_{10}(F_1^2/F_0^2) = 20 | |||
| 28175 | @noindent | 28175 | @noindent |
| 28176 | In order to get the same decibel level regardless of whether a field | 28176 | In order to get the same decibel level regardless of whether a field |
| 28177 | quantity or the corresponding power quantity is used, the decibel | 28177 | quantity or the corresponding power quantity is used, the decibel |
| 28178 | level of a field quantity | 28178 | level of a field quantity |
| 28179 | @infoline @math{F1}, | 28179 | @infoline @math{F1}, |
| 28180 | @texline @math{F_1}, | 28180 | @texline @math{F_1}, |
| 28181 | relative to a reference | 28181 | relative to a reference |
| 28182 | @infoline @math{F0}, | 28182 | @infoline @math{F0}, |
| 28183 | @texline @math{F_0}, | 28183 | @texline @math{F_0}, |
| 28184 | is defined as | 28184 | is defined as |
| 28185 | @infoline @math{20 log10(F1/F0) dB}. | 28185 | @infoline @math{20 log10(F1/F0) dB}. |
| 28186 | @texline @math{20 \log_{10}(F_{1}/F_{0}) {\rm dB}}. | 28186 | @texline @math{20 \log_{10}(F_{1}/F_{0}) {\rm dB}}. |
| 28187 | For example, the decibel value of a sound pressure level of | 28187 | For example, the decibel value of a sound pressure level of |
| 28188 | @infoline @math{60 uPa} | 28188 | @infoline @math{60 uPa} |
| 28189 | @texline @math{60 \mu{\rm Pa}} | 28189 | @texline @math{60 \mu{\rm Pa}} |
| 28190 | relative to | 28190 | relative to |
| 28191 | @infoline @math{20 uPa} | 28191 | @infoline @math{20 uPa} |
| 28192 | @texline @math{20 \mu{\rm Pa}} | 28192 | @texline @math{20 \mu{\rm Pa}} |
| 28193 | (the threshhold of human hearing) is | 28193 | (the threshold of human hearing) is |
| 28194 | @infoline @math{20 log10(60 uPa/ 20 uPa) dB = 20 log10(3) dB}, | 28194 | @infoline @math{20 log10(60 uPa/ 20 uPa) dB = 20 log10(3) dB}, |
| 28195 | @texline @math{20 \log_{10}(60 \mu{\rm Pa}/20 \mu{\rm Pa}) {\rm dB} = 20 \log_{10}(3) {\rm dB}}, | 28195 | @texline @math{20 \log_{10}(60 \mu{\rm Pa}/20 \mu{\rm Pa}) {\rm dB} = 20 \log_{10}(3) {\rm dB}}, |
| 28196 | which is about | 28196 | which is about |
| 28197 | @infoline @math{9.54 dB}. | 28197 | @infoline @math{9.54 dB}. |
| 28198 | @texline @math{9.54 {\rm dB}}. | 28198 | @texline @math{9.54 {\rm dB}}. |
| 28199 | Note that in taking the ratio, the original units cancel and so these | 28199 | Note that in taking the ratio, the original units cancel and so these |
| 28200 | logarithmic units are dimensionless. | 28200 | logarithmic units are dimensionless. |
| 28201 | 28201 | ||
| 28202 | Nepers (named after John Napier, who is credited with inventing the | 28202 | Nepers (named after John Napier, who is credited with inventing the |
| 28203 | logarithm) are similar to bels except they use natural logarithms instead | 28203 | logarithm) are similar to bels except they use natural logarithms instead |
| 28204 | of common logarithms. The neper level of a power | 28204 | of common logarithms. The neper level of a power |
| 28205 | @infoline @math{P1}, | 28205 | @infoline @math{P1}, |
| 28206 | @texline @math{P_1}, | 28206 | @texline @math{P_1}, |
| 28207 | relative to a reference power | 28207 | relative to a reference power |
| 28208 | @infoline @math{P0}, | 28208 | @infoline @math{P0}, |
| 28209 | @texline @math{P_0}, | 28209 | @texline @math{P_0}, |
| 28210 | is | 28210 | is |
| 28211 | @infoline @math{(1/2) ln(P1/P0) Np}. | 28211 | @infoline @math{(1/2) ln(P1/P0) Np}. |
| 28212 | @texline @math{(1/2) \ln(P_1/P_0) {\rm Np}}. | 28212 | @texline @math{(1/2) \ln(P_1/P_0) {\rm Np}}. |
| 28213 | The neper level of a field | 28213 | The neper level of a field |
| 28214 | @infoline @math{F1}, | 28214 | @infoline @math{F1}, |
| 28215 | @texline @math{F_1}, | 28215 | @texline @math{F_1}, |
| 28216 | relative to a reference field | 28216 | relative to a reference field |
| @@ -28223,13 +28223,13 @@ is | |||
| 28223 | @vindex calc-lu-power-reference | 28223 | @vindex calc-lu-power-reference |
| 28224 | @vindex calc-lu-field-reference | 28224 | @vindex calc-lu-field-reference |
| 28225 | For power quantities, Calc uses | 28225 | For power quantities, Calc uses |
| 28226 | @infoline @math{1 mW} | 28226 | @infoline @math{1 mW} |
| 28227 | @texline @math{1 {\rm mW}} | 28227 | @texline @math{1 {\rm mW}} |
| 28228 | as the default reference quantity; this default can be changed by changing | 28228 | as the default reference quantity; this default can be changed by changing |
| 28229 | the value of the customizable variable | 28229 | the value of the customizable variable |
| 28230 | @code{calc-lu-power-reference} (@pxref{Customizing Calc}). | 28230 | @code{calc-lu-power-reference} (@pxref{Customizing Calc}). |
| 28231 | For field quantities, Calc uses | 28231 | For field quantities, Calc uses |
| 28232 | @infoline @math{20 uPa} | 28232 | @infoline @math{20 uPa} |
| 28233 | @texline @math{20 \mu{\rm Pa}} | 28233 | @texline @math{20 \mu{\rm Pa}} |
| 28234 | as the default reference quantity; this is the value used in acoustics | 28234 | as the default reference quantity; this is the value used in acoustics |
| 28235 | which is where decibels are commonly encountered. This default can be | 28235 | which is where decibels are commonly encountered. This default can be |
| @@ -28247,9 +28247,9 @@ command computes the power quantity corresponding to a given number of | |||
| 28247 | logarithmic units. With the capital @kbd{O} prefix, @kbd{O l q}, the | 28247 | logarithmic units. With the capital @kbd{O} prefix, @kbd{O l q}, the |
| 28248 | reference level will be read from the top of the stack. (In an | 28248 | reference level will be read from the top of the stack. (In an |
| 28249 | algebraic formula, @code{lupquant} can be given an optional second | 28249 | algebraic formula, @code{lupquant} can be given an optional second |
| 28250 | argument which will be used for the reference level.) For example, | 28250 | argument which will be used for the reference level.) For example, |
| 28251 | @code{20 dB @key{RET} l q} will return @code{100 mW}; | 28251 | @code{20 dB @key{RET} l q} will return @code{100 mW}; |
| 28252 | @code{20 dB @key{RET} 4 W @key{RET} O l q} will return @code{400 W}. | 28252 | @code{20 dB @key{RET} 4 W @key{RET} O l q} will return @code{400 W}. |
| 28253 | The @kbd{H l q} [@code{lufquant}] command behaves like @kbd{l q} but | 28253 | The @kbd{H l q} [@code{lufquant}] command behaves like @kbd{l q} but |
| 28254 | computes field quantities instead of power quantities. | 28254 | computes field quantities instead of power quantities. |
| 28255 | 28255 | ||
| @@ -28288,13 +28288,13 @@ the reference level can be given as an optional second argument. | |||
| 28288 | @tindex lufdiv | 28288 | @tindex lufdiv |
| 28289 | The sum of two power or field quantities doesn't correspond to the sum | 28289 | The sum of two power or field quantities doesn't correspond to the sum |
| 28290 | of the corresponding decibel or neper levels. If the powers | 28290 | of the corresponding decibel or neper levels. If the powers |
| 28291 | corresponding to decibel levels | 28291 | corresponding to decibel levels |
| 28292 | @infoline @math{D1} | 28292 | @infoline @math{D1} |
| 28293 | @texline @math{D_1} | 28293 | @texline @math{D_1} |
| 28294 | and | 28294 | and |
| 28295 | @infoline @math{D2} | 28295 | @infoline @math{D2} |
| 28296 | @texline @math{D_2} | 28296 | @texline @math{D_2} |
| 28297 | are added, the corresponding decibel level ``sum'' will be | 28297 | are added, the corresponding decibel level ``sum'' will be |
| 28298 | 28298 | ||
| 28299 | @ifnottex | 28299 | @ifnottex |
| 28300 | @example | 28300 | @example |
| @@ -28338,7 +28338,7 @@ $$ D + 10 \log_{10}(N) {\rm dB},$$ | |||
| 28338 | 28338 | ||
| 28339 | @noindent | 28339 | @noindent |
| 28340 | if a field quantity is multiplied by @math{N} the corresponding decibel level | 28340 | if a field quantity is multiplied by @math{N} the corresponding decibel level |
| 28341 | will be | 28341 | will be |
| 28342 | 28342 | ||
| 28343 | @ifnottex | 28343 | @ifnottex |
| 28344 | @example | 28344 | @example |
| @@ -28375,31 +28375,31 @@ operating on notes. | |||
| 28375 | Scientific pitch notation refers to a note by giving a letter | 28375 | Scientific pitch notation refers to a note by giving a letter |
| 28376 | A through G, possibly followed by a flat or sharp) with a subscript | 28376 | A through G, possibly followed by a flat or sharp) with a subscript |
| 28377 | indicating an octave number. Each octave starts with C and ends with | 28377 | indicating an octave number. Each octave starts with C and ends with |
| 28378 | B and | 28378 | B and |
| 28379 | @c increasing each note by a semitone will result | 28379 | @c increasing each note by a semitone will result |
| 28380 | @c in the sequence @expr{C}, @expr{C} sharp, @expr{D}, @expr{E} flat, @expr{E}, | 28380 | @c in the sequence @expr{C}, @expr{C} sharp, @expr{D}, @expr{E} flat, @expr{E}, |
| 28381 | @c @expr{F}, @expr{F} sharp, @expr{G}, @expr{A} flat, @expr{A}, @expr{B} | 28381 | @c @expr{F}, @expr{F} sharp, @expr{G}, @expr{A} flat, @expr{A}, @expr{B} |
| 28382 | @c flat and @expr{B}. | 28382 | @c flat and @expr{B}. |
| 28383 | the octave numbered 0 was chosen to correspond to the lowest | 28383 | the octave numbered 0 was chosen to correspond to the lowest |
| 28384 | audible frequency. Using this system, middle C (about 261.625 Hz) | 28384 | audible frequency. Using this system, middle C (about 261.625 Hz) |
| 28385 | corresponds to the note @expr{C} in octave 4 and is denoted | 28385 | corresponds to the note @expr{C} in octave 4 and is denoted |
| 28386 | @expr{C_4}. Any frequency can be described by giving a note plus an | 28386 | @expr{C_4}. Any frequency can be described by giving a note plus an |
| 28387 | offset in cents (where a cent is a ratio of frequencies so that a | 28387 | offset in cents (where a cent is a ratio of frequencies so that a |
| 28388 | semitone consists of 100 cents). | 28388 | semitone consists of 100 cents). |
| 28389 | 28389 | ||
| 28390 | The midi note number system assigns numbers to notes so that | 28390 | The midi note number system assigns numbers to notes so that |
| 28391 | @expr{C_(-1)} corresponds to the midi note number 0 and @expr{G_9} | 28391 | @expr{C_(-1)} corresponds to the midi note number 0 and @expr{G_9} |
| 28392 | corresponds to the midi note number 127. A midi controller can have | 28392 | corresponds to the midi note number 127. A midi controller can have |
| 28393 | up to 128 keys and each midi note number from 0 to 127 corresponds to | 28393 | up to 128 keys and each midi note number from 0 to 127 corresponds to |
| 28394 | a possible key. | 28394 | a possible key. |
| 28395 | 28395 | ||
| 28396 | @kindex l s | 28396 | @kindex l s |
| 28397 | @pindex calc-spn | 28397 | @pindex calc-spn |
| 28398 | @tindex spn | 28398 | @tindex spn |
| 28399 | The @kbd{l s} (@code{calc-spn}) [@code{spn}] command converts either | 28399 | The @kbd{l s} (@code{calc-spn}) [@code{spn}] command converts either |
| 28400 | a frequency or a midi number to scientific pitch notation. For | 28400 | a frequency or a midi number to scientific pitch notation. For |
| 28401 | example, @code{500 Hz} gets converted to | 28401 | example, @code{500 Hz} gets converted to |
| 28402 | @code{B_4 + 21.3094853649 cents} and @code{84} to @code{C_6}. | 28402 | @code{B_4 + 21.3094853649 cents} and @code{84} to @code{C_6}. |
| 28403 | 28403 | ||
| 28404 | 28404 | ||
| 28405 | @kindex l m | 28405 | @kindex l m |
| @@ -28464,7 +28464,7 @@ The @kbd{s s} (@code{calc-store}) command stores the value at the top of | |||
| 28464 | the stack into a specified variable. It prompts you to enter the | 28464 | the stack into a specified variable. It prompts you to enter the |
| 28465 | name of the variable. If you press a single digit, the value is stored | 28465 | name of the variable. If you press a single digit, the value is stored |
| 28466 | immediately in one of the ``quick'' variables @code{q0} through | 28466 | immediately in one of the ``quick'' variables @code{q0} through |
| 28467 | @code{q9}. Or you can enter any variable name. | 28467 | @code{q9}. Or you can enter any variable name. |
| 28468 | 28468 | ||
| 28469 | @kindex s t | 28469 | @kindex s t |
| 28470 | @pindex calc-store-into | 28470 | @pindex calc-store-into |
| @@ -28554,12 +28554,12 @@ and @kbd{s ]} which decrease or increase a variable by one. | |||
| 28554 | All the arithmetic stores accept the Inverse prefix to reverse the | 28554 | All the arithmetic stores accept the Inverse prefix to reverse the |
| 28555 | order of the operands. If @expr{v} represents the contents of the | 28555 | order of the operands. If @expr{v} represents the contents of the |
| 28556 | variable, and @expr{a} is the value drawn from the stack, then regular | 28556 | variable, and @expr{a} is the value drawn from the stack, then regular |
| 28557 | @w{@kbd{s -}} assigns | 28557 | @w{@kbd{s -}} assigns |
| 28558 | @texline @math{v \coloneq v - a}, | 28558 | @texline @math{v \coloneq v - a}, |
| 28559 | @infoline @expr{v := v - a}, | 28559 | @infoline @expr{v := v - a}, |
| 28560 | but @kbd{I s -} assigns | 28560 | but @kbd{I s -} assigns |
| 28561 | @texline @math{v \coloneq a - v}. | 28561 | @texline @math{v \coloneq a - v}. |
| 28562 | @infoline @expr{v := a - v}. | 28562 | @infoline @expr{v := a - v}. |
| 28563 | While @kbd{I s *} might seem pointless, it is | 28563 | While @kbd{I s *} might seem pointless, it is |
| 28564 | useful if matrix multiplication is involved. Actually, all the | 28564 | useful if matrix multiplication is involved. Actually, all the |
| 28565 | arithmetic stores use formulas designed to behave usefully both | 28565 | arithmetic stores use formulas designed to behave usefully both |
| @@ -28668,7 +28668,7 @@ magic property is preserved, however, when a variable is copied with | |||
| 28668 | @kindex s k | 28668 | @kindex s k |
| 28669 | @pindex calc-copy-special-constant | 28669 | @pindex calc-copy-special-constant |
| 28670 | If one of the ``special constants'' is redefined (or undefined) so that | 28670 | If one of the ``special constants'' is redefined (or undefined) so that |
| 28671 | it no longer has its magic property, the property can be restored with | 28671 | it no longer has its magic property, the property can be restored with |
| 28672 | @kbd{s k} (@code{calc-copy-special-constant}). This command will prompt | 28672 | @kbd{s k} (@code{calc-copy-special-constant}). This command will prompt |
| 28673 | for a special constant and a variable to store it in, and so a special | 28673 | for a special constant and a variable to store it in, and so a special |
| 28674 | constant can be stored in any variable. Here, the special constant that | 28674 | constant can be stored in any variable. Here, the special constant that |
| @@ -28850,7 +28850,7 @@ explicitly naming them in an @kbd{s p} command.) | |||
| 28850 | The @kbd{s i} (@code{calc-insert-variables}) command writes | 28850 | The @kbd{s i} (@code{calc-insert-variables}) command writes |
| 28851 | the values of all Calc variables into a specified buffer. | 28851 | the values of all Calc variables into a specified buffer. |
| 28852 | The variables are written with the prefix @code{var-} in the form of | 28852 | The variables are written with the prefix @code{var-} in the form of |
| 28853 | Lisp @code{setq} commands | 28853 | Lisp @code{setq} commands |
| 28854 | which store the values in string form. You can place these commands | 28854 | which store the values in string form. You can place these commands |
| 28855 | in your Calc init file (or @file{.emacs}) if you wish, though in this case it | 28855 | in your Calc init file (or @file{.emacs}) if you wish, though in this case it |
| 28856 | would be easier to use @kbd{s p @key{RET}}. (Note that @kbd{s i} | 28856 | would be easier to use @kbd{s p @key{RET}}. (Note that @kbd{s i} |
| @@ -29159,9 +29159,9 @@ In the first case, ``x'' and ``y'' are each vectors (not necessarily of | |||
| 29159 | the same length); either or both may instead be interval forms. The | 29159 | the same length); either or both may instead be interval forms. The |
| 29160 | ``z'' value must be a matrix with the same number of rows as elements | 29160 | ``z'' value must be a matrix with the same number of rows as elements |
| 29161 | in ``x'', and the same number of columns as elements in ``y''. The | 29161 | in ``x'', and the same number of columns as elements in ``y''. The |
| 29162 | result is a surface plot where | 29162 | result is a surface plot where |
| 29163 | @texline @math{z_{ij}} | 29163 | @texline @math{z_{ij}} |
| 29164 | @infoline @expr{z_ij} | 29164 | @infoline @expr{z_ij} |
| 29165 | is the height of the point | 29165 | is the height of the point |
| 29166 | at coordinate @expr{(x_i, y_j)} on the surface. The 3D graph will | 29166 | at coordinate @expr{(x_i, y_j)} on the surface. The 3D graph will |
| 29167 | be displayed from a certain default viewpoint; you can change this | 29167 | be displayed from a certain default viewpoint; you can change this |
| @@ -29270,9 +29270,9 @@ that don't have common ``x'' values. (Of course, the range of ``x'' | |||
| 29270 | values covered by all the curves ought to be roughly the same if | 29270 | values covered by all the curves ought to be roughly the same if |
| 29271 | they are to look nice on the same graph.) | 29271 | they are to look nice on the same graph.) |
| 29272 | 29272 | ||
| 29273 | For example, to plot | 29273 | For example, to plot |
| 29274 | @texline @math{\sin n x} | 29274 | @texline @math{\sin n x} |
| 29275 | @infoline @expr{sin(n x)} | 29275 | @infoline @expr{sin(n x)} |
| 29276 | for integers @expr{n} | 29276 | for integers @expr{n} |
| 29277 | from 1 to 5, you could use @kbd{v x} to create a vector of integers | 29277 | from 1 to 5, you could use @kbd{v x} to create a vector of integers |
| 29278 | (@expr{n}), then @kbd{V M '} or @kbd{V M $} to map @samp{sin(n x)} | 29278 | (@expr{n}), then @kbd{V M '} or @kbd{V M $} to map @samp{sin(n x)} |
| @@ -29510,8 +29510,8 @@ available for any device. | |||
| 29510 | The @kbd{g S} (@code{calc-graph-point-style}) command similarly turns | 29510 | The @kbd{g S} (@code{calc-graph-point-style}) command similarly turns |
| 29511 | the symbols at the data points on or off, or sets the point style. | 29511 | the symbols at the data points on or off, or sets the point style. |
| 29512 | If you turn both lines and points off, the data points will show as | 29512 | If you turn both lines and points off, the data points will show as |
| 29513 | tiny dots. If the ``y'' values being plotted contain error forms and | 29513 | tiny dots. If the ``y'' values being plotted contain error forms and |
| 29514 | the connecting lines are turned off, then this command will also turn | 29514 | the connecting lines are turned off, then this command will also turn |
| 29515 | the error bars on or off. | 29515 | the error bars on or off. |
| 29516 | 29516 | ||
| 29517 | @cindex @code{LineStyles} variable | 29517 | @cindex @code{LineStyles} variable |
| @@ -29563,7 +29563,7 @@ terminals with no special graphics facilities. It writes a crude | |||
| 29563 | picture of the graph composed of characters like @code{-} and @code{|} | 29563 | picture of the graph composed of characters like @code{-} and @code{|} |
| 29564 | to a buffer called @samp{*Gnuplot Trail*}, which Calc then displays. | 29564 | to a buffer called @samp{*Gnuplot Trail*}, which Calc then displays. |
| 29565 | The graph is made the same size as the Emacs screen, which on most | 29565 | The graph is made the same size as the Emacs screen, which on most |
| 29566 | dumb terminals will be | 29566 | dumb terminals will be |
| 29567 | @texline @math{80\times24} | 29567 | @texline @math{80\times24} |
| 29568 | @infoline 80x24 | 29568 | @infoline 80x24 |
| 29569 | characters. The graph is displayed in | 29569 | characters. The graph is displayed in |
| @@ -29820,7 +29820,7 @@ difference.) | |||
| 29820 | @pindex calc-prepend-to-register | 29820 | @pindex calc-prepend-to-register |
| 29821 | @pindex calc-append-to-register | 29821 | @pindex calc-append-to-register |
| 29822 | @cindex Registers | 29822 | @cindex Registers |
| 29823 | An alternative to killing and yanking stack entries is using | 29823 | An alternative to killing and yanking stack entries is using |
| 29824 | registers in Calc. Saving stack entries in registers is like | 29824 | registers in Calc. Saving stack entries in registers is like |
| 29825 | saving text in normal Emacs registers; although, like Calc's kill | 29825 | saving text in normal Emacs registers; although, like Calc's kill |
| 29826 | commands, register commands always operate on whole stack | 29826 | commands, register commands always operate on whole stack |
| @@ -29935,7 +29935,7 @@ separately as a matrix element. If a line contained | |||
| 29935 | would correctly split the line into two error forms. | 29935 | would correctly split the line into two error forms. |
| 29936 | 29936 | ||
| 29937 | @xref{Matrix Functions}, to see how to pull the matrix apart into its | 29937 | @xref{Matrix Functions}, to see how to pull the matrix apart into its |
| 29938 | constituent rows and columns. (If it is a | 29938 | constituent rows and columns. (If it is a |
| 29939 | @texline @math{1\times1} | 29939 | @texline @math{1\times1} |
| 29940 | @infoline 1x1 | 29940 | @infoline 1x1 |
| 29941 | matrix, just hit @kbd{v u} (@code{calc-unpack}) twice.) | 29941 | matrix, just hit @kbd{v u} (@code{calc-unpack}) twice.) |
| @@ -30273,7 +30273,7 @@ same limit as last time. | |||
| 30273 | 30273 | ||
| 30274 | @key{INV GCD} computes the LCM (least common multiple) function. | 30274 | @key{INV GCD} computes the LCM (least common multiple) function. |
| 30275 | 30275 | ||
| 30276 | @key{INV FACT} is the gamma function. | 30276 | @key{INV FACT} is the gamma function. |
| 30277 | @texline @math{\Gamma(x) = (x-1)!}. | 30277 | @texline @math{\Gamma(x) = (x-1)!}. |
| 30278 | @infoline @expr{gamma(x) = (x-1)!}. | 30278 | @infoline @expr{gamma(x) = (x-1)!}. |
| 30279 | 30279 | ||
| @@ -30490,7 +30490,7 @@ Similarly, Calc will use @TeX{} language for @code{tex-mode}, | |||
| 30490 | @code{plain-tex-mode} and @code{context-mode}, C language for | 30490 | @code{plain-tex-mode} and @code{context-mode}, C language for |
| 30491 | @code{c-mode} and @code{c++-mode}, FORTRAN language for | 30491 | @code{c-mode} and @code{c++-mode}, FORTRAN language for |
| 30492 | @code{fortran-mode} and @code{f90-mode}, Pascal for @code{pascal-mode}, | 30492 | @code{fortran-mode} and @code{f90-mode}, Pascal for @code{pascal-mode}, |
| 30493 | and eqn for @code{nroff-mode} (@pxref{Customizing Calc}). | 30493 | and eqn for @code{nroff-mode} (@pxref{Customizing Calc}). |
| 30494 | These can be overridden with Calc's mode | 30494 | These can be overridden with Calc's mode |
| 30495 | changing commands (@pxref{Mode Settings in Embedded Mode}). If no | 30495 | changing commands (@pxref{Mode Settings in Embedded Mode}). If no |
| 30496 | suitable language is available, Calc will continue with its current language. | 30496 | suitable language is available, Calc will continue with its current language. |
| @@ -30670,13 +30670,13 @@ version. | |||
| 30670 | 30670 | ||
| 30671 | Plain formulas are preceded and followed by @samp{%%%} signs | 30671 | Plain formulas are preceded and followed by @samp{%%%} signs |
| 30672 | by default. This notation has the advantage that the @samp{%} | 30672 | by default. This notation has the advantage that the @samp{%} |
| 30673 | character begins a comment in @TeX{} and La@TeX{}, so if your formula is | 30673 | character begins a comment in @TeX{} and La@TeX{}, so if your formula is |
| 30674 | embedded in a @TeX{} or La@TeX{} document its plain version will be | 30674 | embedded in a @TeX{} or La@TeX{} document its plain version will be |
| 30675 | invisible in the final printed copy. Certain major modes have different | 30675 | invisible in the final printed copy. Certain major modes have different |
| 30676 | delimiters to ensure that the ``plain'' version will be | 30676 | delimiters to ensure that the ``plain'' version will be |
| 30677 | in a comment for those modes, also. | 30677 | in a comment for those modes, also. |
| 30678 | See @ref{Customizing Embedded Mode} to see how to change the ``plain'' | 30678 | See @ref{Customizing Embedded Mode} to see how to change the ``plain'' |
| 30679 | formula delimiters. | 30679 | formula delimiters. |
| 30680 | 30680 | ||
| 30681 | There are several notations which Calc's parser for ``big'' | 30681 | There are several notations which Calc's parser for ``big'' |
| 30682 | formatted formulas can't yet recognize. In particular, it can't | 30682 | formatted formulas can't yet recognize. In particular, it can't |
| @@ -31178,7 +31178,7 @@ We would have to go down to the other formula and press @kbd{C-x * u} | |||
| 31178 | on it in order to get it to notice the new annotation. | 31178 | on it in order to get it to notice the new annotation. |
| 31179 | 31179 | ||
| 31180 | Two more mode-recording modes selectable by @kbd{m R} are available | 31180 | Two more mode-recording modes selectable by @kbd{m R} are available |
| 31181 | which are also available outside of Embedded mode. | 31181 | which are also available outside of Embedded mode. |
| 31182 | (@pxref{General Mode Commands}.) They are @code{Save}, in which mode | 31182 | (@pxref{General Mode Commands}.) They are @code{Save}, in which mode |
| 31183 | settings are recorded permanently in your Calc init file (the file given | 31183 | settings are recorded permanently in your Calc init file (the file given |
| 31184 | by the variable @code{calc-settings-file}, typically @file{~/.emacs.d/calc.el}) | 31184 | by the variable @code{calc-settings-file}, typically @file{~/.emacs.d/calc.el}) |
| @@ -31195,11 +31195,11 @@ for @code{Save} have no effect. | |||
| 31195 | 31195 | ||
| 31196 | @noindent | 31196 | @noindent |
| 31197 | You can modify Embedded mode's behavior by setting various Lisp | 31197 | You can modify Embedded mode's behavior by setting various Lisp |
| 31198 | variables described here. These variables are customizable | 31198 | variables described here. These variables are customizable |
| 31199 | (@pxref{Customizing Calc}), or you can use @kbd{M-x set-variable} | 31199 | (@pxref{Customizing Calc}), or you can use @kbd{M-x set-variable} |
| 31200 | or @kbd{M-x edit-options} to adjust a variable on the fly. | 31200 | or @kbd{M-x edit-options} to adjust a variable on the fly. |
| 31201 | (Another possibility would be to use a file-local variable annotation at | 31201 | (Another possibility would be to use a file-local variable annotation at |
| 31202 | the end of the file; | 31202 | the end of the file; |
| 31203 | @pxref{File Variables, , Local Variables in Files, emacs, the Emacs manual}.) | 31203 | @pxref{File Variables, , Local Variables in Files, emacs, the Emacs manual}.) |
| 31204 | Many of the variables given mentioned here can be set to depend on the | 31204 | Many of the variables given mentioned here can be set to depend on the |
| 31205 | major mode of the editing buffer (@pxref{Customizing Calc}). | 31205 | major mode of the editing buffer (@pxref{Customizing Calc}). |
| @@ -31334,7 +31334,7 @@ Calc never scans for this string; Calc always looks for the | |||
| 31334 | annotation itself. But this is the string that is inserted before | 31334 | annotation itself. But this is the string that is inserted before |
| 31335 | the opening bracket when Calc adds an annotation on its own. | 31335 | the opening bracket when Calc adds an annotation on its own. |
| 31336 | The default is @code{"% "}, but may be different for different major | 31336 | The default is @code{"% "}, but may be different for different major |
| 31337 | modes. | 31337 | modes. |
| 31338 | 31338 | ||
| 31339 | @vindex calc-embedded-close-mode | 31339 | @vindex calc-embedded-close-mode |
| 31340 | The @code{calc-embedded-close-mode} variable is a string which | 31340 | The @code{calc-embedded-close-mode} variable is a string which |
| @@ -31459,7 +31459,7 @@ without its key binding, type @kbd{M-x} and enter a function name. (The | |||
| 31459 | (If the command you give implies a function, the function will be saved, | 31459 | (If the command you give implies a function, the function will be saved, |
| 31460 | and if the function has any display formats, those will be saved, but | 31460 | and if the function has any display formats, those will be saved, but |
| 31461 | not the other way around: Saving a function will not save any commands | 31461 | not the other way around: Saving a function will not save any commands |
| 31462 | or key bindings associated with the function.) | 31462 | or key bindings associated with the function.) |
| 31463 | 31463 | ||
| 31464 | @kindex Z E | 31464 | @kindex Z E |
| 31465 | @pindex calc-user-define-edit | 31465 | @pindex calc-user-define-edit |
| @@ -31542,7 +31542,7 @@ Once you have bound your keyboard macro to a key, you can use | |||
| 31542 | @cindex Keyboard macros, editing | 31542 | @cindex Keyboard macros, editing |
| 31543 | The @kbd{Z E} (@code{calc-user-define-edit}) command on a key that has | 31543 | The @kbd{Z E} (@code{calc-user-define-edit}) command on a key that has |
| 31544 | been defined by a keyboard macro tries to use the @code{edmacro} package | 31544 | been defined by a keyboard macro tries to use the @code{edmacro} package |
| 31545 | edit the macro. Type @kbd{C-c C-c} to finish editing and update | 31545 | edit the macro. Type @kbd{C-c C-c} to finish editing and update |
| 31546 | the definition stored on the key, or, to cancel the edit, kill the | 31546 | the definition stored on the key, or, to cancel the edit, kill the |
| 31547 | buffer with @kbd{C-x k}. | 31547 | buffer with @kbd{C-x k}. |
| 31548 | The special characters @code{RET}, @code{LFD}, @code{TAB}, @code{SPC}, | 31548 | The special characters @code{RET}, @code{LFD}, @code{TAB}, @code{SPC}, |
| @@ -31552,7 +31552,7 @@ sequences, written in all uppercase, as must the prefixes @code{C-} and | |||
| 31552 | copied verbatim into the keyboard macro. Basically, the notation is the | 31552 | copied verbatim into the keyboard macro. Basically, the notation is the |
| 31553 | same as is used in all of this manual's examples, except that the manual | 31553 | same as is used in all of this manual's examples, except that the manual |
| 31554 | takes some liberties with spaces: When we say @kbd{' [1 2 3] @key{RET}}, | 31554 | takes some liberties with spaces: When we say @kbd{' [1 2 3] @key{RET}}, |
| 31555 | we take it for granted that it is clear we really mean | 31555 | we take it for granted that it is clear we really mean |
| 31556 | @kbd{' [1 @key{SPC} 2 @key{SPC} 3] @key{RET}}. | 31556 | @kbd{' [1 @key{SPC} 2 @key{SPC} 3] @key{RET}}. |
| 31557 | 31557 | ||
| 31558 | @kindex C-x * m | 31558 | @kindex C-x * m |
| @@ -31823,7 +31823,7 @@ prompt for the @kbd{Z #} command; it will not play any role in any | |||
| 31823 | subsequent calculations.) This command allows your keyboard macros to | 31823 | subsequent calculations.) This command allows your keyboard macros to |
| 31824 | accept numbers or formulas as interactive input. | 31824 | accept numbers or formulas as interactive input. |
| 31825 | 31825 | ||
| 31826 | As an example, | 31826 | As an example, |
| 31827 | @kbd{2 @key{RET} "Power: " @key{RET} Z # 3 @key{RET} ^} will prompt for | 31827 | @kbd{2 @key{RET} "Power: " @key{RET} Z # 3 @key{RET} ^} will prompt for |
| 31828 | input with ``Power: '' in the minibuffer, then return 2 to the provided | 31828 | input with ``Power: '' in the minibuffer, then return 2 to the provided |
| 31829 | power. (The response to the prompt that's given, 3 in this example, | 31829 | power. (The response to the prompt that's given, 3 in this example, |
| @@ -31900,7 +31900,7 @@ The third prompt is for an algebraic function name. The default is to | |||
| 31900 | use the same name as the command name but without the @samp{calc-} | 31900 | use the same name as the command name but without the @samp{calc-} |
| 31901 | prefix. (If this is of the form @samp{User-m}, the hyphen is removed so | 31901 | prefix. (If this is of the form @samp{User-m}, the hyphen is removed so |
| 31902 | it won't be taken for a minus sign in algebraic formulas.) | 31902 | it won't be taken for a minus sign in algebraic formulas.) |
| 31903 | This is the name you will use if you want to enter your | 31903 | This is the name you will use if you want to enter your |
| 31904 | new function in an algebraic formula. Suppose we enter @kbd{yow @key{RET}}. | 31904 | new function in an algebraic formula. Suppose we enter @kbd{yow @key{RET}}. |
| 31905 | Then the new function can be invoked by pushing two numbers on the | 31905 | Then the new function can be invoked by pushing two numbers on the |
| 31906 | stack and typing @kbd{z m} or @kbd{x spam}, or by entering the algebraic | 31906 | stack and typing @kbd{z m} or @kbd{x spam}, or by entering the algebraic |
| @@ -32695,7 +32695,7 @@ same thing with a single division by 512. | |||
| 32695 | @end ignore | 32695 | @end ignore |
| 32696 | @tindex mysin | 32696 | @tindex mysin |
| 32697 | A somewhat limited sine function could be defined as follows, using the | 32697 | A somewhat limited sine function could be defined as follows, using the |
| 32698 | well-known Taylor series expansion for | 32698 | well-known Taylor series expansion for |
| 32699 | @texline @math{\sin x}: | 32699 | @texline @math{\sin x}: |
| 32700 | @infoline @samp{sin(x)}: | 32700 | @infoline @samp{sin(x)}: |
| 32701 | 32701 | ||
| @@ -35241,7 +35241,7 @@ to use a different prefix, you can put | |||
| 35241 | @end example | 35241 | @end example |
| 35242 | 35242 | ||
| 35243 | @noindent | 35243 | @noindent |
| 35244 | in your .emacs file. | 35244 | in your .emacs file. |
| 35245 | (@xref{Key Bindings,,Customizing Key Bindings,emacs, | 35245 | (@xref{Key Bindings,,Customizing Key Bindings,emacs, |
| 35246 | The GNU Emacs Manual}, for more information on binding keys.) | 35246 | The GNU Emacs Manual}, for more information on binding keys.) |
| 35247 | A convenient way to start Calc is with @kbd{C-x * *}; to make it equally | 35247 | A convenient way to start Calc is with @kbd{C-x * *}; to make it equally |
| @@ -35269,7 +35269,7 @@ to see how regular expressions work. | |||
| 35269 | @defvar calc-settings-file | 35269 | @defvar calc-settings-file |
| 35270 | The variable @code{calc-settings-file} holds the file name in | 35270 | The variable @code{calc-settings-file} holds the file name in |
| 35271 | which commands like @kbd{m m} and @kbd{Z P} store ``permanent'' | 35271 | which commands like @kbd{m m} and @kbd{Z P} store ``permanent'' |
| 35272 | definitions. | 35272 | definitions. |
| 35273 | If @code{calc-settings-file} is not your user init file (typically | 35273 | If @code{calc-settings-file} is not your user init file (typically |
| 35274 | @file{~/.emacs}) and if the variable @code{calc-loaded-settings-file} is | 35274 | @file{~/.emacs}) and if the variable @code{calc-loaded-settings-file} is |
| 35275 | @code{nil}, then Calc will automatically load your settings file (if it | 35275 | @code{nil}, then Calc will automatically load your settings file (if it |
| @@ -35314,7 +35314,7 @@ enabled, it will try to use the current major mode to | |||
| 35314 | determine what language should be used. (This can be overridden using | 35314 | determine what language should be used. (This can be overridden using |
| 35315 | Calc's mode changing commands, @xref{Mode Settings in Embedded Mode}.) | 35315 | Calc's mode changing commands, @xref{Mode Settings in Embedded Mode}.) |
| 35316 | The variable @code{calc-language-alist} consists of a list of pairs of | 35316 | The variable @code{calc-language-alist} consists of a list of pairs of |
| 35317 | the form @code{(@var{MAJOR-MODE} . @var{LANGUAGE})}; for example, | 35317 | the form @code{(@var{MAJOR-MODE} . @var{LANGUAGE})}; for example, |
| 35318 | @code{(latex-mode . latex)} is one such pair. If Calc embedded is | 35318 | @code{(latex-mode . latex)} is one such pair. If Calc embedded is |
| 35319 | activated in a buffer whose major mode is @var{MAJOR-MODE}, it will set itself | 35319 | activated in a buffer whose major mode is @var{MAJOR-MODE}, it will set itself |
| 35320 | to use the language @var{LANGUAGE}. | 35320 | to use the language @var{LANGUAGE}. |
| @@ -35342,7 +35342,7 @@ what formulas @kbd{C-x * a} will activate in a buffer. It is a | |||
| 35342 | regular expression, and when activating embedded formulas with | 35342 | regular expression, and when activating embedded formulas with |
| 35343 | @kbd{C-x * a}, it will tell Calc that what follows is a formula to be | 35343 | @kbd{C-x * a}, it will tell Calc that what follows is a formula to be |
| 35344 | activated. (Calc also uses other patterns to find formulas, such as | 35344 | activated. (Calc also uses other patterns to find formulas, such as |
| 35345 | @samp{=>} and @samp{:=}.) | 35345 | @samp{=>} and @samp{:=}.) |
| 35346 | 35346 | ||
| 35347 | The default pattern is @code{"%Embed\n\\(% .*\n\\)*"}, which checks | 35347 | The default pattern is @code{"%Embed\n\\(% .*\n\\)*"}, which checks |
| 35348 | for @samp{%Embed} followed by any number of lines beginning with | 35348 | for @samp{%Embed} followed by any number of lines beginning with |
| @@ -35367,7 +35367,7 @@ It consists of a list of pairs of the form @code{(@var{MAJOR-MODE} . | |||
| 35367 | (texinfo-mode . "@@c Embed\n\\(@@c .*\n\\)*")) | 35367 | (texinfo-mode . "@@c Embed\n\\(@@c .*\n\\)*")) |
| 35368 | @end example | 35368 | @end example |
| 35369 | Any major modes added to @code{calc-embedded-announce-formula-alist} | 35369 | Any major modes added to @code{calc-embedded-announce-formula-alist} |
| 35370 | should also be added to @code{calc-embedded-open-close-plain-alist} | 35370 | should also be added to @code{calc-embedded-open-close-plain-alist} |
| 35371 | and @code{calc-embedded-open-close-mode-alist}. | 35371 | and @code{calc-embedded-open-close-mode-alist}. |
| 35372 | @end defvar | 35372 | @end defvar |
| 35373 | 35373 | ||
| @@ -35378,7 +35378,7 @@ See @ref{Customizing Embedded Mode}.@* | |||
| 35378 | The variables @code{calc-embedded-open-formula} and | 35378 | The variables @code{calc-embedded-open-formula} and |
| 35379 | @code{calc-embedded-close-formula} control the region that Calc will | 35379 | @code{calc-embedded-close-formula} control the region that Calc will |
| 35380 | activate as a formula when Embedded mode is entered with @kbd{C-x * e}. | 35380 | activate as a formula when Embedded mode is entered with @kbd{C-x * e}. |
| 35381 | They are regular expressions; | 35381 | They are regular expressions; |
| 35382 | Calc normally scans backward and forward in the buffer for the | 35382 | Calc normally scans backward and forward in the buffer for the |
| 35383 | nearest text matching these regular expressions to be the ``formula | 35383 | nearest text matching these regular expressions to be the ``formula |
| 35384 | delimiters''. | 35384 | delimiters''. |
| @@ -35403,7 +35403,7 @@ The variable @code{calc-embedded-open-close-formula-alist} is used to | |||
| 35403 | set @code{calc-embedded-open-formula} and | 35403 | set @code{calc-embedded-open-formula} and |
| 35404 | @code{calc-embedded-close-formula} to different regular | 35404 | @code{calc-embedded-close-formula} to different regular |
| 35405 | expressions depending on the major mode of the editing buffer. | 35405 | expressions depending on the major mode of the editing buffer. |
| 35406 | It consists of a list of lists of the form | 35406 | It consists of a list of lists of the form |
| 35407 | @code{(@var{MAJOR-MODE} @var{OPEN-FORMULA-REGEXP} | 35407 | @code{(@var{MAJOR-MODE} @var{OPEN-FORMULA-REGEXP} |
| 35408 | @var{CLOSE-FORMULA-REGEXP})}, and its default value is | 35408 | @var{CLOSE-FORMULA-REGEXP})}, and its default value is |
| 35409 | @code{nil}. | 35409 | @code{nil}. |
| @@ -35422,7 +35422,7 @@ The default value of @code{calc-embedded-word-regexp} is | |||
| 35422 | The variable @code{calc-embedded-word-regexp-alist} is used to | 35422 | The variable @code{calc-embedded-word-regexp-alist} is used to |
| 35423 | set @code{calc-embedded-word-regexp} to a different regular | 35423 | set @code{calc-embedded-word-regexp} to a different regular |
| 35424 | expression depending on the major mode of the editing buffer. | 35424 | expression depending on the major mode of the editing buffer. |
| 35425 | It consists of a list of lists of the form | 35425 | It consists of a list of lists of the form |
| 35426 | @code{(@var{MAJOR-MODE} @var{WORD-REGEXP})}, and its default value is | 35426 | @code{(@var{MAJOR-MODE} @var{WORD-REGEXP})}, and its default value is |
| 35427 | @code{nil}. | 35427 | @code{nil}. |
| 35428 | @end defvar | 35428 | @end defvar |
| @@ -35437,8 +35437,8 @@ formulas. Note that these are actual strings, not regular | |||
| 35437 | expressions, because Calc must be able to write these string into a | 35437 | expressions, because Calc must be able to write these string into a |
| 35438 | buffer as well as to recognize them. | 35438 | buffer as well as to recognize them. |
| 35439 | 35439 | ||
| 35440 | The default string for @code{calc-embedded-open-plain} is | 35440 | The default string for @code{calc-embedded-open-plain} is |
| 35441 | @code{"%%% "}, note the trailing space. The default string for | 35441 | @code{"%%% "}, note the trailing space. The default string for |
| 35442 | @code{calc-embedded-close-plain} is @code{" %%%\n"}, without | 35442 | @code{calc-embedded-close-plain} is @code{" %%%\n"}, without |
| 35443 | the trailing newline here, the first line of a Big mode formula | 35443 | the trailing newline here, the first line of a Big mode formula |
| 35444 | that followed might be shifted over with respect to the other lines. | 35444 | that followed might be shifted over with respect to the other lines. |
| @@ -35447,7 +35447,7 @@ The variable @code{calc-embedded-open-close-plain-alist} is used to | |||
| 35447 | set @code{calc-embedded-open-plain} and | 35447 | set @code{calc-embedded-open-plain} and |
| 35448 | @code{calc-embedded-close-plain} to different strings | 35448 | @code{calc-embedded-close-plain} to different strings |
| 35449 | depending on the major mode of the editing buffer. | 35449 | depending on the major mode of the editing buffer. |
| 35450 | It consists of a list of lists of the form | 35450 | It consists of a list of lists of the form |
| 35451 | @code{(@var{MAJOR-MODE} @var{OPEN-PLAIN-STRING} | 35451 | @code{(@var{MAJOR-MODE} @var{OPEN-PLAIN-STRING} |
| 35452 | @var{CLOSE-PLAIN-STRING})}, and its default value is | 35452 | @var{CLOSE-PLAIN-STRING})}, and its default value is |
| 35453 | @example | 35453 | @example |
| @@ -35490,7 +35490,7 @@ The variable @code{calc-embedded-open-close-new-formula-alist} is used to | |||
| 35490 | set @code{calc-embedded-open-new-formula} and | 35490 | set @code{calc-embedded-open-new-formula} and |
| 35491 | @code{calc-embedded-close-new-formula} to different strings | 35491 | @code{calc-embedded-close-new-formula} to different strings |
| 35492 | depending on the major mode of the editing buffer. | 35492 | depending on the major mode of the editing buffer. |
| 35493 | It consists of a list of lists of the form | 35493 | It consists of a list of lists of the form |
| 35494 | @code{(@var{MAJOR-MODE} @var{OPEN-NEW-FORMULA-STRING} | 35494 | @code{(@var{MAJOR-MODE} @var{OPEN-NEW-FORMULA-STRING} |
| 35495 | @var{CLOSE-NEW-FORMULA-STRING})}, and its default value is | 35495 | @var{CLOSE-NEW-FORMULA-STRING})}, and its default value is |
| 35496 | @code{nil}. | 35496 | @code{nil}. |
| @@ -35508,7 +35508,7 @@ necessary to add them to user-written annotations. | |||
| 35508 | 35508 | ||
| 35509 | The default value of @code{calc-embedded-open-mode} is @code{"% "} | 35509 | The default value of @code{calc-embedded-open-mode} is @code{"% "} |
| 35510 | and the default value of @code{calc-embedded-close-mode} is | 35510 | and the default value of @code{calc-embedded-close-mode} is |
| 35511 | @code{"\n"}. | 35511 | @code{"\n"}. |
| 35512 | If you change the value of @code{calc-embedded-close-mode}, it is a good | 35512 | If you change the value of @code{calc-embedded-close-mode}, it is a good |
| 35513 | idea still to end with a newline so that mode annotations will appear on | 35513 | idea still to end with a newline so that mode annotations will appear on |
| 35514 | lines by themselves. | 35514 | lines by themselves. |
| @@ -35517,7 +35517,7 @@ The variable @code{calc-embedded-open-close-mode-alist} is used to | |||
| 35517 | set @code{calc-embedded-open-mode} and | 35517 | set @code{calc-embedded-open-mode} and |
| 35518 | @code{calc-embedded-close-mode} to different strings | 35518 | @code{calc-embedded-close-mode} to different strings |
| 35519 | expressions depending on the major mode of the editing buffer. | 35519 | expressions depending on the major mode of the editing buffer. |
| 35520 | It consists of a list of lists of the form | 35520 | It consists of a list of lists of the form |
| 35521 | @code{(@var{MAJOR-MODE} @var{OPEN-MODE-STRING} | 35521 | @code{(@var{MAJOR-MODE} @var{OPEN-MODE-STRING} |
| 35522 | @var{CLOSE-MODE-STRING})}, and its default value is | 35522 | @var{CLOSE-MODE-STRING})}, and its default value is |
| 35523 | @example | 35523 | @example |
| @@ -35548,7 +35548,7 @@ units. | |||
| 35548 | 35548 | ||
| 35549 | The default value of @code{calc-lu-power-reference} is @code{"mW"} | 35549 | The default value of @code{calc-lu-power-reference} is @code{"mW"} |
| 35550 | and the default value of @code{calc-lu-field-reference} is | 35550 | and the default value of @code{calc-lu-field-reference} is |
| 35551 | @code{"20 uPa"}. | 35551 | @code{"20 uPa"}. |
| 35552 | @end defvar | 35552 | @end defvar |
| 35553 | 35553 | ||
| 35554 | @defvar calc-note-threshold | 35554 | @defvar calc-note-threshold |
| @@ -35564,15 +35564,15 @@ The default value of @code{calc-note-threshold} is 1. | |||
| 35564 | @defvarx calc-selected-face | 35564 | @defvarx calc-selected-face |
| 35565 | @defvarx calc-nonselected-face | 35565 | @defvarx calc-nonselected-face |
| 35566 | See @ref{Displaying Selections}.@* | 35566 | See @ref{Displaying Selections}.@* |
| 35567 | The variable @code{calc-highlight-selections-with-faces} | 35567 | The variable @code{calc-highlight-selections-with-faces} |
| 35568 | determines how selected sub-formulas are distinguished. | 35568 | determines how selected sub-formulas are distinguished. |
| 35569 | If @code{calc-highlight-selections-with-faces} is nil, then | 35569 | If @code{calc-highlight-selections-with-faces} is nil, then |
| 35570 | a selected sub-formula is distinguished either by changing every | 35570 | a selected sub-formula is distinguished either by changing every |
| 35571 | character not part of the sub-formula with a dot or by changing every | 35571 | character not part of the sub-formula with a dot or by changing every |
| 35572 | character in the sub-formula with a @samp{#} sign. | 35572 | character in the sub-formula with a @samp{#} sign. |
| 35573 | If @code{calc-highlight-selections-with-faces} is t, | 35573 | If @code{calc-highlight-selections-with-faces} is t, |
| 35574 | then a selected sub-formula is distinguished either by displaying the | 35574 | then a selected sub-formula is distinguished either by displaying the |
| 35575 | non-selected portion of the formula with @code{calc-nonselected-face} | 35575 | non-selected portion of the formula with @code{calc-nonselected-face} |
| 35576 | or by displaying the selected sub-formula with | 35576 | or by displaying the selected sub-formula with |
| 35577 | @code{calc-nonselected-face}. | 35577 | @code{calc-nonselected-face}. |
| 35578 | @end defvar | 35578 | @end defvar |
| @@ -36651,9 +36651,9 @@ input data set. Each entry may be a single value or a vector of values. | |||
| 36651 | 36651 | ||
| 36652 | @c 20 | 36652 | @c 20 |
| 36653 | @item | 36653 | @item |
| 36654 | With a prefix argument of 1, take a single | 36654 | With a prefix argument of 1, take a single |
| 36655 | @texline @var{n}@math{\times2} | 36655 | @texline @var{n}@math{\times2} |
| 36656 | @infoline @mathit{@var{N}x2} | 36656 | @infoline @mathit{@var{N}x2} |
| 36657 | matrix from the stack instead of two separate data vectors. | 36657 | matrix from the stack instead of two separate data vectors. |
| 36658 | 36658 | ||
| 36659 | @c 21 | 36659 | @c 21 |
| @@ -36754,7 +36754,7 @@ Variable name may be a single digit or a full name. | |||
| 36754 | 36754 | ||
| 36755 | @c 30 | 36755 | @c 30 |
| 36756 | @item | 36756 | @item |
| 36757 | Editing occurs in a separate buffer. Press @kbd{C-c C-c} (or | 36757 | Editing occurs in a separate buffer. Press @kbd{C-c C-c} (or |
| 36758 | @key{LFD}, or in some cases @key{RET}) to finish the edit, or kill the | 36758 | @key{LFD}, or in some cases @key{RET}) to finish the edit, or kill the |
| 36759 | buffer with @kbd{C-x k} to cancel the edit. The @key{LFD} key prevents evaluation | 36759 | buffer with @kbd{C-x k} to cancel the edit. The @key{LFD} key prevents evaluation |
| 36760 | of the result of the edit. | 36760 | of the result of the edit. |
| @@ -36854,7 +36854,7 @@ to evaluate variables. | |||
| 36854 | @item | 36854 | @item |
| 36855 | The variable is replaced by the formula shown on the right. The | 36855 | The variable is replaced by the formula shown on the right. The |
| 36856 | Inverse flag reverses the order of the operands, e.g., @kbd{I s - x} | 36856 | Inverse flag reverses the order of the operands, e.g., @kbd{I s - x} |
| 36857 | assigns | 36857 | assigns |
| 36858 | @texline @math{x \coloneq a-x}. | 36858 | @texline @math{x \coloneq a-x}. |
| 36859 | @infoline @expr{x := a-x}. | 36859 | @infoline @expr{x := a-x}. |
| 36860 | 36860 | ||
diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi index 55c2c4c0ae8..d5f403e5cdb 100644 --- a/doc/misc/cc-mode.texi +++ b/doc/misc/cc-mode.texi | |||
| @@ -912,7 +912,7 @@ construct, should the point start inside it. If @ccmode fails to find | |||
| 912 | function beginnings or ends inside the current declaration scope, it | 912 | function beginnings or ends inside the current declaration scope, it |
| 913 | will search the enclosing scopes. If you want @ccmode to recognize | 913 | will search the enclosing scopes. If you want @ccmode to recognize |
| 914 | functions only at the top level@footnote{this was @ccmode{}'s | 914 | functions only at the top level@footnote{this was @ccmode{}'s |
| 915 | behavior prior to version 5.32.}, set @code{c-defun-tatic} to | 915 | behavior prior to version 5.32.}, set @code{c-defun-tactic} to |
| 916 | @code{t}. | 916 | @code{t}. |
| 917 | 917 | ||
| 918 | These functions are analogous to the Emacs built-in commands | 918 | These functions are analogous to the Emacs built-in commands |
diff --git a/doc/misc/dbus.texi b/doc/misc/dbus.texi index 79c7ada3b0b..88b068ccd5b 100644 --- a/doc/misc/dbus.texi +++ b/doc/misc/dbus.texi | |||
| @@ -332,7 +332,7 @@ Example: | |||
| 332 | @code{method}, @code{signal}, and @code{property} elements. Unlike | 332 | @code{method}, @code{signal}, and @code{property} elements. Unlike |
| 333 | properties, which can change their values during lifetime of a D-Bus | 333 | properties, which can change their values during lifetime of a D-Bus |
| 334 | object, annotations are static. Often they are used for code | 334 | object, annotations are static. Often they are used for code |
| 335 | generators of D-Bus langugae bindings. Example: | 335 | generators of D-Bus language bindings. Example: |
| 336 | 336 | ||
| 337 | @example | 337 | @example |
| 338 | <annotation name="de.berlios.Pinot.GetStatistics" value="pinotDBus"/> | 338 | <annotation name="de.berlios.Pinot.GetStatistics" value="pinotDBus"/> |
diff --git a/doc/misc/dired-x.texi b/doc/misc/dired-x.texi index 99530e6356d..a026c63e25b 100644 --- a/doc/misc/dired-x.texi +++ b/doc/misc/dired-x.texi | |||
| @@ -476,7 +476,7 @@ in your @code{dired-mode-hook}. | |||
| 476 | This Dired-X feature is obsolete as of Emacs 24.1. The standard Emacs | 476 | This Dired-X feature is obsolete as of Emacs 24.1. The standard Emacs |
| 477 | directory local variables mechanism (@pxref{Directory | 477 | directory local variables mechanism (@pxref{Directory |
| 478 | Variables,,,emacs,The Gnu Emacs manual}) replaces it. For an example of | 478 | Variables,,,emacs,The Gnu Emacs manual}) replaces it. For an example of |
| 479 | the new mechanims, @pxref{Omitting Variables}. | 479 | the new mechanisms, @pxref{Omitting Variables}. |
| 480 | 480 | ||
| 481 | When Dired visits a directory, it looks for a file whose name is the | 481 | When Dired visits a directory, it looks for a file whose name is the |
| 482 | value of variable @code{dired-local-variables-file} (default: @file{.dired}). | 482 | value of variable @code{dired-local-variables-file} (default: @file{.dired}). |
diff --git a/doc/misc/ede.texi b/doc/misc/ede.texi index 55dc7f9a822..f8d757c2d87 100644 --- a/doc/misc/ede.texi +++ b/doc/misc/ede.texi | |||
| @@ -3526,7 +3526,7 @@ use the same autoconf form. | |||
| 3526 | @item :objectextention | 3526 | @item :objectextention |
| 3527 | Type: @code{string} | 3527 | Type: @code{string} |
| 3528 | 3528 | ||
| 3529 | A string which is the extention used for object files. | 3529 | A string which is the extension used for object files. |
| 3530 | For example, C code uses .o on unix, and Emacs Lisp uses .elc. | 3530 | For example, C code uses .o on unix, and Emacs Lisp uses .elc. |
| 3531 | @refill | 3531 | @refill |
| 3532 | 3532 | ||
| @@ -3634,7 +3634,7 @@ it's rule definition. | |||
| 3634 | @item :objectextention | 3634 | @item :objectextention |
| 3635 | Type: @code{string} | 3635 | Type: @code{string} |
| 3636 | 3636 | ||
| 3637 | A string which is the extention used for object files. | 3637 | A string which is the extension used for object files. |
| 3638 | For example, C code uses .o on unix, and Emacs Lisp uses .elc. | 3638 | For example, C code uses .o on unix, and Emacs Lisp uses .elc. |
| 3639 | @refill | 3639 | @refill |
| 3640 | 3640 | ||
| @@ -3782,7 +3782,7 @@ it's rule definition. | |||
| 3782 | @item :objectextention | 3782 | @item :objectextention |
| 3783 | Type: @code{string} | 3783 | Type: @code{string} |
| 3784 | 3784 | ||
| 3785 | A string which is the extention used for object files. | 3785 | A string which is the extension used for object files. |
| 3786 | For example, C code uses .o on unix, and Emacs Lisp uses .elc. | 3786 | For example, C code uses .o on unix, and Emacs Lisp uses .elc. |
| 3787 | @refill | 3787 | @refill |
| 3788 | 3788 | ||
diff --git a/doc/misc/eieio.texi b/doc/misc/eieio.texi index 8ee40288fe0..7b4945027d3 100644 --- a/doc/misc/eieio.texi +++ b/doc/misc/eieio.texi | |||
| @@ -1212,9 +1212,9 @@ This method does nothing by default, but that may change in the future. | |||
| 1212 | This would be the best way to make your objects persistent when using | 1212 | This would be the best way to make your objects persistent when using |
| 1213 | in-place editing. | 1213 | in-place editing. |
| 1214 | 1214 | ||
| 1215 | @section Widget extention | 1215 | @section Widget extension |
| 1216 | 1216 | ||
| 1217 | When widgets are being created, one new widget extention has been added, | 1217 | When widgets are being created, one new widget extension has been added, |
| 1218 | called the @code{:slotofchoices}. When this occurs in a widget | 1218 | called the @code{:slotofchoices}. When this occurs in a widget |
| 1219 | definition, all elements after it are removed, and the slot is specifies | 1219 | definition, all elements after it are removed, and the slot is specifies |
| 1220 | is queried and converted into a series of constants. | 1220 | is queried and converted into a series of constants. |
diff --git a/doc/misc/eshell.texi b/doc/misc/eshell.texi index d2705155887..b0090f0fb84 100644 --- a/doc/misc/eshell.texi +++ b/doc/misc/eshell.texi | |||
| @@ -61,7 +61,7 @@ developing GNU and promoting software freedom.'' | |||
| 61 | @node Top, What is Eshell?, (dir), (dir) | 61 | @node Top, What is Eshell?, (dir), (dir) |
| 62 | @top Eshell | 62 | @top Eshell |
| 63 | 63 | ||
| 64 | Eshell is a shell-like command interpretor | 64 | Eshell is a shell-like command interpreter |
| 65 | implemented in Emacs Lisp. It invokes no external processes except for | 65 | implemented in Emacs Lisp. It invokes no external processes except for |
| 66 | those requested by the user. It is intended to be a functional | 66 | those requested by the user. It is intended to be a functional |
| 67 | replacement for command shells such as @command{bash}, @command{zsh}, | 67 | replacement for command shells such as @command{bash}, @command{zsh}, |
diff --git a/doc/misc/faq.texi b/doc/misc/faq.texi index 262c3d734fe..15c9232d4b6 100644 --- a/doc/misc/faq.texi +++ b/doc/misc/faq.texi | |||
| @@ -627,7 +627,7 @@ translations of the reference card into several languages; look for | |||
| 627 | files named @file{etc/refcards/@var{lang}-refcard.*}, where @var{lang} | 627 | files named @file{etc/refcards/@var{lang}-refcard.*}, where @var{lang} |
| 628 | is a two-letter code of the language. For example, the German version | 628 | is a two-letter code of the language. For example, the German version |
| 629 | of the reference card is in the files @file{etc/refcards/de-refcard.tex} | 629 | of the reference card is in the files @file{etc/refcards/de-refcard.tex} |
| 630 | and @file{etc/recards/de-refcard.pdf}. | 630 | and @file{etc/refcards/de-refcard.pdf}. |
| 631 | 631 | ||
| 632 | @item | 632 | @item |
| 633 | There are many other commands in Emacs for getting help and | 633 | There are many other commands in Emacs for getting help and |
diff --git a/doc/misc/gnus-coding.texi b/doc/misc/gnus-coding.texi index ab9c0232d3d..a79c68f0123 100644 --- a/doc/misc/gnus-coding.texi +++ b/doc/misc/gnus-coding.texi | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | \input texinfo | 1 | \input texinfo |
| 2 | 2 | ||
| 3 | @setfilename gnus-coding | 3 | @setfilename gnus-coding |
| 4 | @settitle Gnus Coding Style and Maintainance Guide | 4 | @settitle Gnus Coding Style and Maintenance Guide |
| 5 | @syncodeindex fn cp | 5 | @syncodeindex fn cp |
| 6 | @syncodeindex vr cp | 6 | @syncodeindex vr cp |
| 7 | @syncodeindex pg cp | 7 | @syncodeindex pg cp |
| @@ -45,7 +45,7 @@ license to the document, as described in section 6 of the license. | |||
| 45 | 45 | ||
| 46 | @ifnottex | 46 | @ifnottex |
| 47 | @node Top | 47 | @node Top |
| 48 | @top Gnus Coding Style and Maintainance Guide | 48 | @top Gnus Coding Style and Maintenance Guide |
| 49 | This manual describes @dots{} | 49 | This manual describes @dots{} |
| 50 | 50 | ||
| 51 | @insertcopying | 51 | @insertcopying |
| @@ -53,7 +53,7 @@ This manual describes @dots{} | |||
| 53 | 53 | ||
| 54 | @menu | 54 | @menu |
| 55 | * Gnus Coding Style:: Gnus Coding Style | 55 | * Gnus Coding Style:: Gnus Coding Style |
| 56 | * Gnus Maintainance Guide:: Gnus Maintainance Guide | 56 | * Gnus Maintenance Guide:: Gnus Maintenance Guide |
| 57 | @end menu | 57 | @end menu |
| 58 | 58 | ||
| 59 | @c @ref{Gnus Reference Guide, ,Gnus Reference Guide, gnus, The Gnus Newsreader} | 59 | @c @ref{Gnus Reference Guide, ,Gnus Reference Guide, gnus, The Gnus Newsreader} |
| @@ -250,8 +250,8 @@ Emacs 20.7 and up. | |||
| 250 | XEmacs 21.1 and up. | 250 | XEmacs 21.1 and up. |
| 251 | @end itemize | 251 | @end itemize |
| 252 | 252 | ||
| 253 | @node Gnus Maintainance Guide | 253 | @node Gnus Maintenance Guide |
| 254 | @chapter Gnus Maintainance Guide | 254 | @chapter Gnus Maintenance Guide |
| 255 | 255 | ||
| 256 | @section Stable and development versions | 256 | @section Stable and development versions |
| 257 | 257 | ||
diff --git a/doc/misc/gnus-news.texi b/doc/misc/gnus-news.texi index 62c1663508b..612ea14e2cf 100644 --- a/doc/misc/gnus-news.texi +++ b/doc/misc/gnus-news.texi | |||
| @@ -107,7 +107,7 @@ EasyPG is included in Emacs 23 and available separately as well. | |||
| 107 | @itemize @bullet | 107 | @itemize @bullet |
| 108 | 108 | ||
| 109 | @item | 109 | @item |
| 110 | Symbols like @code{gcc-self} now has the same presedence rules in | 110 | Symbols like @code{gcc-self} now have the same precedence rules in |
| 111 | @code{gnus-parameters} as other ``real'' variables: The last match | 111 | @code{gnus-parameters} as other ``real'' variables: The last match |
| 112 | wins instead of the first match. | 112 | wins instead of the first match. |
| 113 | 113 | ||
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index a3a93c6ef61..f099dfd36d0 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi | |||
| @@ -4491,23 +4491,6 @@ news. | |||
| 4491 | @table @kbd | 4491 | @table @kbd |
| 4492 | 4492 | ||
| 4493 | 4493 | ||
| 4494 | @item H f | ||
| 4495 | @kindex H f (Group) | ||
| 4496 | @findex gnus-group-fetch-faq | ||
| 4497 | @vindex gnus-group-faq-directory | ||
| 4498 | @cindex FAQ | ||
| 4499 | @cindex ange-ftp | ||
| 4500 | Try to fetch the @acronym{FAQ} for the current group | ||
| 4501 | (@code{gnus-group-fetch-faq}). Gnus will try to get the @acronym{FAQ} | ||
| 4502 | from @code{gnus-group-faq-directory}, which is usually a directory on | ||
| 4503 | a remote machine. This variable can also be a list of directories. | ||
| 4504 | In that case, giving a prefix to this command will allow you to choose | ||
| 4505 | between the various sites. @code{ange-ftp} (or @code{efs}) will be | ||
| 4506 | used for fetching the file. | ||
| 4507 | |||
| 4508 | If fetching from the first site is unsuccessful, Gnus will attempt to go | ||
| 4509 | through @code{gnus-group-faq-directory} and try to open them one by one. | ||
| 4510 | |||
| 4511 | @item H d | 4494 | @item H d |
| 4512 | @itemx C-c C-d | 4495 | @itemx C-c C-d |
| 4513 | @c @icon{gnus-group-describe-group} | 4496 | @c @icon{gnus-group-describe-group} |
| @@ -8992,7 +8975,7 @@ apostrophe or quotation mark, then try this wash. | |||
| 8992 | Translate many non-@acronym{ASCII} characters into their | 8975 | Translate many non-@acronym{ASCII} characters into their |
| 8993 | @acronym{ASCII} equivalents (@code{gnus-article-treat-non-ascii}). | 8976 | @acronym{ASCII} equivalents (@code{gnus-article-treat-non-ascii}). |
| 8994 | This is mostly useful if you're on a terminal that has a limited font | 8977 | This is mostly useful if you're on a terminal that has a limited font |
| 8995 | and does't show accented characters, ``advanced'' punctuation, and the | 8978 | and doesn't show accented characters, ``advanced'' punctuation, and the |
| 8996 | like. For instance, @samp{»} is tranlated into @samp{>>}, and so on. | 8979 | like. For instance, @samp{»} is tranlated into @samp{>>}, and so on. |
| 8997 | 8980 | ||
| 8998 | @item W Y f | 8981 | @item W Y f |
| @@ -21228,7 +21211,7 @@ features (inspired by the Google search input language): | |||
| 21228 | AND, OR, and NOT are supported, and parentheses can be used to control | 21211 | AND, OR, and NOT are supported, and parentheses can be used to control |
| 21229 | operator precedence, e.g. (emacs OR xemacs) AND linux. Note that | 21212 | operator precedence, e.g. (emacs OR xemacs) AND linux. Note that |
| 21230 | operators must be written with all capital letters to be | 21213 | operators must be written with all capital letters to be |
| 21231 | recognised. Also preceding a term with a - sign is equivalent to NOT | 21214 | recognized. Also preceding a term with a - sign is equivalent to NOT |
| 21232 | term. | 21215 | term. |
| 21233 | 21216 | ||
| 21234 | @item Automatic AND queries | 21217 | @item Automatic AND queries |
| @@ -21273,7 +21256,7 @@ Gmane queries follow a simple query language: | |||
| 21273 | AND, OR, NOT (or AND NOT), and XOR are supported, and brackets can be | 21256 | AND, OR, NOT (or AND NOT), and XOR are supported, and brackets can be |
| 21274 | used to control operator precedence, e.g. (emacs OR xemacs) AND linux. | 21257 | used to control operator precedence, e.g. (emacs OR xemacs) AND linux. |
| 21275 | Note that operators must be written with all capital letters to be | 21258 | Note that operators must be written with all capital letters to be |
| 21276 | recognised. | 21259 | recognized. |
| 21277 | 21260 | ||
| 21278 | @item Required and excluded terms | 21261 | @item Required and excluded terms |
| 21279 | + and - can be used to require or exclude terms, e.g. football -american | 21262 | + and - can be used to require or exclude terms, e.g. football -american |
| @@ -25471,7 +25454,7 @@ Write @code{spam-check-blackbox} if Blackbox can check incoming mail. | |||
| 25471 | 25454 | ||
| 25472 | Write @code{spam-blackbox-register-routine} and | 25455 | Write @code{spam-blackbox-register-routine} and |
| 25473 | @code{spam-blackbox-unregister-routine} using the bogofilter | 25456 | @code{spam-blackbox-unregister-routine} using the bogofilter |
| 25474 | register/unregister routines as a start, or other restister/unregister | 25457 | register/unregister routines as a start, or other register/unregister |
| 25475 | routines more appropriate to Blackbox, if Blackbox can | 25458 | routines more appropriate to Blackbox, if Blackbox can |
| 25476 | register/unregister spam and ham. | 25459 | register/unregister spam and ham. |
| 25477 | 25460 | ||
| @@ -30030,7 +30013,7 @@ this: | |||
| 30030 | @subsection Score File Syntax | 30013 | @subsection Score File Syntax |
| 30031 | 30014 | ||
| 30032 | Score files are meant to be easily parseable, but yet extremely | 30015 | Score files are meant to be easily parseable, but yet extremely |
| 30033 | mallable. It was decided that something that had the same read syntax | 30016 | malleable. It was decided that something that had the same read syntax |
| 30034 | as an Emacs Lisp list would fit that spec. | 30017 | as an Emacs Lisp list would fit that spec. |
| 30035 | 30018 | ||
| 30036 | Here's a typical score file: | 30019 | Here's a typical score file: |
diff --git a/doc/misc/message.texi b/doc/misc/message.texi index 48d0028e452..4d828f69bbd 100644 --- a/doc/misc/message.texi +++ b/doc/misc/message.texi | |||
| @@ -2120,7 +2120,7 @@ follows this line--} by default. | |||
| 2120 | 2120 | ||
| 2121 | @item message-directory | 2121 | @item message-directory |
| 2122 | @vindex message-directory | 2122 | @vindex message-directory |
| 2123 | Directory used by many mailey things. The default is @file{~/Mail/}. | 2123 | Directory used by many mailish things. The default is @file{~/Mail/}. |
| 2124 | All other mail file variables are derived from @code{message-directory}. | 2124 | All other mail file variables are derived from @code{message-directory}. |
| 2125 | 2125 | ||
| 2126 | @item message-auto-save-directory | 2126 | @item message-auto-save-directory |
diff --git a/doc/misc/org.texi b/doc/misc/org.texi index cc925906c28..34a4ba4f8f3 100644 --- a/doc/misc/org.texi +++ b/doc/misc/org.texi | |||
| @@ -15533,7 +15533,7 @@ chapter about publishing. | |||
| 15533 | @i{Jambunathan K} contributed the OpenDocumentText exporter. | 15533 | @i{Jambunathan K} contributed the OpenDocumentText exporter. |
| 15534 | @item | 15534 | @item |
| 15535 | @i{Sebastien Vauban} reported many issues with LaTeX and BEAMER export and | 15535 | @i{Sebastien Vauban} reported many issues with LaTeX and BEAMER export and |
| 15536 | enabled source code highlighling in Gnus. | 15536 | enabled source code highlighting in Gnus. |
| 15537 | @item | 15537 | @item |
| 15538 | @i{Stefan Vollmar} organized a video-recorded talk at the | 15538 | @i{Stefan Vollmar} organized a video-recorded talk at the |
| 15539 | Max-Planck-Institute for Neurology. He also inspired the creation of a | 15539 | Max-Planck-Institute for Neurology. He also inspired the creation of a |
diff --git a/doc/misc/sem-user.texi b/doc/misc/sem-user.texi index 7a363523aa6..28d1cdb6eb8 100644 --- a/doc/misc/sem-user.texi +++ b/doc/misc/sem-user.texi | |||
| @@ -880,7 +880,7 @@ command, like this: | |||
| 880 | @end example | 880 | @end example |
| 881 | @end defun | 881 | @end defun |
| 882 | 882 | ||
| 883 | These commands are often more accurate than than the @code{find-tag} | 883 | These commands are often more accurate than the @code{find-tag} |
| 884 | command (@pxref{Tags,,,emacs,Emacs manual}), because the Semantic | 884 | command (@pxref{Tags,,,emacs,Emacs manual}), because the Semantic |
| 885 | Analyzer is context-sensitive. | 885 | Analyzer is context-sensitive. |
| 886 | 886 | ||
diff --git a/doc/misc/semantic.texi b/doc/misc/semantic.texi index ad6159feb1a..55b60937fb6 100644 --- a/doc/misc/semantic.texi +++ b/doc/misc/semantic.texi | |||
| @@ -421,7 +421,7 @@ local variables, and tag lists in scope for various reasons, such as | |||
| 421 | C++ using statements. | 421 | C++ using statements. |
| 422 | 422 | ||
| 423 | @item semanticdb-typecache.el | 423 | @item semanticdb-typecache.el |
| 424 | The typecache is part of @code{semanticdb}, but is used primarilly by | 424 | The typecache is part of @code{semanticdb}, but is used primarily by |
| 425 | the analyzer to look up datatypes and complex names. The typecache is | 425 | the analyzer to look up datatypes and complex names. The typecache is |
| 426 | bound across source files and builds a master lookup table for data | 426 | bound across source files and builds a master lookup table for data |
| 427 | type names. | 427 | type names. |
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 0accc6fac43..e6b0f4fa235 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi | |||
| @@ -3180,7 +3180,7 @@ names: | |||
| 3180 | '("^/xy" . "@trampfn{ssh, news, news.my.domain, /opt/news/etc/}")) | 3180 | '("^/xy" . "@trampfn{ssh, news, news.my.domain, /opt/news/etc/}")) |
| 3181 | @end lisp | 3181 | @end lisp |
| 3182 | 3182 | ||
| 3183 | This shortens the file openening command to @kbd{C-x C-f /xy | 3183 | This shortens the file opening command to @kbd{C-x C-f /xy |
| 3184 | @key{RET}}. The disadvantage is, again, that you cannot edit the file | 3184 | @key{RET}}. The disadvantage is, again, that you cannot edit the file |
| 3185 | name, because the expansion happens after entering the file name only. | 3185 | name, because the expansion happens after entering the file name only. |
| 3186 | 3186 | ||