:: Re: [DNG] Studying C as told. (For …
Pàgina inicial
Delete this message
Reply to this message
Autor: Peter Olson
Data:  
A: dng, Didier Kryn
Assumpte: Re: [DNG] Studying C as told. (For help)
n 2016-06-29 06:00, Didier Kryn wrote:
> Le 29/06/2016 11:54, Peter Olson a écrit :


[..]

>> They are talking about numbers, so the largest such number is the most negative.
>>
>> You might want to think about what is being said before you make a claim that something is idiotic.
>
>     Edward is right here. The thing is just badly expressed; these
> authors mean the negative number with the largest absolute value.
> Otherwise, whatever the number of bits, the largest negative integer
> is, of course -1.


No, really.

If you have ever written a function that converts str -> int(of whatever width) you will inevitably run into the 32678 -> -32786 problem trying to validate 16 bit numbers. It's tricky, but can be solved.

> The thing is just badly expressed


I don't think so. It is expressed in a way that guides implementors. You have to read it in that light.

Peter Olson