Functions

In the top right corner of the screen you will find a pop-up list named 'func'. The list gives you access to a number of functions for quick reference. The functions are taken from a memo called 'functions' in the 'PawCalc' Memo Pad category. You can use the list in the "functions.txt" file or you can write your own list. The memo starts with the 'functions' keyword following by a one-word name for the list. Then it lists a series of names in quotes. Each name corresponds to an entry in the 'func' pop-up list.

Below you will find a list of functions recognized by PawCalc. (All examples assume degree and not radian mode.)

Name Description Example
^ power 4^2 = 16, (1+2i)^2 = -7+24i
_ root 16_2 = 4
% remainder 7%2 = 1
\ integer division 7\2 = 3
exp exponential function base e exp 2 = e^2
10^ exponential function base 10 10^3 = 1000
ln natural logarithm ln exp 4 = 4
log base 10 logarithm log (10^5) = 5
sin sine sin 180 = 0
cos cosine cos 180 = -1
tan tangent tan 180 = 0
asin arcus sine asin 1 = 90
acos arcus cosine acos 0 = 90
atan arcus tangent atan 1 = 45
sinh hyperbolic sine
cosh hyperbolic cosine
tanh hyperbolic tangent
asinh area hyperbolic sine
acosh area hyperbolic cosine
atanh area hyperbolic tangent
erf error function
erfc complement error function
fac factorial fac 4 = 4! = 24
gamma gamma function gamma 5 = (5-1)! = 24
nPr permutations 10 nPr 3 = 720
nCr combinations 10 nCr 3 = 120
sign sign sign -5 = -1
abs modulo (or absolute value) abs -5 = 5
mod modulo (or absolute value) mod (3+4i) = 5
frac fractional part frac 1.2 = 0.2
round round round 1.8 = 2, round -1.2 = -1
trunc trunc trunc 1.8 = 1, trunc -1.2 = -1
ceil ceiling ceil 1.8 = 2, ceil -1.2 = -1
floor floor floor 1.8 = 1, floor -1.2 = -2
conj conjugate conj (3+4i) = 3-4i
re real part re (3+4i) = 3
im imaginary part im (3+4i) = 4i
arg argument of complex number arg (1+i) = 45
sqrt square root sqrt 16 = 4
and bitwise and 0b1100 and 0b0101 = 0b0100
or bitwise or 0b1100 or 0b0101 = 0b1101
not bitwise inversion not 0b0101 = 65530
xor bitwise exclusive or 0b1100 xor 0b0101 = 0b1001
xnor bitwise exclusive nor 0b1100 xnor 0b0101 = 0b0110
xnr same as xnor
& logical and 1 and 1 = 1
| logical or 0 or 1 = 1
! prefix: logical negation !1 = 0
! postfix: factorial 5! = 120
rand random number between 0 and 1
isfinite 1 if argument is finite, 0 otherwise isfinite (1/0) = 0

All functions for trigonometry work in degrees or radians depending on the settings in the preferences.

The bitwise functions work on 16 bit numbers. The logical functions treat 0 as false and everything else as true. The result is always 0 for false or 1 for true.

Most functions allow both real and complex arguments. All arcus and area trigonometry functions, factorial, gamma and the error functions, and permutations and combinations functions do not work with complex numbers - the imaginary part of the argument is simply assumed to zero. Functions like rounding, sign, and fraction on complex numbers work on the real and imaginary parts in turn. Thus 'sign(3-4i)' is 1-i.