Skip to content
  • Sven Tennie's avatar
    da1a072c
    Add support for floating-point expressions · da1a072c
    Sven Tennie authored and sheaf's avatar sheaf committed
    
    This commit adds support for testing floating-point expressions.
    
    The Expr datatype is separated into IExpr (integer expressions) and
    FExpr (floating-point expressions).
    
    We use a coarser notion of equality for floating-point expression,
    wherein any two NaN values compare equal. This is because GHC does
    not (yet) preserve NaN signs or payloads according to the IEEE754
    specification. It is hoped that this workaround can be lifted in
    the future after the appropriate improvements are made to GHC's
    support of floating point.
    
    Also adds some simple parser round-tripping tests that check that
    the Show instance of Expr is compatible with the parser.
    
    Co-authored-by: sheaf's avatarsheaf <sam.derbyshire@gmail.com>
    da1a072c
    Add support for floating-point expressions
    Sven Tennie authored and sheaf's avatar sheaf committed
    
    This commit adds support for testing floating-point expressions.
    
    The Expr datatype is separated into IExpr (integer expressions) and
    FExpr (floating-point expressions).
    
    We use a coarser notion of equality for floating-point expression,
    wherein any two NaN values compare equal. This is because GHC does
    not (yet) preserve NaN signs or payloads according to the IEEE754
    specification. It is hoped that this workaround can be lifted in
    the future after the appropriate improvements are made to GHC's
    support of floating point.
    
    Also adds some simple parser round-tripping tests that check that
    the Show instance of Expr is compatible with the parser.
    
    Co-authored-by: sheaf's avatarsheaf <sam.derbyshire@gmail.com>
Loading