Lecture 1B: first week, second lecture
Summary of SINGLE Floating Point representation
f.p. system: larger number has larger gaps in between.
ÊǹÊÒâ°ÑgapԽдԽ´óµÄ¡£
Copyright By PowCoder代写 加微信 powcoder
Simplified toy system:
0 is not a subnormal number, it is too important to be a subnormal number.
Precision: number of bits in the significant(including the hidden bit)
machine epsilon
gap between 1 and next largest f.p. num
Key point:
53 bits of accuracy,
corresponds to 16 digits accuracy
corresponds to 7 decimal digits of accuracy
All finite IEEE f.p. number can be written as
largest finite IEEE f.p. num is
smallest positive normalized f.p. number is
smallest positive subnormal is
We say is in the normalized range if
There are two way to represent 0: positive 0 and negative 0
Suppose x is not a f.p. num, either:
Let be f.p. number closest to x, that is <= x Let be.....................................>= x
The IEEE standard defines 4 rounding modes:
ROUND DOWNW: ROUND UP:
ROUND TOWARD ZERO:
ROUND TO NEAREST(most often used rounding mode, default)
IMPORTANT EXCEPTION for ROUND TOWARD NEAREST:
ABSOLUTE ROUNDING ERROR
difference between round(x) and x itself, less than gap
When round to nearest is in effect(almost always)
RELATIVE ROUNDING ERROR
measures number of bits to which x and round(x) agree
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com