# 宣告为Single与宣告为Double所计算出来的值为何不同呢？

Posted by Edware Lin on May 30, 1998 at 20:29:17:

Dim x As Single, y As Single, z As Single
x = 50.234
y = 49
y = x - y
Text1.Text = y

上述Text1.Text=1.234001
倘若我将x,y,z型态改为Double就会得到1.234，
本想是否是小数位设太多，single型态无容纳，
于是将x设为50.2，结果当x,y,z为single型态时，
Text1.Text=1.200001, 此结果并不正确，当均设
为Double型态时，所得的结果才正确，不晓得
可否为我解答这个困惑呢？

Follow Ups:

- 正常现象 小吴 18:33:24 5/31/98 (1)
  - Re: 正常现象 Edward Lin 22:37:21 5/31/98 (0)