1. Engineering
  2. Computer Science
  3. 1 n lecture we learned that the number 110 01...

Question: 1 n lecture we learned that the number 110 01...

Question details

1. În lecture we learned that the number 1/10 0.1 cannot be represented exactly in binary floating point ụist like 1/3 0.333. cannot be represented exactly in decimal floating point). However, this fact is hidden by the way that Matlab outputs numbers. To see this, try the commands: format short e; format long e; You can display the nearest (d1)-digit decimal floating point number to a binary floating point number r using the command fprintf(%. *ein, , d, x) ; How big do you need to make d so that this command shows that x = 0.1 is not represented exactly? (Experiment with different values of d and find the smallest.)

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution