lfpinit() signed or unsigned?
Hal Murray
hmurray at megapathdsl.net
Sun Mar 12 07:25:44 UTC 2017
Stromeko at nexgo.de said:
> Does anybody know of an implementation that does _not_ preserve the
> representation when converting from signed to unsigned integer of the same
> width? The assumptions already made are: Corresponding signed and unsigned
> representation have the same number of bits, signed uses 2's complement
> representation, there are no extraordinary values and no padding bits in the
> representation.
I think all modern machines are using 2s complement arithmetic.
50 years ago, a few systems used signed-magnitude and 1s complement.
That "implementation dependent" sort of weasel wording is probably left over to cover that case. It might actually get interesting if somebody ported a modern c compiler to work on one of those older systems or an emulation of one.
--
These are my opinions. I hate spam.
More information about the devel
mailing list