Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Float: Introduce floating point api eq #567

Merged

Conversation

Incarnation-p-lee
Copy link
Contributor

@Incarnation-p-lee Incarnation-p-lee commented Jun 3, 2024

  • The eq(equal) api(s) introduced.
  • Add new type fp_bits_x2.
  • Add new type fp_bool_and_flags.
  • Overload operator == for test to compare fp_bool_and_flags tuple.
  • Add test cases for half, single and double floating point.
  • Add eq(equal) to interface.

* The eq(equal) api(s) introduced.
* Add new type fp_bits_x2.
* Add new type fp_bool_and_flags.
* Add new operator ==_t to compare fp_bool_and_flags tuple.
* Add test cases for half, single and double floating point.
* Add eq(equal) to interface.

Signed-off-by: Pan Li <[email protected]>
Copy link

github-actions bot commented Jun 3, 2024

Test Results

    9 files  ±0     20 suites  ±0   0s ⏱️ ±0s
  645 tests ±0    645 ✅ ±0  0 💤 ±0  0 ❌ ±0 
2 057 runs  ±0  2 056 ✅ ±0  1 💤 ±0  0 ❌ ±0 

Results for commit dcd7558. ± Comparison against base commit 1edb36b.

♻️ This comment has been updated with latest results.

@Incarnation-p-lee
Copy link
Contributor Author

This PR may conflict with #565 , thus we need something like rebase after #565 merged.

@Alasdair
Copy link
Collaborator

Alasdair commented Jun 3, 2024

I'm away today, but it shouldn't be a problem for me to do a rebase before merging when I'm back.

@Incarnation-p-lee
Copy link
Contributor Author

I'm away today, but it shouldn't be a problem for me to do a rebase before merging when I'm back.

No hurry and take your time. You can review #565 first and then I can do the rebase anyway. I am afraid that you may review these 2 PR(s) and then merge. Then you may need to resolve the conflict, which is my duty.

@@ -74,4 +77,13 @@ function float_decompose(op) = {
}
}

/* Floating point operator implementations */
infix 2 ==_t /* The suffix _t indicates tuple */
Copy link
Contributor

Choose a reason for hiding this comment

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

I think these are bad for readability and it would be better to just spell it out.

Copy link
Contributor

Choose a reason for hiding this comment

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

Or just scoped to the test file.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Within a test file you could do $include <generic_equality.sail> and use ==, but it shouldn't be included in ordinary library code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for comments, that make sense to me, will update it after #565 .

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Rebase and updated.

@Incarnation-p-lee
Copy link
Contributor Author

Kindly ping for this PR, thanks!

@Alasdair Alasdair merged commit 069bbcd into rems-project:sail2 Jun 13, 2024
3 checks passed
@Incarnation-p-lee Incarnation-p-lee deleted the panli/introduce-float-point-eq branch June 14, 2024 02:24
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.

3 participants