This question is based on the paper What Every Computer Scientist Should Know About Floating-Point Arithmetic by David Goldberg. In the section 1.2 Relative Error and Ulps (