[OT] The Usual Arithmetic Confusions
H. S. Teoh
hsteoh at quickfur.ath.cx
Fri Feb 4 17:20:08 UTC 2022
On Fri, Feb 04, 2022 at 02:01:43PM +0000, Paul Backus via Digitalmars-d wrote:
> On Friday, 4 February 2022 at 04:28:37 UTC, Walter Bright wrote:
[...]
> > There's really no fix for that other than making the effort to
> > understand 2s-complement.
> [...]
> > Trying to hide the reality of how computer integer arithmetic works,
> > and how integral promotions work, is a prescription for endless
> > frustration and inevitable failure.
>
> 2s-complement is "the reality of how computer integer arithmetic
> works," but there is nothing fundamental or necessary about C's
> integer promotion rules, and plenty of system-level languages get by
> without them.
+1.
T
--
There are 10 kinds of people in the world: those who can count in binary, and those who can't.
More information about the Digitalmars-d
mailing list