Numeric comparisons

Andrew Koenig ark at alice.UucP
Wed Sep 4 04:06:31 AEST 1985


> I disagree. A comparison is a subtract with the result thrown away. The
> trick is to select the correct conditional branch instruction afterwards,
> depending on whether a signed or unsigned comparison was done.

Don't try that trick in floating point, or you'll get spurious
overflow traps when comparing perfectly legitimate numbers.



More information about the Comp.lang.c mailing list