Skip to content

Conversation

@Incarnation-p-lee
Copy link
Contributor

  • Both the positive and negative are included.
  • Add test case for half, single and double floating point.
  • Add sign to interface.

Signed-off-by: Pan Li pan2.li@intel.com

* Both the positive and negative are included.
* Add test case for half, single and double floating point.
* Add sign to interface.

Signed-off-by: Pan Li <pan2.li@intel.com>
…oat-point-sign

Signed-off-by: Pan Li <pan2.li@intel.com>
Signed-off-by: Pan Li <pan2.li@intel.com>

val float_is_negative : fp_bits -> bool
function float_is_negative (op) = {
let struct {sign, _} = float_decompose(op);
Copy link
Contributor Author

@Incarnation-p-lee Incarnation-p-lee May 15, 2024

Choose a reason for hiding this comment

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

I expect here may be {sign, _, _} but it will result in error like below. Not sure if I missed something.

37 |  let struct {sign, _, _} = float_decompose(op);
   |                    ^ previous field wildcard here

Copy link
Collaborator

Choose a reason for hiding this comment

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

That's correct. The wildcard there ignores all fields of the struct, so having two is redundant. I've added a bit more to the error message for this.

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 explain, that make much sense to me.

@github-actions
Copy link

github-actions bot commented May 15, 2024

Test Results

    9 files  ±0     20 suites  ±0   0s ⏱️ ±0s
  641 tests ±0    641 ✅ ±0  0 💤 ±0  0 ❌ ±0 
2 053 runs  ±0  2 052 ✅ ±0  1 💤 ±0  0 ❌ ±0 

Results for commit 0279467. ± Comparison against base commit bf1087f.

♻️ This comment has been updated with latest results.

@Alasdair
Copy link
Collaborator

I think this branch needs rebased, but once that's done I should be able to merge it.

@Incarnation-p-lee
Copy link
Contributor Author

I think this branch needs rebased, but once that's done I should be able to merge it.

Sure, merged upstream/sail2 already.

@Incarnation-p-lee
Copy link
Contributor Author

BTW, github may support rebase code with a simple click in Pull Request. Maybe we can try to enable it, just a proposal here.

@Incarnation-p-lee
Copy link
Contributor Author

Kindly ping, and rebase the upstream branch already.

@Alasdair Alasdair merged commit eee27f0 into rems-project:sail2 May 27, 2024
@Incarnation-p-lee Incarnation-p-lee deleted the panli/introduce-float-point-sign branch May 27, 2024 13:20
@Incarnation-p-lee
Copy link
Contributor Author

Great, thanks a lot.

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