You are on page 1of 2

GNU Calc Reference Card Arithmetic Scientific Functions

(for GNU Emacs version 26)


add, subtract, multiply, divide +, -, *, / ln, log10 , logb L, H L, B
raise to a power, nth root ^, I ^ exponential ex , 10x E, H E
Starting and Stopping change sign n sin, cos, tan S, C, T
reciprocal 1/x
√ & arcsin, arccos, arctan I S, I C, I T
start/stop standard Calc C-x * c square root x Q inverse, hyperbolic prefix keys I, H
start/stop X keypad Calc C-x * k set precision p two-argument arctan fT
start/stop either: C-x * * round off last two digits c2 degrees, radians modes m d, m r
stop standard Calc q convert to fraction, float c F, c f pi (π) P
Calc tutorial C-x * t enter using algebraic notation ’ 2+3*4 factorial, double factorial !, k d
run Calc in other window C-x * o refer to previous result ’ 3*$^2 combinations, permutations k c, Hkc
quick calculation in minibuffer C-x * q refer to higher stack entries ’ $1*$2^2 prime factorization kf
finish alg entry without evaluating LFD next prime, previous prime k n, I kn
GCD, LCM k g, k l
Getting Help set mode where alg entry used by default ma
random number, shuffle k r, k h
The h prefix key is Calc’s analogue of C-h in Emacs. minimum, maximum f n, f x
quick summary of keys ?
Stack Commands error functions erf, erfc f e, I fe
describe key briefly h c Here Sn is the nth stack entry, and N is the size of the stack. gamma, beta functions f g, f b
describe key fully h k key no prefix prefix n prefix −n incomplete gamma, beta functions f G, f B
describe function or command h f RET copy S1 copy S1..n copy Sn Bessel Jν , Yν functions f j, f y
read Info manual h i or C-x * i LFD copy S2 copy Sn copy S1..n complex magnitude, arg, conjugate A, G, J
read full Calc summary h s or C-x * s DEL delete S1 delete S1..n delete Sn real, imaginary parts f r, f i
M-DEL delete S2 delete Sn delete S1..n convert polar/rectangular cp
Error Recovery TAB swap S1 ↔S2 roll S1 to Sn roll Sn to SN
M-TAB roll S3 to S1 roll Sn to S1 roll SN to Sn
Financial Functions
abort command in progress C-g With a 0 prefix, these copy, delete, or reverse the entire stack.
display recent error messages w enter percentage M-%
undo last operation U
redo last operation D
Display convert to percentage c%
percentage change b%
recall last arguments M-RET
scroll horizontally, vertically < >, { } present value b P
edit top of stack ‘
home cursor o future value b F
reset Calc to initial state C-x * 0 (zero)
line numbers on/off dl rate of return b T
trail display on/off td number of payments b #
Transferring Data scientific notation d s size of payments b M
fixed-point notation d f net present value, int. rate of return b N, b I
grab region from a buffer C-x * g floating-point (normal) notation d n Above computations assume payments at end of period. Use I
grab rectangle from a buffer C-x * r group digits with commas d g prefix for beginning of period, or H for a lump sum investment.
grab rectangle, summing columns C-x * :
grab rectangle, summing rows C-x * _ For display mode commands, H prefix prevents screen redraw straight-line depreciation bS
and I prefix temporarily redraws top of stack. sum-of-years’-digits bY
yank data to a buffer C-x * y double declining balance bD
Also, try C-k/C-y or X cut and paste.
Notations
Units
Examples scientific notation 6.02e23
minus sign in numeric entry _23 or 23 n enter with units ’ 55 mi/hr
In RPN, enter numbers first, separated by RET if necessary, fractions 3:4 convert to new units, base units u c, u b
then type the operator. To enter a calculation in algebraic complex numbers (x, y) convert temperature units u t
form, press the apostrophe first. polar complex numbers (r; θ) simplify units expression u s
RPN style: algebraic style: vectors (commas optional) [1, 2, 3] view units table u v
Example: 2 RET 3 + ’ 2+3 RET matrices (or nested vectors) [1, 2; 3, 4]
Common units:
Example: 2 RET 3 + 4 * ’ (2+3)*4 RET error forms (p key) 100 +/- 0.5
distance: m, cm, mm, km; in, ft, mi, mfi; point, lyr
Example: 2 RET 3 RET 4 + * ’ 2*(3+4) RET interval forms [2 .. 5)
volume: l or L, ml; gal, qt, pt, cup, floz, tbsp, tsp
Example: 3 RET 6 + Q 3 ^ ’ sqrt(3+6)^3 RET modulo forms (M key) 6 mod 24
mass: g, mg, kg, t; lb, oz, ton
Example: P 3 / n S ’ sin(-pi/3) RET = HMS forms 5@ 30’ 0"
time: s or sec, ms, us, ns, min, hr, day, wk
date forms <Jul 4, 1992>
temperature: degC, degF, K

