Environmental Engineering Reference
In-Depth Information
Table 1.1 Bit usage for
double
Bits
Usage
63
Sign (0
¼
positive, 1
¼
negative)
62 to 52
Exponent, biased by 1,023
51 to 0
Fraction f of the number 1.f
Table 1.2 Standard operator
symbols
Symbol
Operation
+
Addition
Subtraction
*
Multiplication
/
Division
^
Power
( )
Specify evaluation order
Every number that has more than 53 binary digits, which corresponds to 17
decimal digits, 8 can not be represented exactly on a computer, as a double. Note that
53 binary digits are considered although the significant requires 52 bits only. This is
due to the convention that every number is converted to a form which has a single
non-zero digit in front of the dot. Example: 0.01 is represented as 1
10 2 in the
:
0
2 4 in the binary system on
decimal system, but as 1.10011001100110011001101
the computer.
As there is only one non-zero number in the binary system (1), the first signifi-
cant digit is always the same and does not have to be considered in the number
representation. The idea goes back the very early days of computers, when it was
already utilized by Zuse. 9
We have to realize that despite of its enormous computation capacity numbers
can only be represented with a certain accuracy. Only certain numbers are
represented exactly. An accuracy measure is given by the distance from 1.0 to
the next
is 2 52
largest double-precision number,
that
and is called within
MATLAB
as
®
Due to rounding the error of a result after mathematical operations may be
significantly below the 17-digit limit for doubles, resp. the 8-digit limit for singles.
We will demonstrate this in the following exercise. Numbers represented exactly in
the decimal system, may be represented with an error in the binary system
(Table 1.2 ).
8 For the conversion recall that 2 10
10 3 .
9 Konrad Zuse (1910-1995), German computer pioneer.
¼
1024
Search WWH ::




Custom Search