H09 Practice Soln

cur cur heapend cur count nwords left inuse

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: v block incl hdr *refs[i] = cur + 1; // update master cur += nWords; } if (heapEnd != cur) *cur = (heapEnd - cur); // count = nwords left, inuse bit off Problem 4: Short answer a) The float value 1.0 is represented as 0 01111111 00000000000000000000000 (sign, biased exponent, mantissa) and the first distinct float > 1.0 is 0 01111111 00000000000000000000001 is the difference between these two and is equal to difference in their mantissas (2 -23) scaled by 20 (0 is their exponent). 2 -23 is ~10-7. Its bit pattern is: FLT_EPSILON 0 01100100 00000000000000000000000 accepts absolute error using the gap size appropriate for floats near 1.0. However, the fl...
View Full Document

Ask a homework question - tutors are online