With the following code,
#include <stdio.h>
int main(void){
float x;
x=(float)3.3==3.3;
printf("%f",x);
return 0;
}
the output is 0.00000
but when the number 3.3 is replaced with 3.5,
#include <stdio.h>
int main(void){
float x;
x=(float)3.5==3.5;
printf("%f",x);
return 0;
}
the output is 1.0000
Why is there a difference in output?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…