1 \input texinfo @c -*-texinfo-*-
2 @comment %**start of header (This is for running Texinfo on a region.)
6 @settitle GNU Emacs Calc 2.1 Manual
7 @comment %**end of header (This is for running Texinfo on a region.)
13 % Some special kludges to make TeX formatting prettier.
14 % Because makeinfo.c exists, we can't just define new commands.
15 % So instead, we take over little-used existing commands.
17 % Redefine @cite{text} to act like $text$ in regular TeX.
18 % Info will typeset this same as @samp{text}.
19 \gdef\goodtex{\tex \let\rm\goodrm \let\t\ttfont \turnoffactive}
20 \gdef\goodrm{\fam0\tenrm}
21 \gdef\cite{\goodtex$\citexxx}
22 \gdef\citexxx#1{#1$\Etex}
23 \global\let\oldxrefX=\xrefX
24 \gdef\xrefX[#1]{\begingroup\let\cite=\dfn\oldxrefX[#1]\endgroup}
26 % Redefine @i{text} to be equivalent to @cite{text}, i.e., to use math mode.
27 % This looks the same in TeX but omits the surrounding ` ' in Info.
30 % Redefine @c{tex-stuff} \n @whatever{info-stuff}.
31 \gdef\c{\futurelet\next\mycxxx}
33 \ifx\next\bgroup \goodtex\let\next\mycxxy
34 \else\ifx\next\mindex \let\next\relax
35 \else\ifx\next\kindex \let\next\relax
36 \else\ifx\next\starindex \let\next\relax \else \let\next\comment
39 \gdef\mycxxy#1#2{#1\Etex\mycxxz}
43 @c Fix some things to make math mode work properly.
46 @font@teni=cmmi10 scaled @magstephalf @textfont1=@teni
47 @font@seveni=cmmi7 scaled @magstephalf @scriptfont1=@seveni
48 @font@fivei=cmmi5 scaled @magstephalf @scriptscriptfont1=@fivei
49 @font@tensy=cmsy10 scaled @magstephalf @textfont2=@tensy
50 @font@sevensy=cmsy7 scaled @magstephalf @scriptfont2=@sevensy
51 @font@fivesy=cmsy5 scaled @magstephalf @scriptscriptfont2=@fivesy
52 @font@tenex=cmex10 scaled @magstephalf @textfont3=@tenex
53 @scriptfont3=@tenex @scriptscriptfont3=@tenex
54 @textfont7=@tentt @scriptfont7=@tentt @scriptscriptfont7=@tentt
57 @c Fix some other things specifically for this manual.
60 @mathcode`@:=`@: @c Make Calc fractions come out right in math mode
61 @tocindent=.5pc @c Indent subsections in table of contents less
62 @rightskip=0pt plus 2pt @c Favor short lines rather than overfull hboxes
64 \gdef\coloneq{\mathrel{\mathord:\mathord=}}
66 \global\parskip=12pt % Standard parskip looks a bit too large
68 \gdef\internalBitem{\parskip=7pt\kyhpos=\tableindent\kyvpos=0pt
69 \smallbreak\parsearg\itemzzy}
70 \gdef\itemzzy#1{\itemzzz{#1}\relax\ifvmode\kern-7pt\fi}
71 \gdef\trademark{${}^{\rm TM}$}
73 \par\vskip8pt\begingroup
74 \def\Egroup{\egroup\endgroup}%
75 \let\aboveenvbreak=\relax % so that nothing gets between vtop and first box
76 \def\singlespace{\baselineskip=\singlespaceskip}%
80 %\global\abovedisplayskip=0pt
81 %\global\abovedisplayshortskip=-10pt
82 %\global\belowdisplayskip=7pt
83 %\global\belowdisplayshortskip=2pt
84 \gdef\beforedisplay{\vskip-10pt}
85 \gdef\afterdisplay{\vskip-5pt}
86 \gdef\beforedisplayh{\vskip-25pt}
87 \gdef\afterdisplayh{\vskip-10pt}
89 \gdef\printindex{\parsearg\calcprintindex}
90 \gdef\calcprintindex#1{%
93 \ifeof1{\let\s=\indexskip \csname indexsize#1\endcsname}\fi
96 \gdef\indexskip{(This page intentionally left blank)\vfill\eject}
97 \gdef\indexsizeky{\s\s\s\s\s\s\s\s}
98 \gdef\indexsizepg{\s\s\s\s\s\s}
99 \gdef\indexsizetp{\s\s\s\s\s\s}
100 \gdef\indexsizecp{\s\s\s\s}
102 \gdef\indexsizefn{\s\s}
103 \gdef\langle#1\rangle{\it XXX} % Avoid length mismatch with true expansion
105 % Ensure no indentation at beginning of sections, and avoid club paragraphs.
106 \global\let\calcchapternofonts=\chapternofonts
107 \gdef\chapternofonts{\aftergroup\calcfixclub\calcchapternofonts}
108 \gdef\calcfixclub{\calcclubpenalty=10000\noindent}
109 \global\let\calcdobreak=\dobreak
110 \gdef\dobreak{{\penalty-9999\dimen0=\pagetotal\advance\dimen0by1.5in
111 \ifdim\dimen0>\pagegoal\vfill\eject\fi}\calcdobreak}
113 \gdef\kindex{\def\indexname{ky}\futurelet\next\calcindexer}
114 \gdef\tindex{\def\indexname{tp}\futurelet\next\calcindexer}
115 \gdef\mindex{\let\indexname\relax\futurelet\next\calcindexer}
116 \gdef\calcindexer{\catcode`\ =\active\parsearg\calcindexerxx}
117 \gdef\calcindexerxx#1{%
119 \ifvmode \indent \fi \setbox0=\lastbox \advance\kyhpos\wd0 \fixoddpages \box0
120 \setbox0=\hbox{\ninett #1}%
121 \calcindexersh{\llap{\hbox to 4em{\bumpoddpages\lower\kyvpos\box0\hss}\hskip\kyhpos}}%
122 \global\let\calcindexersh=\calcindexershow
123 \advance\clubpenalty by 5000%
124 \ifx\indexname\relax \else
125 \singlecodeindexer{#1\indexstar}%
126 \global\def\indexstar{}%
128 \futurelet\next\calcindexerxxx
131 \gdef\bumpoddpages{\ifodd\calcpageno\hskip7.3in\fi}
132 %\gdef\bumpoddpages{\hskip7.3in} % for marginal notes on right side always
133 %\gdef\bumpoddpages{} % for marginal notes on left side always
135 \global\calcpageno=\pageno
137 \advance\dimen0 by2\baselineskip
138 \ifdim\dimen0>\pagegoal
139 \global\advance\calcpageno by 1
140 \vfill\eject\noindent
143 \gdef\calcindexershow#1{\smash{#1}\advance\kyvpos by 11pt}
144 \gdef\calcindexernoshow#1{}
145 \global\let\calcindexersh=\calcindexershow
146 \gdef\calcindexerxxx{%
148 \ifx\next\kindex \global\let\calcindexersh=\calcindexernoshow \fi
149 \ifx\next\tindex \global\let\calcindexersh=\calcindexernoshow \fi
153 \gdef\calcindexerxxxx#1{\next}
154 \gdef\indexstarxx{\thinspace{\rm *}}
155 \gdef\starindex{\global\let\indexstar=\indexstarxx}
157 \kyhpos=\leftskip\kyvpos=0pt\clubpenalty=\calcclubpenalty
158 \calcclubpenalty=1000\relax
160 \gdef\idots{{\indrm...}}
162 @newdimen@kyvpos @kyvpos=0pt
163 @newdimen@kyhpos @kyhpos=0pt
164 @newcount@calcclubpenalty @calcclubpenalty=1000
166 @newtoks@calcoldeverypar @calcoldeverypar=@everypar
167 @everypar={@calceverypar@the@calcoldeverypar}
168 @ifx@turnoffactive@undefinedzzz@def@turnoffactive{}@fi
169 @ifx@ninett@undefinedzzz@font@ninett=cmtt9@fi
170 @catcode`@\=0 \catcode`\@=11
172 \catcode`\@=0 @catcode`@\=@active
179 * Calc: (calc). Scientific, financial, and symbolic calculator
183 This file documents Calc, the GNU Emacs calculator.
185 Copyright (C) 1990, 1991 Free Software Foundation, Inc.
187 Permission is granted to make and distribute verbatim copies of this
188 manual provided the copyright notice and this permission notice are
189 preserved on all copies.
192 Permission is granted to process this file through TeX and print the
193 results, provided the printed document carries copying permission notice
194 identical to this one except for the removal of this paragraph (this
195 paragraph not being relevant to the printed manual).
198 Permission is granted to copy and distribute modified versions of this
199 manual under the conditions for verbatim copying, provided also that the
200 section entitled ``GNU General Public License'' is included exactly as
201 in the original, and provided that the entire resulting derived work is
202 distributed under the terms of a permission notice identical to this one.
204 Permission is granted to copy and distribute translations of this manual
205 into another language, under the above conditions for modified versions,
206 except that the section entitled ``GNU General Public License'' may be
207 included in a translation approved by the author instead of in the
213 @center @titlefont{Calc Manual}
215 @center GNU Emacs Calc Version 2.1
220 @center Dave Gillespie
223 @vskip 0pt plus 1filll
224 Copyright @copyright{} 1990, 1991 Free Software Foundation, Inc.
226 Permission is granted to make and distribute verbatim copies of
227 this manual provided the copyright notice and this permission notice
228 are preserved on all copies.
231 Permission is granted to process this file through TeX and print the
232 results, provided the printed document carries copying permission notice
233 identical to this one except for the removal of this paragraph (this
234 paragraph not being relevant to the printed manual).
237 Permission is granted to copy and distribute modified versions of this
238 manual under the conditions for verbatim copying, provided also that the
239 section entitled ``GNU General Public License'' is included exactly as
240 in the original, and provided that the entire resulting derived work is
241 distributed under the terms of a permission notice identical to this one.
243 Permission is granted to copy and distribute translations of this manual
244 into another language, under the above conditions for modified versions,
245 except that the section entitled ``GNU General Public License'' may be
246 included in a translation approved by the author instead of in the
252 @node Top, Copying,, (dir)
253 @chapter The GNU Emacs Calculator
256 @dfn{Calc} is an advanced desk calculator and mathematical tool
257 that runs as part of the GNU Emacs environment.
259 This manual is divided into three major parts: "Getting Started," the
260 "Calc Tutorial," and the "Calc Reference." The Tutorial introduces all
261 the major aspects of Calculator use in an easy, hands-on way. The
262 remainder of the manual is a complete reference to the features of the
265 For help in the Emacs Info system (which you are using to read this
266 file), type @kbd{?}. (You can also type @kbd{h} to run through a
267 longer Info tutorial.)
271 * Copying:: How you can copy and share Calc.
273 * Getting Started:: General description and overview.
275 * Interactive Tutorial:: Same as tutorial.
277 * Tutorial:: A step-by-step introduction for beginners.
279 * Introduction:: Introduction to the Calc reference manual.
280 * Data Types:: Types of objects manipulated by Calc.
281 * Stack and Trail:: Manipulating the stack and trail buffers.
282 * Mode Settings:: Adjusting display format and other modes.
283 * Arithmetic:: Basic arithmetic functions.
284 * Scientific Functions:: Transcendentals and other scientific functions.
285 * Matrix Functions:: Operations on vectors and matrices.
286 * Algebra:: Manipulating expressions algebraically.
287 * Units:: Operations on numbers with units.
288 * Store and Recall:: Storing and recalling variables.
289 * Graphics:: Commands for making graphs of data.
290 * Kill and Yank:: Moving data into and out of Calc.
291 * Embedded Mode:: Working with formulas embedded in a file.
292 * Programming:: Calc as a programmable calculator.
294 * Summary:: Summary of Calc commands and functions.
296 * Key Index:: The standard Calc key sequences.
297 * Command Index:: The interactive Calc commands.
298 * Function Index:: Functions (in algebraic formulas).
299 * Concept Index:: General concepts.
300 * Variable Index:: Variables used by Calc (both user and internal).
301 * Lisp Function Index:: Internal Lisp math functions.
304 @node Copying, Getting Started, Top, Top
305 @unnumbered GNU GENERAL PUBLIC LICENSE
308 @node Getting Started, Tutorial, Copying, Top
309 @chapter Getting Started
312 This chapter provides a general overview of Calc, the GNU Emacs
313 Calculator: What it is, how to start it and how to exit from it,
314 and what are the various ways that it can be used.
318 * About This Manual::
319 * Notations Used in This Manual::
321 * Demonstration of Calc::
322 * History and Acknowledgements::
325 @node What is Calc, About This Manual, Getting Started, Getting Started
326 @section What is Calc?
329 @dfn{Calc} is an advanced calculator and mathematical tool that runs as
330 part of the GNU Emacs environment. Very roughly based on the HP-28/48
331 series of calculators, its many features include:
335 Choice of algebraic or RPN (stack-based) entry of calculations.
338 Arbitrary precision integers and floating-point numbers.
341 Arithmetic on rational numbers, complex numbers (rectangular and polar),
342 error forms with standard deviations, open and closed intervals, vectors
343 and matrices, dates and times, infinities, sets, quantities with units,
344 and algebraic formulas.
347 Mathematical operations such as logarithms and trigonometric functions.
350 Programmer's features (bitwise operations, non-decimal numbers).
353 Financial functions such as future value and internal rate of return.
356 Number theoretical features such as prime factorization and arithmetic
357 modulo @i{M} for any @i{M}.
360 Algebraic manipulation features, including symbolic calculus.
363 Moving data to and from regular editing buffers.
366 ``Embedded mode'' for manipulating Calc formulas and data directly
367 inside any editing buffer.
370 Graphics using GNUPLOT, a versatile (and free) plotting program.
373 Easy programming using keyboard macros, algebraic formulas,
374 algebraic rewrite rules, or extended Emacs Lisp.
377 Calc tries to include a little something for everyone; as a result it is
378 large and might be intimidating to the first-time user. If you plan to
379 use Calc only as a traditional desk calculator, all you really need to
380 read is the ``Getting Started'' chapter of this manual and possibly the
381 first few sections of the tutorial. As you become more comfortable with
382 the program you can learn its additional features. In terms of efficiency,
383 scope and depth, Calc cannot replace a powerful tool like Mathematica.
384 @c Removed this per RMS' request:
385 @c Mathematica@c{\trademark} @asis{ (tm)}.
386 But Calc has the advantages of convenience, portability, and availability
387 of the source code. And, of course, it's free!
389 @node About This Manual, Notations Used in This Manual, What is Calc, Getting Started
390 @section About This Manual
393 This document serves as a complete description of the GNU Emacs
394 Calculator. It works both as an introduction for novices, and as
395 a reference for experienced users. While it helps to have some
396 experience with GNU Emacs in order to get the most out of Calc,
397 this manual ought to be readable even if you don't know or use Emacs
400 The manual is divided into three major parts:@: the ``Getting
401 Started'' chapter you are reading now, the Calc tutorial
402 and the Calc reference manual (the remaining chapters and appendices).
404 If you are in a hurry to use Calc, there is a brief ``demonstration''
405 below which illustrates the major features of Calc in just a couple of
406 pages. If you don't have time to go through the full tutorial, this
407 will show you everything you need to know to begin.
408 @xref{Demonstration of Calc}.
410 The tutorial chapter walks you through the various parts of Calc
411 with lots of hands-on examples and explanations. If you are new
412 to Calc and you have some time, try going through at least the
413 beginning of the tutorial. The tutorial includes about 70 exercises
414 with answers. These exercises give you some guided practice with
415 Calc, as well as pointing out some interesting and unusual ways
418 The reference section discusses Calc in complete depth. You can read
419 the reference from start to finish if you want to learn every aspect
420 of Calc. Or, you can look in the table of contents or the Concept
421 Index to find the parts of the manual that discuss the things you
424 @c [fix-ref Help Commands]
425 You can access this manual on-line at any time within Calc by
426 pressing the @kbd{h i} key sequence. Outside of the Calc window,
427 you can press @kbd{M-# i} to read the manual on-line. Also, you
428 can jump directly to the Tutorial by pressing @kbd{h t} or @kbd{M-# t},
429 or to the Summary by pressing @kbd{h s} or @kbd{M-# s}. Within Calc,
430 you can also go to the part of the manual describing any Calc key,
431 function, or variable using @w{@kbd{h k}}, @kbd{h f}, or @kbd{h v},
432 respectively. @xref{Help Commands}.
434 @c Printed copies of this manual are also available from the Free Software
437 @node Notations Used in This Manual, Demonstration of Calc, About This Manual, Getting Started
438 @section Notations Used in This Manual
441 This section describes the various notations that are used
442 throughout the Calc manual.
444 In keystroke sequences, uppercase letters mean you must hold down
445 the shift key while typing the letter. Keys pressed with Control
446 held down are shown as @kbd{C-x}. Keys pressed with Meta held down
447 are shown as @kbd{M-x}. Other notations are @key{RET} for the
448 Return key, @key{SPC} for the space bar, @key{TAB} for the Tab key,
449 @key{DEL} for the Delete key, and @key{LFD} for the Line-Feed key.
451 (If you don't have the @key{LFD} or @key{TAB} keys on your keyboard,
452 the @kbd{C-j} and @kbd{C-i} keys are equivalent to them, respectively.
453 If you don't have a Meta key, look for Alt or Extend Char. You can
454 also press @key{ESC} or @key{C-[} first to get the same effect, so
455 that @kbd{M-x}, @kbd{ESC x}, and @kbd{C-[ x} are all equivalent.)
457 Sometimes the @key{RET} key is not shown when it is ``obvious''
458 that you must press @kbd{RET} to proceed. For example, the @key{RET}
459 is usually omitted in key sequences like @kbd{M-x calc-keypad @key{RET}}.
461 Commands are generally shown like this: @kbd{p} (@code{calc-precision})
462 or @kbd{M-# k} (@code{calc-keypad}). This means that the command is
463 normally used by pressing the @kbd{p} key or @kbd{M-# k} key sequence,
464 but it also has the full-name equivalent shown, e.g., @kbd{M-x calc-precision}.
466 Commands that correspond to functions in algebraic notation
467 are written: @kbd{C} (@code{calc-cos}) [@code{cos}]. This means
468 the @kbd{C} key is equivalent to @kbd{M-x calc-cos}, and that
469 the corresponding function in an algebraic-style formula would
470 be @samp{cos(@var{x})}.
472 A few commands don't have key equivalents: @code{calc-sincos}
473 [@code{sincos}].@refill
475 @node Demonstration of Calc, Using Calc, Notations Used in This Manual, Getting Started
476 @section A Demonstration of Calc
479 @cindex Demonstration of Calc
480 This section will show some typical small problems being solved with
481 Calc. The focus is more on demonstration than explanation, but
482 everything you see here will be covered more thoroughly in the
485 To begin, start Emacs if necessary (usually the command @code{emacs}
486 does this), and type @kbd{M-# c} (or @kbd{ESC # c}) to start the
487 Calculator. (@xref{Starting Calc}, if this doesn't work for you.)
489 Be sure to type all the sample input exactly, especially noting the
490 difference between lower-case and upper-case letters. Remember,
491 @kbd{RET}, @kbd{TAB}, @kbd{DEL}, and @kbd{SPC} are the Return, Tab,
492 Delete, and Space keys.
494 @strong{RPN calculation.} In RPN, you type the input number(s) first,
495 then the command to operate on the numbers.
498 Type @kbd{2 RET 3 + Q} to compute @c{$\sqrt{2+3} = 2.2360679775$}
499 @asis{the square root of 2+3, which is 2.2360679775}.
502 Type @kbd{P 2 ^} to compute @c{$\pi^2 = 9.86960440109$}
503 @asis{the value of `pi' squared, 9.86960440109}.
506 Type @kbd{TAB} to exchange the order of these two results.
509 Type @kbd{- I H S} to subtract these results and compute the Inverse
510 Hyperbolic sine of the difference, 2.72996136574.
513 Type @kbd{DEL} to erase this result.
515 @strong{Algebraic calculation.} You can also enter calculations using
516 conventional ``algebraic'' notation. To enter an algebraic formula,
517 use the apostrophe key.
520 Type @kbd{' sqrt(2+3) RET} to compute @c{$\sqrt{2+3}$}
521 @asis{the square root of 2+3}.
524 Type @kbd{' pi^2 RET} to enter @c{$\pi^2$}
525 @asis{`pi' squared}. To evaluate this symbolic
526 formula as a number, type @kbd{=}.
529 Type @kbd{' arcsinh($ - $$) RET} to subtract the second-most-recent
530 result from the most-recent and compute the Inverse Hyperbolic sine.
532 @strong{Keypad mode.} If you are using the X window system, press
533 @w{@kbd{M-# k}} to get Keypad mode. (If you don't use X, skip to
537 Click on the @key{2}, @key{ENTER}, @key{3}, @key{+}, and @key{SQRT}
538 ``buttons'' using your left mouse button.
541 Click on @key{PI}, @key{2}, and @t{y^x}.
544 Click on @key{INV}, then @key{ENTER} to swap the two results.
547 Click on @key{-}, @key{INV}, @key{HYP}, and @key{SIN}.
550 Click on @key{<-} to erase the result, then click @key{OFF} to turn
551 the Keypad Calculator off.
553 @strong{Grabbing data.} Type @kbd{M-# x} if necessary to exit Calc.
554 Now select the following numbers as an Emacs region: ``Mark'' the
555 front of the list by typing control-@kbd{SPC} there,
556 then move to the other end of the list. (Either get this list from
557 the on-line copy of this manual, accessed by @w{@kbd{M-# i}}, or just
558 type these numbers into a scratch file.) Now type @kbd{M-# g} to
559 ``grab'' these numbers into Calc.
570 The result @samp{[1.23, 1.97, 1.6, 2, 1.19, 1.08]} is a Calc ``vector.''
571 Type @w{@kbd{V R +}} to compute the sum of these numbers.
574 Type @kbd{U} to Undo this command, then type @kbd{V R *} to compute
575 the product of the numbers.
578 You can also grab data as a rectangular matrix. Place the cursor on
579 the upper-leftmost @samp{1} and set the mark, then move to just after
580 the lower-right @samp{8} and press @kbd{M-# r}.
583 Type @kbd{v t} to transpose this @c{$3\times2$}
584 @asis{3x2} matrix into a @c{$2\times3$}
585 @asis{2x3} matrix. Type
586 @w{@kbd{v u}} to unpack the rows into two separate vectors. Now type
587 @w{@kbd{V R + TAB V R +}} to compute the sums of the two original columns.
588 (There is also a special grab-and-sum-columns command, @kbd{M-# :}.)
590 @strong{Units conversion.} Units are entered algebraically.
591 Type @w{@kbd{' 43 mi/hr RET}} to enter the quantity 43 miles-per-hour.
592 Type @w{@kbd{u c km/hr RET}}. Type @w{@kbd{u c m/s RET}}.
594 @strong{Date arithmetic.} Type @kbd{t N} to get the current date and
595 time. Type @kbd{90 +} to find the date 90 days from now. Type
596 @kbd{' <25 dec 87> RET} to enter a date, then @kbd{- 7 /} to see how
597 many weeks have passed since then.
599 @strong{Algebra.} Algebraic entries can also include formulas
600 or equations involving variables. Type @kbd{' [x + y = a, x y = 1] RET}
601 to enter a pair of equations involving three variables.
602 (Note the leading apostrophe in this example; also, note that the space
603 between @samp{x y} is required.) Type @w{@kbd{a S x,y RET}} to solve
604 these equations for the variables @cite{x} and @cite{y}.@refill
607 Type @kbd{d B} to view the solutions in more readable notation.
608 Type @w{@kbd{d C}} to view them in C language notation, @kbd{d T}
609 to view them in the notation for the @TeX{} typesetting system, and
610 @kbd{d L} to view them in @LaTeX{} notation.
611 Type @kbd{d N} to return to the normal Calc notation.
614 Type @kbd{7.5}, then @kbd{s l a RET} to let @cite{a = 7.5} in these formulas.
615 (That's a letter @kbd{l}, not a numeral @kbd{1}.)
618 @strong{Help functions.} You can read about any command in the on-line
619 manual. Type @kbd{M-# c} to return to Calc after each of these
620 commands: @kbd{h k t N} to read about the @kbd{t N} command,
621 @kbd{h f sqrt RET} to read about the @code{sqrt} function, and
622 @kbd{h s} to read the Calc summary.
625 @strong{Help functions.} You can read about any command in the on-line
626 manual. Remember to type the letter @kbd{l} (once or twice), then @kbd{M-# c}, to
627 return here after each of these commands: @w{@kbd{h k t N}} to read
628 about the @w{@kbd{t N}} command, @kbd{h f sqrt RET} to read about the
629 @code{sqrt} function, and @kbd{h s} to read the Calc summary.
632 Press @kbd{DEL} repeatedly to remove any leftover results from the stack.
633 To exit from Calc, press @kbd{q} or @kbd{M-# c} again.
635 @node Using Calc, History and Acknowledgements, Demonstration of Calc, Getting Started
639 Calc has several user interfaces that are specialized for
640 different kinds of tasks. As well as Calc's standard interface,
641 there are Quick Mode, Keypad Mode, and Embedded Mode.
645 * The Standard Interface::
646 * Quick Mode Overview::
647 * Keypad Mode Overview::
648 * Standalone Operation::
649 * Embedded Mode Overview::
650 * Other M-# Commands::
653 @node Starting Calc, The Standard Interface, Using Calc, Using Calc
654 @subsection Starting Calc
657 On most systems, you can type @kbd{M-#} to start the Calculator.
658 The notation @kbd{M-#} is short for Meta-@kbd{#}. On most
659 keyboards this means holding down the Meta (or Alt) and
660 Shift keys while typing @kbd{3}.
663 Once again, if you don't have a Meta key on your keyboard you can type
664 @key{ESC} first, then @kbd{#}, to accomplish the same thing. If you
665 don't even have an @key{ESC} key, you can fake it by holding down
666 Control or @key{CTRL} while typing a left square bracket
667 (that's @kbd{C-[} in Emacs notation).@refill
669 @kbd{M-#} is a @dfn{prefix key}; when you press it, Emacs waits for
670 you to press a second key to complete the command. In this case,
671 you will follow @kbd{M-#} with a letter (upper- or lower-case, it
672 doesn't matter for @kbd{M-#}) that says which Calc interface you
675 You can change the prefix key used for starting Calc by putting
677 (global-set-key "PREFIXKEY" 'calc-dispatch)
679 in your .emacs file. This manual will assume that you are using
680 the default prefix @kbd{M-#}; if you change the prefix, use your
681 new prefix whenever you see @kbd{M-#}.
683 To get Calc's standard interface, type @kbd{M-# c}. To get
684 Keypad Mode, type @kbd{M-# k}. Type @kbd{M-# ?} to get a brief
685 list of the available options, and type a second @kbd{?} to get
688 To ease typing, @kbd{M-# M-#} (or @kbd{M-# #} if that's easier)
689 also works to start Calc. (You can also type your prefix key
690 followed by one of @kbd{=}, @kbd{&}, @kbd{\}, @kbd{/}, @kbd{+},
691 @kbd{-} or @kbd{*}, to make it more convenient if you have changed
694 It starts the same interface (either
695 @kbd{M-# c} or @w{@kbd{M-# k}}) that you last used, selecting the
696 @kbd{M-# c} interface by default. (If your installation has
697 a special function key set up to act like @kbd{M-#}, hitting that
698 function key twice is just like hitting @kbd{M-# M-#}.)
700 By default, @kbd{M-#} is bound to the command @code{calc-dispatch}.
701 If you decide to bind another key or key-sequence to
702 @code{calc-dispatch}, then typing that key followed by your choice
703 of @kbd{#}, @kbd{&}, @kbd{\}, @kbd{=}, @kbd{*},
704 @kbd{/}, @kbd{+} or @kbd{-} will act like @kbd{M-# M-#}.
706 If @kbd{M-#} doesn't work for you, you can always type explicit
707 commands like @kbd{M-x calc} (for the standard user interface) or
708 @w{@kbd{M-x calc-keypad}} (for Keypad Mode). First type @kbd{M-x}
709 (that's Meta with the letter @kbd{x}), then, at the prompt,
710 type the full command (like @kbd{calc-keypad}) and press Return.
712 If you type @kbd{M-x calc} and Emacs still doesn't recognize the
713 command (it will say @samp{[No match]} when you try to press
714 @key{RET}), then Calc has not been properly installed.
716 The same commands (like @kbd{M-# c} or @kbd{M-# M-#}) that start
717 the Calculator also turn it off if it is already on.
719 @node The Standard Interface, Quick Mode Overview, Starting Calc, Using Calc
720 @subsection The Standard Calc Interface
723 @cindex Standard user interface
724 Calc's standard interface acts like a traditional RPN calculator,
725 operated by the normal Emacs keyboard. When you type @kbd{M-# c}
726 to start the Calculator, the Emacs screen splits into two windows
727 with the file you were editing on top and Calc on the bottom.
736 --**-Emacs: myfile (Fundamental)----All----------------------
737 --- Emacs Calculator Mode --- |Emacs Calculator Trail
745 --%%-Calc: 12 Deg (Calculator)----All----- --%%-Emacs: *Calc Trail*
749 In this figure, the mode-line for @file{myfile} has moved up and the
750 ``Calculator'' window has appeared below it. As you can see, Calc
751 actually makes two windows side-by-side. The lefthand one is
752 called the @dfn{stack window} and the righthand one is called the
753 @dfn{trail window.} The stack holds the numbers involved in the
754 calculation you are currently performing. The trail holds a complete
755 record of all calculations you have done. In a desk calculator with
756 a printer, the trail corresponds to the paper tape that records what
759 In this case, the trail shows that four numbers (17.3, 3, 2, and 4)
760 were first entered into the Calculator, then the 2 and 4 were
761 multiplied to get 8, then the 3 and 8 were subtracted to get @i{-5}.
762 (The @samp{>} symbol shows that this was the most recent calculation.)
763 The net result is the two numbers 17.3 and @i{-5} sitting on the stack.
765 Most Calculator commands deal explicitly with the stack only, but
766 there is a set of commands that allow you to search back through
767 the trail and retrieve any previous result.
769 Calc commands use the digits, letters, and punctuation keys.
770 Shifted (i.e., upper-case) letters are different from lowercase
771 letters. Some letters are @dfn{prefix} keys that begin two-letter
772 commands. For example, @kbd{e} means ``enter exponent'' and shifted
773 @kbd{E} means @cite{e^x}. With the @kbd{d} (``display modes'') prefix
774 the letter ``e'' takes on very different meanings: @kbd{d e} means
775 ``engineering notation'' and @kbd{d E} means ``@dfn{eqn} language mode.''
777 There is nothing stopping you from switching out of the Calc
778 window and back into your editing window, say by using the Emacs
779 @w{@kbd{C-x o}} (@code{other-window}) command. When the cursor is
780 inside a regular window, Emacs acts just like normal. When the
781 cursor is in the Calc stack or trail windows, keys are interpreted
784 When you quit by pressing @kbd{M-# c} a second time, the Calculator
785 windows go away but the actual Stack and Trail are not gone, just
786 hidden. When you press @kbd{M-# c} once again you will get the
787 same stack and trail contents you had when you last used the
790 The Calculator does not remember its state between Emacs sessions.
791 Thus if you quit Emacs and start it again, @kbd{M-# c} will give you
792 a fresh stack and trail. There is a command (@kbd{m m}) that lets
793 you save your favorite mode settings between sessions, though.
794 One of the things it saves is which user interface (standard or
795 Keypad) you last used; otherwise, a freshly started Emacs will
796 always treat @kbd{M-# M-#} the same as @kbd{M-# c}.
798 The @kbd{q} key is another equivalent way to turn the Calculator off.
800 If you type @kbd{M-# b} first and then @kbd{M-# c}, you get a
801 full-screen version of Calc (@code{full-calc}) in which the stack and
802 trail windows are still side-by-side but are now as tall as the whole
803 Emacs screen. When you press @kbd{q} or @kbd{M-# c} again to quit,
804 the file you were editing before reappears. The @kbd{M-# b} key
805 switches back and forth between ``big'' full-screen mode and the
806 normal partial-screen mode.
808 Finally, @kbd{M-# o} (@code{calc-other-window}) is like @kbd{M-# c}
809 except that the Calc window is not selected. The buffer you were
810 editing before remains selected instead. @kbd{M-# o} is a handy
811 way to switch out of Calc momentarily to edit your file; type
812 @kbd{M-# c} to switch back into Calc when you are done.
814 @node Quick Mode Overview, Keypad Mode Overview, The Standard Interface, Using Calc
815 @subsection Quick Mode (Overview)
818 @dfn{Quick Mode} is a quick way to use Calc when you don't need the
819 full complexity of the stack and trail. To use it, type @kbd{M-# q}
820 (@code{quick-calc}) in any regular editing buffer.
822 Quick Mode is very simple: It prompts you to type any formula in
823 standard algebraic notation (like @samp{4 - 2/3}) and then displays
824 the result at the bottom of the Emacs screen (@i{3.33333333333}
825 in this case). You are then back in the same editing buffer you
826 were in before, ready to continue editing or to type @kbd{M-# q}
827 again to do another quick calculation. The result of the calculation
828 will also be in the Emacs ``kill ring'' so that a @kbd{C-y} command
829 at this point will yank the result into your editing buffer.
831 Calc mode settings affect Quick Mode, too, though you will have to
832 go into regular Calc (with @kbd{M-# c}) to change the mode settings.
834 @c [fix-ref Quick Calculator mode]
835 @xref{Quick Calculator}, for further information.
837 @node Keypad Mode Overview, Standalone Operation, Quick Mode Overview, Using Calc
838 @subsection Keypad Mode (Overview)
841 @dfn{Keypad Mode} is a mouse-based interface to the Calculator.
842 It is designed for use with the X window system. If you don't
843 have X, you will have to operate keypad mode with your arrow
844 keys (which is probably more trouble than it's worth).
846 Type @kbd{M-# k} to turn Keypad Mode on or off. Once again you
847 get two new windows, this time on the righthand side of the screen
848 instead of at the bottom. The upper window is the familiar Calc
849 Stack; the lower window is a picture of a typical calculator keypad.
853 \advance \dimen0 by 24\baselineskip%
854 \ifdim \dimen0>\pagegoal \vfill\eject \fi%
858 |--- Emacs Calculator Mode ---
862 |--%%-Calc: 12 Deg (Calcul
863 |----+-----Calc 2.00-----+----1
864 |FLR |CEIL|RND |TRNC|CLN2|FLT |
865 |----+----+----+----+----+----|
866 | LN |EXP | |ABS |IDIV|MOD |
867 |----+----+----+----+----+----|
868 |SIN |COS |TAN |SQRT|y^x |1/x |
869 |----+----+----+----+----+----|
870 | ENTER |+/- |EEX |UNDO| <- |
871 |-----+---+-+--+--+-+---++----|
872 | INV | 7 | 8 | 9 | / |
873 |-----+-----+-----+-----+-----|
874 | HYP | 4 | 5 | 6 | * |
875 |-----+-----+-----+-----+-----|
876 |EXEC | 1 | 2 | 3 | - |
877 |-----+-----+-----+-----+-----|
878 | OFF | 0 | . | PI | + |
879 |-----+-----+-----+-----+-----+
888 @advance@hsize-3.05in
893 Keypad Mode is much easier for beginners to learn, because there
894 is no need to memorize lots of obscure key sequences. But not all
895 commands in regular Calc are available on the Keypad. You can
896 always switch the cursor into the Calc stack window to use
897 standard Calc commands if you need. Serious Calc users, though,
898 often find they prefer the standard interface over Keypad Mode.
900 To operate the Calculator, just click on the ``buttons'' of the
901 keypad using your left mouse button. To enter the two numbers
902 shown here you would click @w{@kbd{1 7 .@: 3 ENTER 5 +/- ENTER}}; to
903 add them together you would then click @kbd{+} (to get 12.3 on
906 If you click the right mouse button, the top three rows of the
907 keypad change to show other sets of commands, such as advanced
908 math functions, vector operations, and operations on binary
914 Because Keypad Mode doesn't use the regular keyboard, Calc leaves
915 the cursor in your original editing buffer. You can type in
916 this buffer in the usual way while also clicking on the Calculator
917 keypad. One advantage of Keypad Mode is that you don't need an
918 explicit command to switch between editing and calculating.
920 If you press @kbd{M-# b} first, you get a full-screen Keypad Mode
921 (@code{full-calc-keypad}) with three windows: The keypad in the lower
922 left, the stack in the lower right, and the trail on top.
924 @c [fix-ref Keypad Mode]
925 @xref{Keypad Mode}, for further information.
927 @node Standalone Operation, Embedded Mode Overview, Keypad Mode Overview, Using Calc
928 @subsection Standalone Operation
931 @cindex Standalone Operation
932 If you are not in Emacs at the moment but you wish to use Calc,
933 you must start Emacs first. If all you want is to run Calc, you
934 can give the commands:
944 emacs -f full-calc-keypad
948 which run a full-screen Calculator (as if by @kbd{M-# b M-# c}) or
949 a full-screen X-based Calculator (as if by @kbd{M-# b M-# k}).
950 In standalone operation, quitting the Calculator (by pressing
951 @kbd{q} or clicking on the keypad @key{EXIT} button) quits Emacs
954 @node Embedded Mode Overview, Other M-# Commands, Standalone Operation, Using Calc
955 @subsection Embedded Mode (Overview)
958 @dfn{Embedded Mode} is a way to use Calc directly from inside an
959 editing buffer. Suppose you have a formula written as part of a
973 and you wish to have Calc compute and format the derivative for
974 you and store this derivative in the buffer automatically. To
975 do this with Embedded Mode, first copy the formula down to where
976 you want the result to be:
990 Now, move the cursor onto this new formula and press @kbd{M-# e}.
991 Calc will read the formula (using the surrounding blank lines to
992 tell how much text to read), then push this formula (invisibly)
993 onto the Calc stack. The cursor will stay on the formula in the
994 editing buffer, but the buffer's mode line will change to look
995 like the Calc mode line (with mode indicators like @samp{12 Deg}
996 and so on). Even though you are still in your editing buffer,
997 the keyboard now acts like the Calc keyboard, and any new result
998 you get is copied from the stack back into the buffer. To take
999 the derivative, you would type @kbd{a d x @key{RET}}.
1013 To make this look nicer, you might want to press @kbd{d =} to center
1014 the formula, and even @kbd{d B} to use ``big'' display mode.
1023 % [calc-mode: justify: center]
1024 % [calc-mode: language: big]
1032 Calc has added annotations to the file to help it remember the modes
1033 that were used for this formula. They are formatted like comments
1034 in the @TeX{} typesetting language, just in case you are using @TeX{}
1035 or @LaTeX{}. (In this example @TeX{} is not being used, so you might
1036 want to move these comments up to the top of the file or otherwise put
1037 them out of the way.)
1039 As an extra flourish, we can add an equation number using a
1040 righthand label: Type @kbd{d @} (1) RET}.
1044 % [calc-mode: justify: center]
1045 % [calc-mode: language: big]
1046 % [calc-mode: right-label: " (1)"]
1054 To leave Embedded Mode, type @kbd{M-# e} again. The mode line
1055 and keyboard will revert to the way they were before. (If you have
1056 actually been trying this as you read along, you'll want to press
1057 @kbd{M-# 0} [with the digit zero] now to reset the modes you changed.)
1059 The related command @kbd{M-# w} operates on a single word, which
1060 generally means a single number, inside text. It uses any
1061 non-numeric characters rather than blank lines to delimit the
1062 formula it reads. Here's an example of its use:
1065 A slope of one-third corresponds to an angle of 1 degrees.
1068 Place the cursor on the @samp{1}, then type @kbd{M-# w} to enable
1069 Embedded Mode on that number. Now type @kbd{3 /} (to get one-third),
1070 and @kbd{I T} (the Inverse Tangent converts a slope into an angle),
1071 then @w{@kbd{M-# w}} again to exit Embedded mode.
1074 A slope of one-third corresponds to an angle of 18.4349488229 degrees.
1077 @c [fix-ref Embedded Mode]
1078 @xref{Embedded Mode}, for full details.
1080 @node Other M-# Commands, , Embedded Mode Overview, Using Calc
1081 @subsection Other @kbd{M-#} Commands
1084 Two more Calc-related commands are @kbd{M-# g} and @kbd{M-# r},
1085 which ``grab'' data from a selected region of a buffer into the
1086 Calculator. The region is defined in the usual Emacs way, by
1087 a ``mark'' placed at one end of the region, and the Emacs
1088 cursor or ``point'' placed at the other.
1090 The @kbd{M-# g} command reads the region in the usual left-to-right,
1091 top-to-bottom order. The result is packaged into a Calc vector
1092 of numbers and placed on the stack. Calc (in its standard
1093 user interface) is then started. Type @kbd{v u} if you want
1094 to unpack this vector into separate numbers on the stack. Also,
1095 @kbd{C-u M-# g} interprets the region as a single number or
1098 The @kbd{M-# r} command reads a rectangle, with the point and
1099 mark defining opposite corners of the rectangle. The result
1100 is a matrix of numbers on the Calculator stack.
1102 Complementary to these is @kbd{M-# y}, which ``yanks'' the
1103 value at the top of the Calc stack back into an editing buffer.
1104 If you type @w{@kbd{M-# y}} while in such a buffer, the value is
1105 yanked at the current position. If you type @kbd{M-# y} while
1106 in the Calc buffer, Calc makes an educated guess as to which
1107 editing buffer you want to use. The Calc window does not have
1108 to be visible in order to use this command, as long as there
1109 is something on the Calc stack.
1111 Here, for reference, is the complete list of @kbd{M-#} commands.
1112 The shift, control, and meta keys are ignored for the keystroke
1113 following @kbd{M-#}.
1116 Commands for turning Calc on and off:
1120 Turn Calc on or off, employing the same user interface as last time.
1123 Turn Calc on or off using its standard bottom-of-the-screen
1124 interface. If Calc is already turned on but the cursor is not
1125 in the Calc window, move the cursor into the window.
1128 Same as @kbd{C}, but don't select the new Calc window. If
1129 Calc is already turned on and the cursor is in the Calc window,
1130 move it out of that window.
1133 Control whether @kbd{M-# c} and @kbd{M-# k} use the full screen.
1136 Use Quick Mode for a single short calculation.
1139 Turn Calc Keypad mode on or off.
1142 Turn Calc Embedded mode on or off at the current formula.
1145 Turn Calc Embedded mode on or off, select the interesting part.
1148 Turn Calc Embedded mode on or off at the current word (number).
1151 Turn Calc on in a user-defined way, as defined by a @kbd{Z I} command.
1154 Quit Calc; turn off standard, Keypad, or Embedded mode if on.
1155 (This is like @kbd{q} or @key{OFF} inside of Calc.)
1163 Commands for moving data into and out of the Calculator:
1167 Grab the region into the Calculator as a vector.
1170 Grab the rectangular region into the Calculator as a matrix.
1173 Grab the rectangular region and compute the sums of its columns.
1176 Grab the rectangular region and compute the sums of its rows.
1179 Yank a value from the Calculator into the current editing buffer.
1188 Commands for use with Embedded Mode:
1192 ``Activate'' the current buffer. Locate all formulas that
1193 contain @samp{:=} or @samp{=>} symbols and record their locations
1194 so that they can be updated automatically as variables are changed.
1197 Duplicate the current formula immediately below and select
1201 Insert a new formula at the current point.
1204 Move the cursor to the next active formula in the buffer.
1207 Move the cursor to the previous active formula in the buffer.
1210 Update (i.e., as if by the @kbd{=} key) the formula at the current point.
1213 Edit (as if by @code{calc-edit}) the formula at the current point.
1222 Miscellaneous commands:
1226 Run the Emacs Info system to read the Calc manual.
1227 (This is the same as @kbd{h i} inside of Calc.)
1230 Run the Emacs Info system to read the Calc Tutorial.
1233 Run the Emacs Info system to read the Calc Summary.
1236 Load Calc entirely into memory. (Normally the various parts
1237 are loaded only as they are needed.)
1240 Read a region of written keystroke names (like @samp{C-n a b c RET})
1241 and record them as the current keyboard macro.
1244 (This is the ``zero'' digit key.) Reset the Calculator to
1245 its default state: Empty stack, and default mode settings.
1246 With any prefix argument, reset everything but the stack.
1250 @node History and Acknowledgements, , Using Calc, Getting Started
1251 @section History and Acknowledgements
1254 Calc was originally started as a two-week project to occupy a lull
1255 in the author's schedule. Basically, a friend asked if I remembered
1256 the value of @c{$2^{32}$}
1257 @cite{2^32}. I didn't offhand, but I said, ``that's
1258 easy, just call up an @code{xcalc}.'' @code{Xcalc} duly reported
1259 that the answer to our question was @samp{4.294967e+09}---with no way to
1260 see the full ten digits even though we knew they were there in the
1261 program's memory! I was so annoyed, I vowed to write a calculator
1262 of my own, once and for all.
1264 I chose Emacs Lisp, a) because I had always been curious about it
1265 and b) because, being only a text editor extension language after
1266 all, Emacs Lisp would surely reach its limits long before the project
1267 got too far out of hand.
1269 To make a long story short, Emacs Lisp turned out to be a distressingly
1270 solid implementation of Lisp, and the humble task of calculating
1271 turned out to be more open-ended than one might have expected.
1273 Emacs Lisp doesn't have built-in floating point
1274 math@footnote{This has changed; all modern Emacsen now have floating
1275 point support as well as support for larger integers.
1276 In addition, SXEmacs has support for many different number types.},
1278 simulated in software. In fact, Emacs integers will only comfortably
1279 fit six decimal digits or so---not enough for a decent calculator. So
1280 I had to write my own high-precision integer code as well, and once I had
1281 this I figured that arbitrary-size integers were just as easy as large
1282 integers. Arbitrary floating-point precision was the logical next step.
1283 Also, since the large integer arithmetic was there anyway it seemed only
1284 fair to give the user direct access to it, which in turn made it practical
1285 to support fractions as well as floats. All these features inspired me
1286 to look around for other data types that might be worth having.
1288 Around this time, my friend Rick Koshi showed me his nifty new HP-28
1289 calculator. It allowed the user to manipulate formulas as well as
1290 numerical quantities, and it could also operate on matrices. I decided
1291 that these would be good for Calc to have, too. And once things had
1292 gone this far, I figured I might as well take a look at serious algebra
1293 systems like Mathematica, Macsyma, and Maple for further ideas. Since
1294 these systems did far more than I could ever hope to implement, I decided
1295 to focus on rewrite rules and other programming features so that users
1296 could implement what they needed for themselves.
1298 Rick complained that matrices were hard to read, so I put in code to
1299 format them in a 2D style. Once these routines were in place, Big mode
1300 was obligatory. Gee, what other language modes would be useful?
1302 Scott Hemphill and Allen Knutson, two friends with a strong mathematical
1303 bent, contributed ideas and algorithms for a number of Calc features
1304 including modulo forms, primality testing, and float-to-fraction conversion.
1306 Units were added at the eager insistence of Mass Sivilotti. Later,
1307 Ulrich Mueller at CERN and Przemek Klosowski at NIST provided invaluable
1308 expert assistance with the units table. As far as I can remember, the
1309 idea of using algebraic formulas and variables to represent units dates
1310 back to an ancient article in Byte magazine about muMath, an early
1311 algebra system for microcomputers.
1313 Many people have contributed to Calc by reporting bugs and suggesting
1314 features, large and small. A few deserve special mention: Tim Peters,
1315 who helped develop the ideas that led to the selection commands, rewrite
1316 rules, and many other algebra features; @c{Fran\c cois}
1317 @asis{Francois} Pinard, who contributed
1318 an early prototype of the Calc Summary appendix as well as providing
1319 valuable suggestions in many other areas of Calc; Carl Witty, whose eagle
1320 eyes discovered many typographical and factual errors in the Calc manual;
1321 Tim Kay, who drove the development of Embedded mode; Ove Ewerlid, who
1322 made many suggestions relating to the algebra commands and contributed
1323 some code for polynomial operations; Randal Schwartz, who suggested the
1324 @code{calc-eval} function; Robert J. Chassell, who suggested the Calc
1325 Tutorial and exercises; and Juha Sarlin, who first worked out how to split
1326 Calc into quickly-loading parts. Bob Weiner helped immensely with the
1329 @cindex Bibliography
1330 @cindex Knuth, Art of Computer Programming
1331 @cindex Numerical Recipes
1332 @c Should these be expanded into more complete references?
1333 Among the books used in the development of Calc were Knuth's @emph{Art
1334 of Computer Programming} (especially volume II, @emph{Seminumerical
1335 Algorithms}); @emph{Numerical Recipes} by Press, Flannery, Teukolsky,
1336 and Vetterling; Bevington's @emph{Data Reduction and Error Analysis for
1337 the Physical Sciences}; @emph{Concrete Mathematics} by Graham, Knuth,
1338 and Patashnik; Steele's @emph{Common Lisp, the Language}; the @emph{CRC
1339 Standard Math Tables} (William H. Beyer, ed.); and Abramowitz and
1340 Stegun's venerable @emph{Handbook of Mathematical Functions}. I
1341 consulted the user's manuals for the HP-28 and HP-48 calculators, as
1342 well as for the programs Mathematica, SMP, Macsyma, Maple, MathCAD,
1343 Gnuplot, and others. Also, of course, Calc could not have been written
1344 without the excellent @emph{GNU Emacs Lisp Reference Manual}, by Bil
1345 Lewis and Dan LaLiberte.
1347 Final thanks go to Richard Stallman, without whose fine implementations
1348 of the Emacs editor, language, and environment, Calc would have been
1349 finished in two weeks.
1354 @c This node is accessed by the `M-# t' command.
1355 @node Interactive Tutorial, , , Top
1359 Some brief instructions on using the Emacs Info system for this tutorial:
1361 Press the space bar and Delete keys to go forward and backward in a
1362 section by screenfuls (or use the regular Emacs scrolling commands
1365 Press @kbd{n} or @kbd{p} to go to the Next or Previous section.
1366 If the section has a @dfn{menu}, press a digit key like @kbd{1}
1367 or @kbd{2} to go to a sub-section from the menu. Press @kbd{u} to
1368 go back up from a sub-section to the menu it is part of.
1370 Exercises in the tutorial all have cross-references to the
1371 appropriate page of the ``answers'' section. Press @kbd{f}, then
1372 the exercise number, to see the answer to an exercise. After
1373 you have followed a cross-reference, you can press the letter
1374 @kbd{l} to return to where you were before.
1376 You can press @kbd{?} at any time for a brief summary of Info commands.
1378 Press @kbd{1} now to enter the first section of the Tutorial.
1385 @node Tutorial, Introduction, Getting Started, Top
1389 This chapter explains how to use Calc and its many features, in
1390 a step-by-step, tutorial way. You are encouraged to run Calc and
1391 work along with the examples as you read (@pxref{Starting Calc}).
1392 If you are already familiar with advanced calculators, you may wish
1394 to skip on to the rest of this manual.
1396 @c to skip on to volume II of this manual, the @dfn{Calc Reference}.
1398 @c [fix-ref Embedded Mode]
1399 This tutorial describes the standard user interface of Calc only.
1400 The ``Quick Mode'' and ``Keypad Mode'' interfaces are fairly