Homework problem 238 category 1 fill in the following

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: and double-precision floating point. In addition, the machines use the round-to-even rounding mode. Unfortunately, since the C standard does require the machine use IEEE floating point, there are no standard methods to change the rounding mode or to get special values such as ¼, ·½, ½, or Æ Æ . Most systems provide a combination of include (‘.h’) files and procedure libraries to provide access to these features, but the details vary from one system to another. For example, the GNU compiler GCC defines macros INFINITY (for ·½) and NAN (for Æ Æ ) when the following sequence occurs in the program file: #define _GNU_SOURCE 1 78 #include <math.h> CHAPTER 2. REPRESENTING AND MANIPULATING INFORMATION Practice Problem 2.27: Fill in the following macro definitions to generate the double-precision values ·½, ½, and ¼. #define POS_INFINITY #define NEG_INFINITY #define NEG_ZERO #endif You cannot use any include files (such as math.h), but you can make use of the fact that...
View Full Document

Ask a homework question - tutors are online