summaryrefslogtreecommitdiff
path: root/src/literal.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/literal.h')
-rw-r--r--src/literal.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/literal.h b/src/literal.h
index ae628149e..aa9fd9705 100644
--- a/src/literal.h
+++ b/src/literal.h
@@ -71,9 +71,11 @@ public:
int64_t getInteger() const;
double getFloat() const;
int64_t getBits() const;
+ // Equality checks for the type and the bits, so a nan float would
+ // be compared bitwise (which means that a Literal containing a nan
+ // would be equal to itself, if the bits are equal).
bool operator==(const Literal& other) const;
bool operator!=(const Literal& other) const;
- bool bitwiseEqual(const Literal& other) const;
static uint32_t NaNPayload(float f);
static uint64_t NaNPayload(double f);
@@ -130,6 +132,9 @@ public:
Literal rotL(const Literal& other) const;
Literal rotR(const Literal& other) const;
+ // Note that these functions perform equality checks based
+ // on the type of the literal, so that (unlike the == operator)
+ // a float nan would not be identical to itself.
Literal eq(const Literal& other) const;
Literal ne(const Literal& other) const;
Literal ltS(const Literal& other) const;