Skip to content

Commit

Permalink
Add docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
twizmwazin committed Sep 21, 2024
1 parent a4a7974 commit 29e5800
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion claripy/fp.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@ def normalize_helper(self, o):


class RM(Enum):
# see https://en.wikipedia.org/wiki/IEEE_754#Rounding_rules
"""Floating point rounding mode, as defined by IEEE754.
See this wikipedia entry for details:
https://en.wikipedia.org/wiki/IEEE_754#Rounding_rules
"""

RM_NearestTiesEven = "RM_RNE"
RM_NearestTiesAwayFromZero = "RM_RNA"
RM_TowardsZero = "RM_RTZ"
Expand Down Expand Up @@ -66,6 +71,10 @@ def pydecimal_equivalent_rounding_mode(self):


class FSort:
"""Floating point sort, desribing the size of the exponent and mantissa for
an IEEE754 floating point number.
"""

def __init__(self, name, exp, mantissa):
self.name = name
self.exp = exp
Expand Down Expand Up @@ -106,6 +115,9 @@ def from_params(exp, mantissa):


class FPV(BackendObject):
"""Floating point value. A concrete floating point value with a specific
sort (FSORT_FLOAT or FSORT_DOUBLE)."""

__slots__ = ["sort", "value"]

def __init__(self, value, sort):
Expand Down

0 comments on commit 29e5800

Please sign in to comment.