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

Implement broken/missing arithmetic methods #23

Open
1 of 5 tasks
mark-koch opened this issue Sep 26, 2023 · 0 comments
Open
1 of 5 tasks

Implement broken/missing arithmetic methods #23

mark-koch opened this issue Sep 26, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@mark-koch
Copy link
Collaborator

mark-koch commented Sep 26, 2023

  • __pow__ for int and float. Either add native support in Hugr or implement via loop? Note that there are also some typing issues: 2 ** 2 = 2 is int but 2 ** -1 = 0.5 is float in Python!
  • __round__ for float
  • __lshift__ etc are broken: Shifts in the arithmetic extension treat the RHS as unsigned. We either have to change this or have special logic that treats compilation of negative shifts
  • Double check the Hugr spec for iabs: Does it return signed or unsigned ints?
  • Use devision ops with panic once they are added to Hugr (c.f. chore: Bump to latest Hugr version #52)
@ss2165 ss2165 added the bug Something isn't working label Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants