2.91 π

Problem:

Around 250 B.C., the Greek mathematician Arichimedes proved that 223/71 < π < 22/7. Had he had access to a computer and the standard library <math.h>, he would have been able to determine that the single-precision floating-point approximation of π has the hexadecimal representation 0x40490FDB. Of course, all of these are just approximations, since π is not rational.

A. What is the fractional binary number denoted by this floating-point value?

0 10000000 10010010000111111011011

float number:

0b11.0010010000111111011011

B. What is the fractional binary representation of 22/7?

22/7=3+1/7

0b11.001001001(001)...

C. At what bit position (relative to the binary point) do these two approximations to π diverge?

9th

Last updated