Re: detecting two's complement arithmetics
From: Mycroft Holmes (m.holmes_at_nospam.it)
Date: 11/02/04
- Next message: Sumit T. Marwal: "UNICODE problem"
- Previous message: Simon Trew: "Re: detecting two's complement arithmetics"
- In reply to: Simon Trew: "Re: detecting two's complement arithmetics"
- Next in thread: Simon Trew: "Re: detecting two's complement arithmetics"
- Reply: Simon Trew: "Re: detecting two's complement arithmetics"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 2 Nov 2004 17:35:48 +0100
> What do you mean by an unsigned two's complement integer?
By definition, -x is the same as ~x+1.
I have some templates where T is granted to be an integer and I call
T::unary minus.
I know that Cray integer arithmetics is a bit (!) different.
Unfortunately I don't happen to have one here...
> I guess in theory one integer type could be two's complement and another
> could be something else. That could break it.
true, but I'm testing all integers anyway.
-- The set of solutions is never empty. Two solutions together form a new problem. -- Mycroft Holmes
- Next message: Sumit T. Marwal: "UNICODE problem"
- Previous message: Simon Trew: "Re: detecting two's complement arithmetics"
- In reply to: Simon Trew: "Re: detecting two's complement arithmetics"
- Next in thread: Simon Trew: "Re: detecting two's complement arithmetics"
- Reply: Simon Trew: "Re: detecting two's complement arithmetics"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|