c 2018 Free Software Foundation, Inc. Permissions on back. infinity, indeterminate inf, nan
GNU Calc Reference Card Algebra Selections
enter an algebraic formula ’ 2x+3y^2 select subformula under cursor j s
Programmer’s Functions enter an equation ’ 2x^2=18 select nth subformula j n
symbolic (vs. numeric) mode m s select more j m
binary, octal, hex display d 2, d 8, d 6 unselect this, all formulas j u, j c
fractions (vs. float) mode m f
decimal, other radix display d 0, d r
suppress evaluation of formulas m O copy indicated subformula j RET
display leading zeros dz
return to default evaluation rules m D delete indicated subformula j DEL
entering non-decimal numbers 16#7FFF
“Big” display mode d B commute selected terms j C
binary word size b w
C, Pascal, FORTRAN modes d C, d P, d F commute term leftward, rightward j L, j R
binary AND, OR, XOR b a, b o, b x
TEX, LaTEX, eqn modes d T, d L, d E distribute, merge selection j D, j M
binary DIFF, NOT b d, b n
Maxima d X isolate selected term in equation j I
left shift b l
Unformatted mode d U negate, invert term in context j N, j &
logical right shift b r
Normal language mode d N rewrite selected term j r
arithmetic right shift b R
simplify formula as
integer quotient, remainder \, %
integer square root, logarithm f Q, f I
put formula into rational form an Graphics
evaluate variables in formula =
floor, ceiling, round to integer F, I F, R
evaluate numerically N graph function or data g f
let variable equal a value in formula s l x =val graph 3D function or data g F
Variables declare properties of variable sd replot current graph g p
Common decls: pos, int, real, scalar, [a..b ]. print current graph g P
Variable names are single digits or whole words.
expand, collect terms a x, a c add curve to graph g a
store to variable s t set number of data points
factor, partial fractions a f, a a g N
store and keep on stack s s set line, point styles
polynomial quotient, remainder, GCD a \, a %, a g g s, g S
recall from variable s r set log vs. linear x, y axis
derivative, integral a d, a i g l, g L
shorthands for digit variables t n, s n, r n set range for x, y axis
taylor series a t g r, g R
unstore, exchange variable s u, s x close graphics window g q
edit variable s e principal solution to equation(s) a S
list of solutions a P
Vector Operations generic solution H aS Programming
apply function to both sides of eqn a M
rewrite formula ar begin, end recording a macro C-x (, C-x )
vector of 1, 2, . . . , n vxn
Example: a r a*b + a*c := a*(b+c) replay keyboard macro X
vector of n counts from a by b C-u v x
Example: a r sin(x)^2 := 1-cos(x)^2 read region as written-out macro C-x * m
vector of copies of a value vb
Example: a r cos(n pi) := 1 :: integer(n) :: n%2 = 0 if, else, endif Z [, Z :, Z ]
concatenate into vector |
Example: a r [f(0) := 1, f(n) := n f(n-1) :: n > 0] equal to, less than, member of a =, a <, a {
pack many stack items into vector vp
Put rules in EvalRules to have them apply automatically. repeat n times, break from loop Z <, Z >, Z /
unpack vector or object vu
Put rules in AlgSimpRules to apply during a s command. “for” loop: start, end; body, step Z (, Z )
length of vector (list) v l Common markers: opt, plain, quote, eval, let, remember. save, restore mode settings Z ‘, Z ’
reverse vector v v query user during macro Z#
sort, grade vector V S, V G put finished macro on a key ZK
histogram of vector data V H Numerical Computations
define function with formula ZF
extract vector element v r
edit definition ZE
matrix determinant, inverse V D, & sum formula over a range a +
product of formula over a range a * record user-defined command permanently ZP
matrix transpose, trace v t, VT
tabulate formula over a range a T record variable value permanently sp
cross, dot products V C, *
integrate numerically over a range a I record mode settings permanently mm
identity matrix v i
extract matrix row, column v r, vc find zero of formula or equation a R
find local min, max of formula a N, a X
intersection, union, diff of sets V ^, V V, V - fit data to line or curve a F
cardinality of set V#
mean of data in vector or variable u M Copyright c 2018 Free Software Foundation, Inc.
add vectors elementwise (i.e., map +) V M + median of data H uM designed by Dave Gillespie and Stephen Gildea,
sum elements in vector (i.e., reduce +) V R + for GNU Emacs Calc.
geometric mean of data u G
sum rows in matrix V R _+ sum, product of data u +, u * Released under the terms of the GNU General Public License version 3
sum columns in matrix V R :+ or later.
minimum, maximum of data u N, u X
sum elements, accumulate results V U + sample, pop. standard deviation u S, I u S For more Emacs documentation, and the TEX source for this card, see
the Emacs distribution, or https://www.gnu.org/software/emacs

You might also like