0
를 나타낸다. 플로트 부적절한 값 터보 C
그냥 다른 부분에 정확하게 위의 코드에 대한#include<stdio.h>
void main()
{
float a=0.8;
clrscr();
if(a<0.8)
printf("value from if a %f",a);
else
printf("value from else a %f",a);
getch();
}
출력 else
에서이다이 뜻 출력을 아래의 코드를 확인.
else
에
if
다른 사람에게 간다 간다 0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9
0.7,0.9로했습니다.
친절하게이 변형을 설명합니다.
* 모든 컴퓨터 과학자가 부동에 대해 알아야 할 점 * (http://docs.sun.com/source/806-3568/ncg_goldberg.html) -와 http://stackoverflow.com/questions/4664662/understanding-floating-point-problems에있는 다른 답변 – usr2564301