Skip to content

Adds tests for comparison operators, and fixes a bug.#7

Merged
SupunS merged 2 commits intomainfrom
dete/compareTests
Sep 3, 2025
Merged

Adds tests for comparison operators, and fixes a bug.#7
SupunS merged 2 commits intomainfrom
dete/compareTests

Conversation

@dete
Copy link
Copy Markdown
Collaborator

@dete dete commented Sep 3, 2025

Adds tests and fixes a bug that impacted Fix128 values.

if isEqual64(a.Hi, b.Hi) {
// If the high parts are equal, compare the low parts.
return slt64(a.Lo, b.Lo)
return ult64(a.Lo, b.Lo)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh so the bug was that slt64() converts the uint64 low-bits to int64 and thats a lossy-conversion?

@SupunS SupunS merged commit 115980c into main Sep 3, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants