News for hackers. Stuff that matters.
Re:The Evil Within the Comparison Functions by geocar on Monday February 19, 2018 @06:36AM (#16412266)
The thing to focus on in the mental load. What are you more likely to get right?

    a = sort(x,y,z); return a[1]
or something like this?

    if(x >= y && x =< z) return x;
    if(y >= x && y =< z) return y;
    if(z >= x && z =< y) return z;
    if(x >= z && x =< y) return x;
    if(y >= z && y =< x) return y;
    if(z >= y && z =< x) return z;
    …
Re:The Evil Within the Comparison Functions by thaumasiotes on Monday February 19, 2018 @03:09PM (#16415321)

    return max(low, ( min(val, high) ));
Still hard to avoid comparisons.