In the abstract mathematical world, numbers are separated into different categories based on the operations you can perform on them. In the world of computers, categories differ based on representation. For example, in mathematics, there is no difference between 6/3 and 2, but on a computer, the first is represented by two integers and the second by one integer. At the most basic level, in mathematics, there are integers. These are numbers that we use most often (e.g. 1, 2, 3, 4, etc.), are the easiest to comprehend and represent, and are used by most computing devices. The next category of numbers in mathematics includes rational numbers. Rational numbers are defined to be anything that can be expressed as one integer divided by another integer. The next category includes real numbers. A real number is a value that is capable of being expressed in decimal notation (e.g. using a finite or infinite number of digits). The final category of numbers in the mathematical world includes complex numbers which are typically expressed as a+bi, where a and b are real numbers, and i is an imaginary unit representing √−1.
These abstract mathematical types are difficult to represent and interact with using a computer. As noted above, most computers use the integer category of numbers. Computers further sub-divide this category into more specific types, such as 8-bit integers, 16-bit integers, and several others. Numbers with a decimal point are commonly represented using floating point types, which approximate a real number to a particular precision. Furthermore, software programming languages allow the software developer to declare a variable that has a numeric type that matches these sub-divisions. In computer programming, if a programming language requires that all variables be of a specific type, then that language is called statically typed (or strongly typed).
One common problem that occurs with statically typed languages is the difficulty in performing basic mathematical operations between two different strongly-typed numeric types. For example, suppose you have a first variable that is an integer. Further suppose that you have a second variable that is a floating point number. If you try and perform an addition operation between the first variable and the second variable, you could receive a type conversion error.