Operation between data of different bit lengths
Open
stdlib
- Dominant language
- Python
- Stars
- 16.8k
- Forks
- 603
- Avg merge
- 4d 23h
- Merged PRs (30d)
- 6
Description
I've tried performing a multiplication operation with integers (Int[N]) of different bit lengths and encountered an error. It seems that operations between different bit lengths are not currently supported for Int[N]. Is it possible to create a new class that supports operations between differing bit lengths? If so, how should I specify the bit length of each argument in the definition of the operation function?
```
a = Int[12](20)
b = Int[8](15)
c = a * b
print(c)
error: unsupported operand type(s) for *: 'Int[12]' and 'Int[8]'
```
Contributor guide
Assessment
This issue has not been assessed yet.