Closed oscbyspro closed 2 weeks ago
Hm. I suspect that the inverse might be more appropriate. The implementation and behavior of DataInt/isExtended is much more similar to DataInt/isNormal. Both would perform an inequality check and return true when DataInt.Body/isEmpty.
This is the moment when you wish computers worked at the bit level so you could reasonably use DataInt\<U1> and call DataInt/isNormal instead of introducing a new concept. Like, I could call it DataInt/isNormal(Bit.self) or something to that effect. Alternatively, I could add a bitwise view but I have done that twice and removed it twice already.
Perhaps some conveniences is enough:
body.last?.msb != appendix
Asking whether the last bit in the body extends the bit pattern is another useful query. It is not complicated, but it is quite wordy so it might deserves a name. It's currently simpler to go through DataInt/entropy(), which is obviously a roundabout way of doing it.