guppylang
guppylang copied to clipboard
Implement broken/missing arithmetic methods
- [ ]
__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 = 2is int but2 ** -1 = 0.5is 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? - [x] Use devision ops with panic once they are added to Hugr (c.f. #52)