H09 Practice Soln

At the extreme fltmax and its nearest neighbor have a

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: oat number line has the property that the gaps widen as values grow in magnitude. At the extreme, FLT_MAX and its nearest neighbor have a gap of 2 -23 scaled by 2 127 , which is enormous ~1031! The gap size doubles each time the exponent goes up by one, so for value as small as 2.0, its nearest neighbor is 2 -22 away and this pair will fail to be ApproximatelyEqual. ApproximatelyEqual b) The compiler warns of implicit declarations for the functions a ssert , fopen, and CVectorAlloc , and errors because N ULL is an unknown symbol. The linker will error because it finds no function definitions for assert and CVectorAlloc. Add the missing #include statements below and link with cvector.c or libcevmap. #include #include #include #include <assert.h> <stdio.h> <stdlib.h> "cvector.h" // // // // see see see see macro definition for assert prototype for fopen #define for NULL prototype for CVectorAlloc...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online