This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: 12 const char* ptr1 = strstr(packet, "XXXX"); 13 if (ptr1  packet < 0  ptr1  packet > URL_LEN_LIMIT) 14 return false; 15 memcpy(src, packet, ptr1  packet); 16 src[ptr1  packet] = 0; 17 return true; 18 } 19 20 void report_log(dst) { 21 char log[1024]; 22 sprintf(log, "[%2d%2d2d %2d:%2d:%2d] %s", . .., dst); 23 } format: There is a sign bit in the most significant bit. The next k = 5 bits are the exponent. The last n= 10 bits are the fractional part. Bias is 15. Numeric values are encoded in this format as a value of the form (1) s * M * 2 E , where s is the sign bit, E is exponent after biasing, and M is the significand. Fill the following table for this floating point representation. Description E M Value 0 Smallest denorm Largest denorm Smallest norm 1 Largest norm...
View
Full
Document
This note was uploaded on 10/19/2011 for the course CS 000 taught by Professor Jing during the Fall '10 term at Fudan University.
 Fall '10
 jing

Click to edit the document details