Functions: examples
function floor(x:real):integer
states that the domain of the floor function is the set of real numbers and
its codomain is the set of integers.
The domain and codomain of functions are often specified in
What is the range of floor?
--- The same as its codomain.
Let the function double: Z ? Z be defined by double(x)=2x.
What is the range of double?
--- The set of even integers.
P.S. Some important sets:
Z - the set of integers ({...-3, -2, -1, 0, 1, 2 , 3, …})
N - the set of natural numbers ({0, 1, 2, 3, …})
R - the set of real numbers