strided intervals: min_int() returns a negative value
- Lingua principale
- Python
- Stelle
- 334
- Fork
- 105
- Merge medio
- 6h 1m
- PR unite (30g)
- 3
Descrizione
In strided intervals, the maximum and minimum values for a given width are returned by four functions, depending on how you want to interpret the bits.
For unsigned interpretation there are `min_int()` and `max_int()`.
For signed interpretation there are `signed_min_int()` and `signed_max_int()`.
Here they are all tested for 32-bit width:
```
StridedInterval.min_int(32) # -0x80000000 <-- ERROR
StridedInterval.max_int(32) # 0xffffffff <-- OK
StridedInterval.signed_max_int(32) # 0x7fffffff <-- OK
StridedInterval.signed_min_int(32) # -0x80000000 <-- OK
```
**Observed behavior:** The unsigned version for 32-bit width returns that the minimum value is -134217728 or -0x80000000.
**Expected behavior:** It should return 0, the truly minimum value in unsigned interpretation.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.