【发布时间】:2011-11-15 13:07:25
【问题描述】:
在我的笔记中我有类似的东西
If (Guard & !Round & !Sticky)
If (LSB == 1)
LSB += 1
Else If (Guard)
LSB += 1
End If
所以我可以把它简化为
If Guard Then
LSB += 1
【问题讨论】:
标签: floating-point rounding ieee-754
在我的笔记中我有类似的东西
If (Guard & !Round & !Sticky)
If (LSB == 1)
LSB += 1
Else If (Guard)
LSB += 1
End If
所以我可以把它简化为
If Guard Then
LSB += 1
【问题讨论】:
标签: floating-point rounding ieee-754
没有。这个案子呢?
Guard==true
Sticky==false
Round==false
LSB==0
在这种情况下,原始代码不会执行LSB += 1,而你的会。
【讨论】:
Guard & Sticky & !LSB,它将从Else 执行LSB += 1?或者你的意思是Guard & !Sticky & !LSB?