Notes - Continuous Mathematics HT23, Floating point numbers
Flashcards
What is the most common form of a computer representation of real numbers, in terms of $p$, $m$ and $e$?
\[\pm \left( 1 + \frac{m}{2^p} \right)\cdot 2^e\]
In the computer representation of real numbers as
\[\pm \left( 1 + \frac{m}{2^p} \right)\cdot 2^e\]
How many bits are used for the binary representation of $m$?
\[p\]
a == b
How should you modify this code when a
and b
are floats?
a == b
a
and b
are floats?abs(a - b) < small
What is the definition of machine epsilon?
The quantity $\epsilon$ such that every real number $x \in \mathbb R$ can be stored as $\tilde x$ with relative error no more than $\epsilon$.