【问题标题】:IEEE 754 Floating Point Round to NearestIEEE 754 浮点舍入到最近
【发布时间】: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


    【解决方案1】:

    没有。这个案子呢?

    Guard==true
    Sticky==false
    Round==false
    LSB==0
    

    在这种情况下,原始代码不会执行LSB += 1,而你的会。

    【讨论】:

    • Err ...等等我的第一段代码错了吗?如果Guard & Sticky & !LSB,它将从Else 执行LSB += 1?或者你的意思是Guard & !Sticky & !LSB
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-06-09
    • 2012-01-20
    • 2012-01-06
    • 2014-10-18
    • 1970-01-01
    • 2014-12-10
    相关资源
    最近更新 更多