Find the binary representation of x 103 Find the floatingpo

Find the binary representation of x = 10/3. Find the floating-point representation of x = 10/3. Find the exact difference fl(x) - x. What is the relative rounding error?

Solution

Solution: Given decimal number is x= 10/3= 3.333

Now       

3/2    quotient =1 remainder = 1

1/2   quotient =0 remainder = 1

Here integer part 3 is equivalent to 112

So 310 = 112

Also

0.333x2   product = 0.666   integer part = 0

0.666x2   product = 1.332 integer part = 1

0.332x2   product = 0.664 integer part = 0

0.664x2   product = 0.664 integer part = 0

0.664x2   product = 1.328 integer part = 1

0.328x2   product = 0.656 integer part = 0

0.656x2   product = 1.312 integer part = 1

So 0.33310 =0.01001012

So 3.33310 = 11.01001012

Floating point representation:

Here decimal number is x= 10/3= 3.333=2x1.666

Now 110 = 12 and 0.66610 = 0.1001012 (from above)

So 1.66610= (1.1001012 )x21

Hence floating representation is

The presence of the factor 2E is inconvenient, and so the relative

rounding error associated with x is defined to be
\\delta = (round(x)/x - 1)

=\\frac{round(x)}{x} - 1 = \\frac{round(x) -x}{x} =

0 E = 1 1.10010100
 Find the binary representation of x = 10/3. Find the floating-point representation of x = 10/3. Find the exact difference fl(x) - x. What is the relative round

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site