포인팅 : http://csapp.cs.cmu.edu패트리어트 미사일 부동 컴퓨터 시스템에서 오류
연습 문제 2.51
에게 프로그래머의 관점 우리는 패트리어트 미사일 소프트웨어가 X =
0.00011001100110011001100(binary).
한다고 가정으로 0.1 근사 것을 문제 2.46에서 본 대신 그들은 IEEE round-to-even 모드를 사용하여 이진 포인트의 오른쪽에 23 비트의 근사값 x '를 0.1로 결정했습니다.
A. x '의 이진 표현은 무엇입니까?
from the solution at the back of book,
Looking at the nonterminating sequence for 1/10, we can see that the 2 bits to the right of the rounding position are 1, and so a better approximation to 1/10 would be obtained by incrementing x to get x′ = 0.00011001100110011001101, which is larger than 0.1.
B. x '- 0.1의 십진수는 대략 무엇입니까?
The solution says it's
We can see that x′ − 0.1 has binary representation: 0.0000000000000000000000000[1100]
Comparing this to the binary representation of 1 , we can see that it is 2^−22 × 0.1 , which is around 2.38 x 10^-8
(B)에 대한 나의 질문은 우리가 어떻게
x' - 0.1 == 0.0 0000 0000 0000 0000 0000 0000[1100] ?
내 계산 (두 배 어떤 솔루션을 말한다)