Title: Theory / Unimportant / CS / Hardware / What every computer scientist should know about floating point arithmetic+170

Question: What is the difference between int and float which cause the need for rounding in float only
Answer: An arbitrary real may require an infinite number of bits, while an arbitrary int requires a finite (unbounded) number of bits
Page: 137
Section: Rounding error

Name: A base
Page: 174
Section: Floating-point formats
Denoted by: \(\beta\)
Assuming: Even

Name: A precision
Typ: Positive int
Page: 174
Section: Floating-point formats
Denoted by: \(p\)

Name: The significand of \(f\)
Definition: \(d_0.d_1\dots d_{p-1}\)
Page: 174
Section: Floating-point formats
Variables: \(\beta\) an even base
\(p\) a precision
\(f=\pm d_0.d_1d_2\dots d_{p-1}\times\beta^c\)
Name2: The mantissa of \(f\)

Definition: \(\pm\left(\sum_{i=0}^{p-1}d_i\beta^{-i}\right)\beta^e\)
Page: 174
Section: Floating-point formats
Variables: \(\beta\) an even base
\(p\) a precision
Notation: \(\pm d_0.d_1d_2\dots d_{p-1}\times\beta^e\)

Name: A floating-point number
Definition: A number which can be represented in the floating-point format
Page: 174
Section: Floating-point formats
Variables: \(\beta\) an even base
\(p\) a precision

Definition: The highest possible exponant
Page: 174
Section: Floating-point formats
Context: Floating-point arithmetic
Notation: \(e_{\text{max}}\)

Definition: The lowest possible exponant
Page: 174
Section: Floating-point formats
Context: Floating-point arithmetic
Notation: \(e_{\text{min}}\)

Question: Why can a real not be a floating-point number ?
Answer: Either it has an infinite number of non-zero bits
Page: 175
Section: Floating-point formats
Variables: \(\beta\) an even base
\(p\) a precision
Answer2: Or its absoluve value is not in \([\beta^{e_{\text{max}}+1},\beta^{e_{\text{min}}}\)

Name: A normalized representation
Definition: A representation \(\pm d_0.d_1d_2\dots d_{p-1}\times\beta^c\) with \(d_0\) being 1
Page: 175
Section: Floating-point formats
Variables: \(\beta\) an even base
\(p\) a precision
\(e_{\text{min}}\), \(e_{\text{max}}\)
Context: Floating point

Name: The units in the last place error of \(f\) as a representation of \(z\)
Definition: [$]\abs{d_0.d_1\dots d_{p-1}-\frac z{\beta^e}}\beta^{p-1}[/$]
Page: 176
Section: Relative error and Ulps
Variables: \(\beta\) an even base
\(p\) a precision
\(e_{\text{min}}\), \(e_{\text{max}}\)
\(z\) a real
\(f=\pm d_0.d_1d_2\dots d_{p-1}\times\beta^e\) a floating point number
Abbreviation: ULPS
Assuming: \(z\in [\beta^{e_{\text{max}}+1},\beta^{e_{\text{min}}}\)

Name: The relative error of \(f\) as a representation of \(z\)
Definition: [$]\frac{\abs{f-z}}{\abs{z}}[/$]
Page: 176
Section: Relative error and Ulps
Variables: \(\beta\) an even base
\(p\) a precision
\(e_{\text{min}}\), \(e_{\text{max}}\)
\(z\) a real
\(f=\pm d_0.d_1d_2\dots d_{p-1}\times\beta^e\) a floating point number