September 2013
Intermediate to advanced
350 pages
9h 38m
English
We’ve now seen two types of numbers (integers and floating-point numbers), so we ought to explain what we mean by a type. In computing, a type consists of two things:
For example, in type int, the values are …, -3, -2, -1, 0, 1, 2, 3, … and we have seen that these operators can be applied to those values: +, -, *, /, //, %, and **.
The values in type float are a subset of the real numbers, and it happens that the same set of operations can be applied to float values. If an operator can be applied to more than one type of value, it is called an overloaded operator. We can see what happens when these are applied to various values in Table 1,
Read now
Unlock full access