CHAP. 3] FUNCTIONS AND ALGORITHMS 49
Arithmetic moduloMrefers to the arithmetic operations of addition, multiplication, and subtraction where
the arithmetic value is replaced by its equivalent value in the set
{ 0 , 1 , 2 ,...,M− 1 } or in the set { 1 , 2 , 3 ,...,M}
For example, in arithmetic modulo 12, sometimes called “clock” arithmetic,
6 + 9 ≡ 3 , 7 × 5 ≡ 11 , 1 − 5 ≡ 8 , 2 + 10 ≡ 0 ≡ 12
(The use of 0 orMdepends on the application.)
Exponential Functions
Recall the following definitions for integer exponents (wheremis a positive integer):
am=a·a···a(mtimes), a^0 = 1 ,a−m=
1
am
Exponents are extended to include all rational numbers by defining, for any rational numberm/n,
am/n=n
√
am=(n
√
a)m
For example,
24 = 16 , 2 −^4 =
1
24
=
1
16
, 1252 /^3 = 52 = 25
In fact, exponents are extended to include all real numbers by defining, for any real numberx,
ax=lim
r→x
ar, whereris a rational number
Accordingly, the exponential functionf(x)=axis defined for all real numbers.
Logarithmic Functions
Logarithms are related to exponents as follows. Letbbe a positive number. The logarithm of any positive
numberxto be the baseb, written
logbx
represents the exponent to whichbmust be raised to obtainx. That is,
y=logbx and by=x
are equivalent statements. Accordingly,
log 28 =3 since 2^3 = 8 ; log 10100 = 2 since 10^2 = 100
log 264 =6 since 2^6 = 64 ; log 100. 001 =−3 since 10−^3 = 0. 001
Furthermore, for any baseb, we haveb^0 =1 andb^1 =b; hence
logb 1 =0 and logbb= 1
The logarithm of a negative number and the logarithm of 0 are not defined.
Frequently, logarithms are expressed using approximate values. For example, using tables or calculators, one
obtains
log 10300 = 2 .4771 and loge 40 = 3. 6889
as approximate answers. (Heree= 2. 718281 ....)