很简单的程序: p=0.7+0.3; if p==1 disp('ok') else disp('no') end 结果显示ok,但如果p是三个不为零的数相加如p=0.6+0.3+0.1 则结果显示no 搞了半天还是不明白这是为什么,请教高人指点!