Real number

From HvWiki

A real number is a number that can be described by an infinite (or shorter) sequence of decimals. Denoted by the symbol \mathbb{R}.


Values belonging to the classification of real numbers

-7
9.27
\sqrt{2} \approx 1.41421356...
\pi \approx 3.14159265...
1/7 \approx 0.142857142857142857...

Values not belonging to the classification of real numbers

\sqrt{-1}

Interesting properties of real numbers

Integers might be infinite (think of the biggest number you can - then add 1) but real numbers are also uncountable. Roughly speaking, that means that there are more real numbers than you can possibly imagine, and even then, you can throw away an infinite number of them and still have an infinite number left! See [[1]]

This also means that the floating-point numbers used on computers are not proper real numbers, because the computer only recognizes a finite number of them, although some programming languages call them "reals". This leads to rounding errors that any serious programmer should know about.

Some languages (originally MacLisp) do have a better approximation to a real number type, whose number of digits is only limited by available memory. This is sometimes referred to as a bignum.