2014年3月10日

浮点数的陷阱 转载自(taesimple)

摘要: 陷阱1 [cpp] view plaincopyprint? double i; for(i = 0; i != 10; i += 0.1) printf("%.1lf\n", i); 程序会打印至10.0时结束循环吗?不会。因为i永远也不可能等于... 阅读全文

posted @ 2014-03-10 21:36 胖胖的乓乓 阅读(150) 评论(0) 推荐(0) 编辑

导航