-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Address code review comments, typos, improve documentation.
- Loading branch information
1 parent
1c0b024
commit 61f0506
Showing
5 changed files
with
42 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
----------------------------------------------------------------------- | ||
-- | | ||
-- Module : What4.FloatMode | ||
-- Description : | ||
-- Description : Mode values for controlling the "interpreted" floating point mode. | ||
-- Copyright : (c) Galois, Inc 2014-2022 | ||
-- License : BSD3 | ||
-- Maintainer : [email protected] | ||
-- Stability : provisional | ||
-- | ||
-- Desired instances for the @IsInterpretedFloatExprBuilder@ class are selected | ||
-- via the different mode values from this module. | ||
------------------------------------------------------------------------ | ||
{-# LANGUAGE DataKinds #-} | ||
{-# LANGUAGE FlexibleContexts #-} | ||
|
@@ -34,8 +37,20 @@ data FloatMode where | |
FloatIEEE :: FloatMode | ||
FloatUninterpreted :: FloatMode | ||
FloatReal :: FloatMode | ||
|
||
-- | In this mode "interpreted" floating-point values are treated | ||
-- as bit-precise IEEE-754 floats. | ||
type FloatIEEE = 'FloatIEEE | ||
|
||
-- | In this mode "interpreted" floating-point values are treated | ||
-- as bitvectors of the appropriate width, and all operations on | ||
-- them are translated as uninterpreted functions. | ||
type FloatUninterpreted = 'FloatUninterpreted | ||
|
||
-- | In this mode "interpreted" floating-point values are treated | ||
-- as real-number values, to the extent possible. Expressions that | ||
-- would result in infinities or NaN will yield unspecified values in | ||
-- this mode, or directly produce runtime errors. | ||
type FloatReal = 'FloatReal | ||
|
||
data FloatModeRepr :: FloatMode -> Type where | ||
|