David Bishop writes:
> 1) Added functions "add_sign" and "remove_sign" to convert between
> SIGNED and UNSIGNED types. "add_sign" would add a '0' sign bit
> and increase the vector by 1 bit. "remove_sign" would do an "abs"
> and remove the sign bit, shrinking the vector by 1 bit.
It's late over here, but how would the corner case of -(2**n)/2 be
dealt with? Say we have an 8bit signed, which can have a value of
-128. If the size of the vector would be reduced by one, we'd end up
with a vector of zeros :-/
Best regards,
Marcus
Received on Mon Oct 25 14:23:54 2004
This archive was generated by hypermail 2.1.8 : Mon Oct 25 2004 - 14:25:06 PDT