:: Re: [DNG] Studying C as told. (For …
Top Pagina
Delete this message
Reply to this message
Auteur: Hendrik Boom
Datum:  
Aan: dng
Onderwerp: Re: [DNG] Studying C as told. (For help)
On Wed, Jun 29, 2016 at 06:36:25AM -0400, Peter Olson wrote:
> 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.


It is expressed in language that conflicts with the mathematicl
reality, although it does conform to naive intuition.

Misusing precise terminology in this way tends to make the language
ambiguous and makes it impossible to speak precisely in tricky
situations, such as those commonly encountered in computer programming.

-- hendrik