| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
\newcount\columnsperpage |
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
\columnsperpage=3 |
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 |
|
|---|
| 32 |
|
|---|
| 33 |
|
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| 36 |
|
|---|
| 37 |
|
|---|
| 38 |
|
|---|
| 39 |
|
|---|
| 40 |
|
|---|
| 41 |
|
|---|
| 42 |
|
|---|
| 43 |
|
|---|
| 44 |
|
|---|
| 45 |
|
|---|
| 46 |
|
|---|
| 47 |
|
|---|
| 48 |
|
|---|
| 49 |
|
|---|
| 50 |
|
|---|
| 51 |
|
|---|
| 52 |
|
|---|
| 53 |
|
|---|
| 54 |
|
|---|
| 55 |
|
|---|
| 56 |
|
|---|
| 57 |
|
|---|
| 58 |
|
|---|
| 59 |
|
|---|
| 60 |
|
|---|
| 61 |
|
|---|
| 62 |
\def\versionnumber{2.1} |
|---|
| 63 |
\def\year{2008} |
|---|
| 64 |
\def\version{v\versionnumber} |
|---|
| 65 |
|
|---|
| 66 |
\def\shortcopyrightnotice{\vskip 1ex plus 2 fill |
|---|
| 67 |
\centerline{\small \copyright\ \year\ Free Software Foundation, Inc. |
|---|
| 68 |
Permissions on back. v\versionnumber}} |
|---|
| 69 |
|
|---|
| 70 |
\def\copyrightnotice{ |
|---|
| 71 |
\vskip 1ex plus 2 fill\begingroup\small |
|---|
| 72 |
\centerline{Copyright \copyright\ \year\ Free Software Foundation, Inc.} |
|---|
| 73 |
\centerline{designed by Dave Gillespie and Stephen Gildea, \version} |
|---|
| 74 |
\centerline{for GNU Emacs Calc version \versionnumber} |
|---|
| 75 |
|
|---|
| 76 |
Permission is granted to make and distribute copies of |
|---|
| 77 |
this card provided the copyright notice and this permission notice |
|---|
| 78 |
are preserved on all copies. |
|---|
| 79 |
|
|---|
| 80 |
For copies of the GNU Emacs Calc manual, write to the Free Software |
|---|
| 81 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|---|
| 82 |
MA 02110-1301, USA. |
|---|
| 83 |
|
|---|
| 84 |
\endgroup} |
|---|
| 85 |
|
|---|
| 86 |
|
|---|
| 87 |
|
|---|
| 88 |
\def\bye{\par\vfill\supereject\end} |
|---|
| 89 |
|
|---|
| 90 |
\newdimen\intercolumnskip |
|---|
| 91 |
\newbox\columna |
|---|
| 92 |
\newbox\columnb |
|---|
| 93 |
|
|---|
| 94 |
\def\ncolumns{\the\columnsperpage} |
|---|
| 95 |
|
|---|
| 96 |
\message{[\ncolumns\space |
|---|
| 97 |
column\if 1\ncolumns\else s\fi\space per page]} |
|---|
| 98 |
|
|---|
| 99 |
\def\scaledmag#1{ scaled \magstep #1} |
|---|
| 100 |
|
|---|
| 101 |
|
|---|
| 102 |
|
|---|
| 103 |
\if 1\ncolumns |
|---|
| 104 |
\hsize 4in |
|---|
| 105 |
\vsize 10in |
|---|
| 106 |
\voffset -.7in |
|---|
| 107 |
\font\titlefont=\fontname\tenbf \scaledmag3 |
|---|
| 108 |
\font\headingfont=\fontname\tenbf \scaledmag2 |
|---|
| 109 |
\font\smallfont=\fontname\sevenrm |
|---|
| 110 |
\font\smallsy=\fontname\sevensy |
|---|
| 111 |
|
|---|
| 112 |
\footline{\hss\folio} |
|---|
| 113 |
\def\makefootline{\baselineskip10pt\hsize6.5in\line{\the\footline}} |
|---|
| 114 |
\else |
|---|
| 115 |
\hsize 3.2in |
|---|
| 116 |
\vsize 7.95in |
|---|
| 117 |
\hoffset -.75in |
|---|
| 118 |
\voffset -.745in |
|---|
| 119 |
\font\titlefont=cmbx10 \scaledmag2 |
|---|
| 120 |
\font\headingfont=cmbx10 \scaledmag1 |
|---|
| 121 |
\font\smallfont=cmr6 |
|---|
| 122 |
\font\smallsy=cmsy6 |
|---|
| 123 |
\font\eightrm=cmr8 |
|---|
| 124 |
\font\eightbf=cmbx8 |
|---|
| 125 |
\font\eightit=cmti8 |
|---|
| 126 |
\font\eighttt=cmtt8 |
|---|
| 127 |
\font\eightsy=cmsy8 |
|---|
| 128 |
\textfont0=\eightrm |
|---|
| 129 |
\textfont2=\eightsy |
|---|
| 130 |
\def\rm{\eightrm} |
|---|
| 131 |
\def\bf{\eightbf} |
|---|
| 132 |
\def\it{\eightit} |
|---|
| 133 |
\def\tt{\eighttt} |
|---|
| 134 |
\normalbaselineskip=.8\normalbaselineskip |
|---|
| 135 |
\normallineskip=.8\normallineskip |
|---|
| 136 |
\normallineskiplimit=.8\normallineskiplimit |
|---|
| 137 |
\normalbaselines\rm |
|---|
| 138 |
|
|---|
| 139 |
\if 2\ncolumns |
|---|
| 140 |
\let\maxcolumn=b |
|---|
| 141 |
\footline{\hss\rm\folio\hss} |
|---|
| 142 |
\def\makefootline{\vskip 2in \hsize=6.86in\line{\the\footline}} |
|---|
| 143 |
\else \if 3\ncolumns |
|---|
| 144 |
\let\maxcolumn=c |
|---|
| 145 |
\nopagenumbers |
|---|
| 146 |
\else |
|---|
| 147 |
\errhelp{You must set \columnsperpage equal to 1, 2, or 3.} |
|---|
| 148 |
\errmessage{Illegal number of columns per page} |
|---|
| 149 |
\fi\fi |
|---|
| 150 |
|
|---|
| 151 |
\intercolumnskip=.46in |
|---|
| 152 |
\def\abc{a} |
|---|
| 153 |
\output={ |
|---|
| 154 |
|
|---|
| 155 |
|
|---|
| 156 |
\if \maxcolumn\abc \multicolumnformat \global\def\abc{a} |
|---|
| 157 |
\else\if a\abc |
|---|
| 158 |
\global\setbox\columna\columnbox \global\def\abc{b} |
|---|
| 159 |
|
|---|
| 160 |
\global\setbox\columnb\hbox to -\intercolumnskip{} |
|---|
| 161 |
\else |
|---|
| 162 |
\global\setbox\columnb\columnbox \global\def\abc{c}\fi\fi} |
|---|
| 163 |
\def\multicolumnformat{\shipout\vbox{\makeheadline |
|---|
| 164 |
\hbox{\box\columna\hskip\intercolumnskip |
|---|
| 165 |
\box\columnb\hskip\intercolumnskip\columnbox} |
|---|
| 166 |
\makefootline}\advancepageno} |
|---|
| 167 |
\def\columnbox{\leftline{\pagebody}} |
|---|
| 168 |
|
|---|
| 169 |
\def\bye{\par\vfill\supereject |
|---|
| 170 |
\if a\abc \else\null\vfill\eject\fi |
|---|
| 171 |
\if a\abc \else\null\vfill\eject\fi |
|---|
| 172 |
\end} |
|---|
| 173 |
\fi |
|---|
| 174 |
|
|---|
| 175 |
|
|---|
| 176 |
|
|---|
| 177 |
\catcode`\^=12 |
|---|
| 178 |
\catcode`\_=12 |
|---|
| 179 |
|
|---|
| 180 |
\chardef\\=`\\ |
|---|
| 181 |
\chardef\{=`\{ |
|---|
| 182 |
\chardef\}=`\} |
|---|
| 183 |
|
|---|
| 184 |
\hyphenation{mini-buf-fer} |
|---|
| 185 |
|
|---|
| 186 |
\parindent 0pt |
|---|
| 187 |
\parskip 1ex plus .5ex minus .5ex |
|---|
| 188 |
|
|---|
| 189 |
\def\small{\smallfont\textfont2=\smallsy\baselineskip=.8\baselineskip} |
|---|
| 190 |
|
|---|
| 191 |
\outer\def\newcolumn{\vfill\eject} |
|---|
| 192 |
|
|---|
| 193 |
\outer\def\title#1{{\titlefont\centerline{#1}}\vskip 1ex plus .5ex} |
|---|
| 194 |
|
|---|
| 195 |
\outer\def\section#1{\par\filbreak |
|---|
| 196 |
\vskip 3ex plus 2ex minus 2ex {\headingfont #1}\mark{#1} |
|---|
| 197 |
\vskip 2ex plus 1ex minus 1.5ex} |
|---|
| 198 |
|
|---|
| 199 |
\newdimen\keyindent |
|---|
| 200 |
|
|---|
| 201 |
\def\beginindentedkeys{\keyindent=1em} |
|---|
| 202 |
\def\endindentedkeys{\keyindent=0em} |
|---|
| 203 |
\endindentedkeys |
|---|
| 204 |
|
|---|
| 205 |
\def\paralign{\vskip\parskip\halign} |
|---|
| 206 |
|
|---|
| 207 |
\def\<#1>{$\langle${\rm #1}$\rangle$} |
|---|
| 208 |
|
|---|
| 209 |
\def\kbd#1{{\tt#1}\null} |
|---|
| 210 |
|
|---|
| 211 |
\def\beginexample{\par\leavevmode\begingroup |
|---|
| 212 |
\obeylines\obeyspaces\parskip0pt\tt} |
|---|
| 213 |
{\obeyspaces\global\let =\ } |
|---|
| 214 |
\def\endexample{\endgroup} |
|---|
| 215 |
|
|---|
| 216 |
\def\key#1#2{\leavevmode\hbox to \hsize{\vtop |
|---|
| 217 |
{\hsize=.75\hsize\rightskip=1em |
|---|
| 218 |
\hskip\keyindent\relax#1}\kbd{#2}\hfil}} |
|---|
| 219 |
|
|---|
| 220 |
\newbox\metaxbox |
|---|
| 221 |
\setbox\metaxbox\hbox{\kbd{M-x }} |
|---|
| 222 |
\newdimen\metaxwidth |
|---|
| 223 |
\metaxwidth=\wd\metaxbox |
|---|
| 224 |
|
|---|
| 225 |
\def\metax#1#2{\leavevmode\hbox to \hsize{\hbox to .75\hsize |
|---|
| 226 |
{\hskip\keyindent\relax#1\hfil} |
|---|
| 227 |
\hskip -\metaxwidth minus 1fil |
|---|
| 228 |
\kbd{#2}\hfil}} |
|---|
| 229 |
|
|---|
| 230 |
\def\threecol#1#2#3{\hskip\keyindent\relax#1\hfil&\kbd{#2}\quad |
|---|
| 231 |
&\kbd{#3}\quad\cr} |
|---|
| 232 |
|
|---|
| 233 |
|
|---|
| 234 |
|
|---|
| 235 |
|
|---|
| 236 |
|
|---|
| 237 |
\let\^=^ |
|---|
| 238 |
\let\_=_ |
|---|
| 239 |
\catcode`\^=7 |
|---|
| 240 |
\catcode`\_=8 |
|---|
| 241 |
|
|---|
| 242 |
|
|---|
| 243 |
\let\wkbd=\kbd |
|---|
| 244 |
\def\kbd#1{{\spaceskip=.37em\tt#1}\null} |
|---|
| 245 |
|
|---|
| 246 |
\def\wkey#1#2{\leavevmode\hbox to \hsize{\vtop |
|---|
| 247 |
{\hsize=.75\hsize\rightskip=1em |
|---|
| 248 |
\hskip\keyindent\relax#1}\wkbd{#2}\hfil}} |
|---|
| 249 |
\def\wthreecol#1#2#3{\hskip\keyindent\relax#1\hfil&\wkbd{#2}\quad |
|---|
| 250 |
&\wkbd{#3}\quad\cr} |
|---|
| 251 |
|
|---|
| 252 |
\def\stkkey#1#2#3#4{\par\line{\hskip1em\rlap{\kbd{#1}}\hskip4.5em |
|---|
| 253 |
\rlap{{#2}}\hskip7.5em\rlap{{#3}}\hskip7.5em\rlap{{#4}}\hfill}\par} |
|---|
| 254 |
\def\S#1{$S_{\scriptscriptstyle #1}$} |
|---|
| 255 |
\def\swap{$\leftrightarrow$} |
|---|
| 256 |
|
|---|
| 257 |
\def\calcprefix{C-x *\ } |
|---|
| 258 |
\def\,{{\rm ,\hskip.55em}\ignorespaces} |
|---|
| 259 |
\def\lesssectionskip{\vskip-1.5ex} |
|---|
| 260 |
|
|---|
| 261 |
\def\iline#1{\par\line{\hskip1em\relax #1\hfill}\par} |
|---|
| 262 |
|
|---|
| 263 |
\if 1\ncolumns |
|---|
| 264 |
\else |
|---|
| 265 |
\font\eighti=cmmi8 |
|---|
| 266 |
\textfont1=\eighti |
|---|
| 267 |
\fi |
|---|
| 268 |
|
|---|
| 269 |
|
|---|
| 270 |
|
|---|
| 271 |
|
|---|
| 272 |
|
|---|
| 273 |
|
|---|
| 274 |
\title{GNU Calc Reference Card} |
|---|
| 275 |
|
|---|
| 276 |
\centerline{(for version \versionnumber)} |
|---|
| 277 |
|
|---|
| 278 |
\section{Starting and Stopping} |
|---|
| 279 |
|
|---|
| 280 |
\wkey{start/stop standard Calc}{\calcprefix c} |
|---|
| 281 |
\wkey{start/stop X keypad Calc}{\calcprefix k} |
|---|
| 282 |
\wkey{\quad start/stop either: \kbd{\calcprefix *}}{} |
|---|
| 283 |
\wkey{stop standard Calc}{q} |
|---|
| 284 |
|
|---|
| 285 |
\wkey{Calc tutorial}{\calcprefix t} |
|---|
| 286 |
\wkey{run Calc in other window}{\calcprefix o} |
|---|
| 287 |
\wkey{quick calculation in minibuffer}{\calcprefix q} |
|---|
| 288 |
|
|---|
| 289 |
\section{Getting Help} |
|---|
| 290 |
|
|---|
| 291 |
\lesssectionskip |
|---|
| 292 |
The \kbd{h} prefix key is Calc's analogue of \kbd{C-h} in Emacs. |
|---|
| 293 |
|
|---|
| 294 |
\key{quick summary of keys}{?} |
|---|
| 295 |
\key{describe key briefly}{h c} |
|---|
| 296 |
\key{describe key fully}{h k} |
|---|
| 297 |
\key{describe function or command}{h f} |
|---|
| 298 |
\key{read on-line manual}{h i{\rm\enskip or\enskip}\calcprefix i} |
|---|
| 299 |
\key{read full Calc summary}{h s{\rm\enskip or\enskip}\calcprefix s} |
|---|
| 300 |
|
|---|
| 301 |
\section{Error Recovery} |
|---|
| 302 |
|
|---|
| 303 |
\key{abort command in progress}{C-g} |
|---|
| 304 |
\key{display recent error messages}{w} |
|---|
| 305 |
\key{undo last operation}{U} |
|---|
| 306 |
\key{redo last operation}{D} |
|---|
| 307 |
\key{recall last arguments}{M-RET} |
|---|
| 308 |
\key{edit top of stack}{`} |
|---|
| 309 |
\wkey{reset Calc to initial state}{\calcprefix 0 {\rm (zero)}} |
|---|
| 310 |
|
|---|
| 311 |
\section{Transferring Data} |
|---|
| 312 |
|
|---|
| 313 |
\wkey{grab region from a buffer}{\calcprefix g} |
|---|
| 314 |
\wkey{grab rectangle from a buffer}{\calcprefix r} |
|---|
| 315 |
\wkey{grab rectangle, summing columns}{\calcprefix :} |
|---|
| 316 |
\wkey{grab rectangle, summing rows}{\calcprefix \_} |
|---|
| 317 |
|
|---|
| 318 |
\wkey{yank data to a buffer}{\calcprefix y} |
|---|
| 319 |
|
|---|
| 320 |
Also, try \kbd{C-k}/\kbd{C-y} or X cut and paste. |
|---|
| 321 |
|
|---|
| 322 |
\section{Examples} |
|---|
| 323 |
|
|---|
| 324 |
\lesssectionskip |
|---|
| 325 |
In RPN, enter numbers first, separated by \kbd{RET} if necessary, |
|---|
| 326 |
then type the operator. To enter a calculation in algebraic form, |
|---|
| 327 |
press the apostrophe first. |
|---|
| 328 |
|
|---|
| 329 |
\beginindentedkeys |
|---|
| 330 |
\paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt\hfil\quad&#\hfil\cr |
|---|
| 331 |
\wthreecol{ }{{\bf RPN style:}}{{\bf algebraic style:}} |
|---|
| 332 |
\wthreecol{Example:}{2 RET 3 +}{' 2+3 RET} |
|---|
| 333 |
\wthreecol{Example:}{2 RET 3 + 4 *}{' (2+3)*4 RET} |
|---|
| 334 |
\wthreecol{Example:}{2 RET 3 RET 4 + *}{' 2*(3+4) RET} |
|---|
| 335 |
\wthreecol{Example:}{3 RET 6 + Q 3 \^}{' sqrt(3+6)\^3 RET} |
|---|
| 336 |
\wthreecol{Example:}{P 3 / n S}{' sin(-pi/3) RET =} |
|---|
| 337 |
} |
|---|
| 338 |
\endindentedkeys |
|---|
| 339 |
|
|---|
| 340 |
\shortcopyrightnotice |
|---|
| 341 |
|
|---|
| 342 |
|
|---|
| 343 |
|
|---|
| 344 |
\section{Arithmetic} |
|---|
| 345 |
|
|---|
| 346 |
\key{add, subtract, multiply, divide}{+\, -\, *\, /} |
|---|
| 347 |
\key{raise to a power, {\it n\/}th root}{\^\, I \^} |
|---|
| 348 |
\key{change sign}{n} |
|---|
| 349 |
\key{reciprocal $1/x$}{\&} |
|---|
| 350 |
\key{square root $\sqrt x$}{Q} |
|---|
| 351 |
|
|---|
| 352 |
\key{set precision}{p} |
|---|
| 353 |
\key{round off last two digits}{c 2} |
|---|
| 354 |
\key{convert to fraction, float}{c F\, c f} |
|---|
| 355 |
|
|---|
| 356 |
\wkey{enter using algebraic notation}{' 2+3*4} |
|---|
| 357 |
\wkey{refer to previous result}{' 3*\$\^2} |
|---|
| 358 |
\wkey{refer to higher stack entries}{' \$1*\$2\^2} |
|---|
| 359 |
\key{finish alg entry without evaluating}{LFD} |
|---|
| 360 |
\key{set mode where alg entry used by default}{m a} |
|---|
| 361 |
|
|---|
| 362 |
\section{Stack Commands} |
|---|
| 363 |
|
|---|
| 364 |
\lesssectionskip |
|---|
| 365 |
Here \S{n} is the $n$th stack entry, and $N$ is the size of the stack. |
|---|
| 366 |
|
|---|
| 367 |
\vskip.5ex |
|---|
| 368 |
\stkkey{\it key}{\it no prefix}{\it prefix $n$}{\it prefix $-n$} |
|---|
| 369 |
\stkkey{RET}{copy \S{1}}{copy \S{1..n}}{copy \S{n}} |
|---|
| 370 |
\stkkey{LFD}{copy \S{2}}{copy \S{n}}{copy \S{1..n}} |
|---|
| 371 |
\stkkey{DEL}{delete \S{1}}{delete \S{1..n}}{delete \S{n}} |
|---|
| 372 |
\stkkey{M-DEL}{delete \S{2}}{delete \S{n}}{delete \S{1..n}} |
|---|
| 373 |
\stkkey{TAB}{swap \S{1}\swap\S{2}}{roll \S{1} to \S{n}}{roll \S{n} to \S{N}} |
|---|
| 374 |
\stkkey{M-TAB}{roll \S{3} to \S{1}}{roll \S{n} to \S{1}}{roll \S{N} to \S{n}} |
|---|
| 375 |
|
|---|
| 376 |
With a 0 prefix, these copy, delete, or reverse \S{1..N}. |
|---|
| 377 |
|
|---|
| 378 |
\section{Display} |
|---|
| 379 |
|
|---|
| 380 |
\wkey{scroll horizontally, vertically}{< >\, \{ \}} |
|---|
| 381 |
\key{home cursor}{o} |
|---|
| 382 |
\key{line numbers on/off}{d l} |
|---|
| 383 |
\key{trail display on/off}{t d} |
|---|
| 384 |
|
|---|
| 385 |
\key{scientific notation}{d s} |
|---|
| 386 |
\key{fixed-point notation}{d f} |
|---|
| 387 |
\key{floating-point (normal) notation}{d n} |
|---|
| 388 |
\key{group digits with commas}{d g} |
|---|
| 389 |
|
|---|
| 390 |
For display mode commands, \kbd{H} prefix prevents screen redraw |
|---|
| 391 |
and \kbd{I} prefix temporarily redraws top of stack. |
|---|
| 392 |
|
|---|
| 393 |
\section{Notations} |
|---|
| 394 |
|
|---|
| 395 |
\wkey{scientific notation}{6.02e23} |
|---|
| 396 |
\wkey{minus sign in numeric entry}{\_23{\rm\quad or\quad}23 n} |
|---|
| 397 |
\wkey{fractions}{3:4} |
|---|
| 398 |
\wkey{complex numbers}{({\it x}, {\it y})} |
|---|
| 399 |
\wkey{polar complex numbers}{({\it r}; $\theta$)} |
|---|
| 400 |
\wkey{vectors (commas optional)}{[1, 2, 3]} |
|---|
| 401 |
\wkey{matrices (or nested vectors)}{[1, 2; 3, 4]} |
|---|
| 402 |
\wkey{error forms (\kbd{p} key)}{100 +/- 0.5} |
|---|
| 403 |
\wkey{interval forms}{[2 ..\ 5)} |
|---|
| 404 |
\wkey{modulo forms (\kbd{M} key)}{6 mod 24} |
|---|
| 405 |
\wkey{HMS forms}{5@ 30' 0"} |
|---|
| 406 |
\wkey{date forms}{<Jul 4, 1992>} |
|---|
| 407 |
\wkey{infinity, indeterminate}{inf\, nan} |
|---|
| 408 |
|
|---|
| 409 |
|
|---|
| 410 |
|
|---|
| 411 |
\section{Scientific Functions} |
|---|
| 412 |
|
|---|
| 413 |
\key{ln, log${}_{\scriptscriptstyle 10}$, log${}_b$}{L\, H L\, B} |
|---|
| 414 |
\key{exponential {\it e}${}^x$, 10${}^x$}{E\, H E} |
|---|
| 415 |
\key{sin, cos, tan}{S\, C\, T} |
|---|
| 416 |
\key{arcsin, arccos, arctan}{I S\, I C\, I T} |
|---|
| 417 |
\key{inverse, hyperbolic prefix keys}{I\, H} |
|---|
| 418 |
\key{two-argument arctan}{f T} |
|---|
| 419 |
\key{degrees, radians modes}{m d\, m r} |
|---|
| 420 |
\key{pi ($\pi$)}{P} |
|---|
| 421 |
|
|---|
| 422 |
\key{factorial, double factorial}{!\, k d} |
|---|
| 423 |
\key{combinations, permutations}{k c\, H k c} |
|---|
| 424 |
\key{prime factorization}{k f} |
|---|
| 425 |
\key{next prime, previous prime}{k n\, I k n} |
|---|
| 426 |
\key{GCD, LCM}{k g\, k l} |
|---|
| 427 |
\key{random number, shuffle}{k r\, k h} |
|---|
| 428 |
\key{minimum, maximum}{f n\, f x} |
|---|
| 429 |
|
|---|
| 430 |
\key{error functions erf, erfc}{f e\, I f e} |
|---|
| 431 |
\key{gamma, beta functions}{f g\, f b} |
|---|
| 432 |
\key{incomplete gamma, beta functions}{f G\, f B} |
|---|
| 433 |
\key{Bessel $J_\nu$, $Y_\nu$ functions}{f j\, f y} |
|---|
| 434 |
|
|---|
| 435 |
\key{complex magnitude, arg, conjugate}{A\, G\, J} |
|---|
| 436 |
\key{real, imaginary parts}{f r\, f i} |
|---|
| 437 |
\key{convert polar/rectangular}{c p} |
|---|
| 438 |
|
|---|
| 439 |
\section{Financial Functions} |
|---|
| 440 |
|
|---|
| 441 |
\key{enter percentage}{M-\%} |
|---|
| 442 |
\key{convert to percentage}{c \%} |
|---|
| 443 |
\key{percentage change}{b \%} |
|---|
| 444 |
|
|---|
| 445 |
\key{present value}{b P} |
|---|
| 446 |
\key{future value}{b F} |
|---|
| 447 |
\key{rate of return}{b T} |
|---|
| 448 |
\key{number of payments}{b \#} |
|---|
| 449 |
\key{size of payments}{b M} |
|---|
| 450 |
\key{net present value, int.\ rate of return}{b N\, b I} |
|---|
| 451 |
|
|---|
| 452 |
Above computations assume payments at end of period. Use \kbd{I} |
|---|
| 453 |
prefix for beginning of period, or \kbd{H} for a lump sum investment. |
|---|
| 454 |
|
|---|
| 455 |
\key{straight-line depreciation}{b S} |
|---|
| 456 |
\key{sum-of-years'-digits}{b Y} |
|---|
| 457 |
\key{double declining balance}{b D} |
|---|
| 458 |
|
|---|
| 459 |
\section{Units} |
|---|
| 460 |
|
|---|
| 461 |
\wkey{enter with units}{' 55 mi/hr} |
|---|
| 462 |
\key{convert to new units, base units}{u c\, u b} |
|---|
| 463 |
\key{convert temperature units}{u t} |
|---|
| 464 |
\key{simplify units expression}{u s} |
|---|
| 465 |
\key{view units table}{u v} |
|---|
| 466 |
|
|---|
| 467 |
Common units: |
|---|
| 468 |
\iline{distance: \kbd{m}, \kbd{cm}, \kbd{mm}, \kbd{km}; |
|---|
| 469 |
\kbd{in}, \kbd{ft}, \kbd{mi}, \kbd{mfi}; |
|---|
| 470 |
\kbd{point}, \kbd{lyr}} |
|---|
| 471 |
\iline{volume: \kbd{l} or \kbd{L}, \kbd{ml}; |
|---|
| 472 |
\kbd{gal}, \kbd{qt}, \kbd{pt}, \kbd{cup}, \kbd{floz}, |
|---|
| 473 |
\kbd{tbsp}, \kbd{tsp}} |
|---|
| 474 |
\iline{mass: \kbd{g}, \kbd{mg}, \kbd{kg}, \kbd{t}; |
|---|
| 475 |
\kbd{lb}, \kbd{oz}, \kbd{ton}} |
|---|
| 476 |
\iline{time: \kbd{s} or \kbd{sec}, \kbd{ms}, \kbd{us}, \kbd{ns}, \kbd{min}, |
|---|
| 477 |
\kbd{hr}, \kbd{day}, \kbd{wk}} |
|---|
| 478 |
\iline{temperature: \kbd{degC}, \kbd{degF}, \kbd{K}} |
|---|
| 479 |
|
|---|
| 480 |
|
|---|
| 481 |
|
|---|
| 482 |
\newcolumn |
|---|
| 483 |
\title{GNU Calc Reference Card} |
|---|
| 484 |
|
|---|
| 485 |
\section{Programmer's Functions} |
|---|
| 486 |
|
|---|
| 487 |
\key{binary, octal, hex display}{d 2\, d 8\, d 6} |
|---|
| 488 |
\key{decimal, other radix display}{d 0\, d r} |
|---|
| 489 |
\key{display leading zeros}{d z} |
|---|
| 490 |
\key{entering non-decimal numbers}{16\#7FFF} |
|---|
| 491 |
|
|---|
| 492 |
\key{binary word size}{b w} |
|---|
| 493 |
\key{binary AND, OR, XOR}{b a\, b o\, b x} |
|---|
| 494 |
\key{binary DIFF, NOT}{b d\, b n} |
|---|
| 495 |
\key{left shift}{b l} |
|---|
| 496 |
\key{logical right shift}{b r} |
|---|
| 497 |
\key{arithmetic right shift}{b R} |
|---|
| 498 |
|
|---|
| 499 |
\key{integer quotient, remainder}{\\\, \%} |
|---|
| 500 |
\key{integer square root, logarithm}{f Q\, f I} |
|---|
| 501 |
\key{floor, ceiling, round to integer}{F\, I F\, R} |
|---|
| 502 |
|
|---|
| 503 |
\section{Variables} |
|---|
| 504 |
|
|---|
| 505 |
\lesssectionskip |
|---|
| 506 |
Variable names are single digits or whole words. |
|---|
| 507 |
|
|---|
| 508 |
\key{store to variable}{s t} |
|---|
| 509 |
\key{store and keep on stack}{s s} |
|---|
| 510 |
\key{recall from variable}{s r} |
|---|
| 511 |
\key{shorthands for digit variables}{t {\it n}\, s {\it n}\, r {\it n}} |
|---|
| 512 |
\key{unstore, exchange variable}{s u\, s x} |
|---|
| 513 |
\key{edit variable}{s e} |
|---|
| 514 |
|
|---|
| 515 |
\section{Vector Operations} |
|---|
| 516 |
|
|---|
| 517 |
\key{vector of 1, 2, $\ldots\mskip\thinmuskip$, {\it n}}{v x {\it n}} |
|---|
| 518 |
\key{vector of {\it n} counts from {\it a} by {\it b}}{C-u v x} |
|---|
| 519 |
\key{vector of copies of a value}{v b} |
|---|
| 520 |
\key{concatenate into vector}{|} |
|---|
| 521 |
\key{pack many stack items into vector}{v p} |
|---|
| 522 |
\key{unpack vector or object}{v u} |
|---|
| 523 |
|
|---|
| 524 |
\key{length of vector (list)}{v l} |
|---|
| 525 |
\key{reverse vector}{v v} |
|---|
| 526 |
\key{sort, grade vector}{V S\, V G} |
|---|
| 527 |
\key{histogram of vector data}{V H} |
|---|
| 528 |
\key{extract vector element}{v r} |
|---|
| 529 |
|
|---|
| 530 |
\key{matrix determinant, inverse}{V D\, \&} |
|---|
| 531 |
\key{matrix transpose, trace}{v t\, V T} |
|---|
| 532 |
\key{cross, dot products}{V C\, *} |
|---|
| 533 |
\key{identity matrix}{v i} |
|---|
| 534 |
\key{extract matrix row, column}{v r\, v c} |
|---|
| 535 |
|
|---|
| 536 |
\key{intersection, union, diff of sets}{V \^\, V V\, V -} |
|---|
| 537 |
\key{cardinality of set}{V \#} |
|---|
| 538 |
|
|---|
| 539 |
\key{add vectors elementwise (i.e., map \kbd{+})}{V M +} |
|---|
| 540 |
\key{sum elements in vector (i.e., reduce \kbd{+})}{V R +} |
|---|
| 541 |
\key{sum rows in matrix}{V R \_ +} |
|---|
| 542 |
\key{sum columns in matrix}{V R : +} |
|---|
| 543 |
\key{sum elements, accumulate results}{V U +} |
|---|
| 544 |
|
|---|
| 545 |
|
|---|
| 546 |
|
|---|
| 547 |
\section{Algebra} |
|---|
| 548 |
|
|---|
| 549 |
\wkey{enter an algebraic formula}{' 2x+3y\^2} |
|---|
| 550 |
\wkey{enter an equation}{' 2x\^2=18} |
|---|
| 551 |
|
|---|
| 552 |
\key{symbolic (vs.\ numeric) mode}{m s} |
|---|
| 553 |
\key{fractions (vs.\ float) mode}{m f} |
|---|
| 554 |
\key{suppress evaluation of formulas}{m O} |
|---|
| 555 |
\key{simplify formulas automatically}{m S} |
|---|
| 556 |
\key{return to default evaluation rules}{m D} |
|---|
| 557 |
|
|---|
| 558 |
\key{``Big'' display mode}{d B} |
|---|
| 559 |
\key{C, Pascal, FORTRAN modes}{d C\, d P\, d F} |
|---|
| 560 |
\key{\TeX, La\TeX, eqn modes}{d T\, d L\, d E} |
|---|
| 561 |
\key{Unformatted mode}{d U} |
|---|
| 562 |
\key{Normal language mode}{d N} |
|---|
| 563 |
|
|---|
| 564 |
\key{simplify formula}{a s} |
|---|
| 565 |
\key{put formula into rational form}{a n} |
|---|
| 566 |
\key{evaluate variables in formula}{=} |
|---|
| 567 |
\key{evaluate numerically}{N} |
|---|
| 568 |
\key{let variable equal a value in formula}{s l {\it x\/}={\it val}} |
|---|
| 569 |
\key{declare properties of variable}{s d} |
|---|
| 570 |
\iline{Common decls: \kbd{pos}, \kbd{int}, \kbd{real}, |
|---|
| 571 |
\kbd{scalar}, \kbd{[{\it a}..{\it b}\hskip.1em]}.} |
|---|
| 572 |
|
|---|
| 573 |
\key{expand, collect terms}{a x\, a c} |
|---|
| 574 |
\key{factor, partial fractions}{a f\, a a} |
|---|
| 575 |
\key{polynomial quotient, remainder, GCD}{a \\\, a \%\, a g} |
|---|
| 576 |
\key{derivative, integral}{a d\, a i} |
|---|
| 577 |
\key{taylor series}{a t} |
|---|
| 578 |
|
|---|
| 579 |
\key{principal solution to equation(s)}{a S} |
|---|
| 580 |
\key{list of solutions}{a P} |
|---|
| 581 |
\key{generic solution}{H a S} |
|---|
| 582 |
\key{apply function to both sides of eqn}{a M} |
|---|
| 583 |
|
|---|
| 584 |
\key{rewrite formula}{a r} |
|---|
| 585 |
\iline{Example: \wkbd{a r a*b + a*c := a*(b+c)}} |
|---|
| 586 |
\iline{Example: \wkbd{a r sin(x)\^2 := 1-cos(x)\^2}} |
|---|
| 587 |
\iline{Example: \wkbd{a r cos(n pi) := 1 ::\ integer(n) ::\ n\%2 = 0}} |
|---|
| 588 |
\iline{Example: \wkbd{a r [f(0) := 1, f(n) := n f(n-1) ::\ n > 0]}} |
|---|
| 589 |
\iline{Put rules in \kbd{EvalRules} to have them apply automatically.} |
|---|
| 590 |
\iline{Put rules in \kbd{AlgSimpRules} to apply during \kbd{a s} |
|---|
| 591 |
command.} |
|---|
| 592 |
\iline{Common markers: \kbd{opt}, \kbd{plain}, \kbd{quote}, \kbd{eval}, |
|---|
| 593 |
\kbd{let}, \kbd{remember}.} |
|---|
| 594 |
|
|---|
| 595 |
\section{Numerical Computations} |
|---|
| 596 |
|
|---|
| 597 |
\key{sum formula over a range}{a +} |
|---|
| 598 |
\key{product of formula over a range}{a *} |
|---|
| 599 |
\key{tabulate formula over a range}{a T} |
|---|
| 600 |
\key{integrate numerically over a range}{a I} |
|---|
| 601 |
\key{find zero of formula or equation}{a R} |
|---|
| 602 |
\key{find local min, max of formula}{a N\, a X} |
|---|
| 603 |
\key{fit data to line or curve}{a F} |
|---|
| 604 |
|
|---|
| 605 |
\key{mean of data in vector or variable}{u M} |
|---|
| 606 |
\key{median of data}{H u M} |
|---|
| 607 |
\key{geometric mean of data}{u G} |
|---|
| 608 |
\key{sum, product of data}{u +\, u *} |
|---|
| 609 |
\key{minimum, maximum of data}{u N\, u X} |
|---|
| 610 |
\key{sample, pop.\ standard deviation}{u S\, I u S} |
|---|
| 611 |
|
|---|
| 612 |
|
|---|
| 613 |
|
|---|
| 614 |
\section{Selections} |
|---|
| 615 |
|
|---|
| 616 |
\key{select subformula under cursor}{j s} |
|---|
| 617 |
\key{select {\it n\/}th subformula}{j {\it n}} |
|---|
| 618 |
\key{select more}{j m} |
|---|
| 619 |
\key{unselect this, all formulas}{j u\, j c} |
|---|
| 620 |
|
|---|
| 621 |
\key{copy indicated subformula}{j RET} |
|---|
| 622 |
\key{delete indicated subformula}{j DEL} |
|---|
| 623 |
|
|---|
| 624 |
\key{commute selected terms}{j C} |
|---|
| 625 |
\key{commute term leftward, rightward}{j L\, j R} |
|---|
| 626 |
\key{distribute, merge selection}{j D\, j M} |
|---|
| 627 |
\key{isolate selected term in equation}{j I} |
|---|
| 628 |
\key{negate, invert term in context}{j N\, j \&} |
|---|
| 629 |
\key{rewrite selected term}{j r} |
|---|
| 630 |
|
|---|
| 631 |
\section{Graphics} |
|---|
| 632 |
|
|---|
| 633 |
\key{graph function or data}{g f} |
|---|
| 634 |
\key{graph 3D function or data}{g F} |
|---|
| 635 |
\key{replot current graph}{g p} |
|---|
| 636 |
\key{print current graph}{g P} |
|---|
| 637 |
\key{add curve to graph}{g a} |
|---|
| 638 |
\key{set number of data points}{g N} |
|---|
| 639 |
\key{set line, point styles}{g s\, g S} |
|---|
| 640 |
\key{set log vs.\ linear {\it x, y} axis}{g l\, g L} |
|---|
| 641 |
\key{set range for {\it x, y} axis}{g r\, g R} |
|---|
| 642 |
\key{close graphics window}{g q} |
|---|
| 643 |
|
|---|
| 644 |
\section{Programming} |
|---|
| 645 |
|
|---|
| 646 |
\key{begin, end recording a macro}{C-x (\, C-x )} |
|---|
| 647 |
\key{replay keyboard macro}{X} |
|---|
| 648 |
\wkey{read region as written-out macro}{\calcprefix m} |
|---|
| 649 |
\key{if, else, endif}{Z [\, Z :\, Z ]} |
|---|
| 650 |
\key{equal to, less than, member of}{a =\, a <\, a \{} |
|---|
| 651 |
\key{repeat {\it n} times, break from loop}{Z <\, Z >\, Z /} |
|---|
| 652 |
\key{``for'' loop: start, end; body, step}{Z (\, Z )} |
|---|
| 653 |
\key{save, restore mode settings}{Z `\, Z '} |
|---|
| 654 |
\key{query user during macro}{Z \#} |
|---|
| 655 |
\key{put finished macro on a key}{Z K} |
|---|
| 656 |
|
|---|
| 657 |
\key{define function with formula}{Z F} |
|---|
| 658 |
\key{edit definition}{Z E} |
|---|
| 659 |
|
|---|
| 660 |
\key{record user-defined command permanently}{Z P} |
|---|
| 661 |
\key{record variable value permanently}{s p} |
|---|
| 662 |
\key{record mode settings permanently}{m m} |
|---|
| 663 |
|
|---|
| 664 |
\copyrightnotice |
|---|
| 665 |
|
|---|
| 666 |
\bye |
|---|
| 667 |
|
|---|
| 668 |
|
|---|
| 669 |
|
|---|
| 670 |
|
|---|
| 671 |
|
|---|
| 672 |
|
|---|
| 673 |
|
|---|