News for hackers. Stuff that matters.
Re:GG-flip: simplest and most efficient ways to flip the sig... by joosteto on Saturday January 20, 2018 @04:03PM (#16195417)
So what if x > MAXNUMBER/2 ?

Also, how can this be faster than x=0-x; ?

Re:GG-flip: simplest and most efficient ways to flip the sig... by infogulch on Saturday January 20, 2018 @04:10PM (#16195444)
This took me a second to realize this is satire too.
Re:GG-flip: simplest and most efficient ways to flip the sig... by jwilk on Saturday January 20, 2018 @04:11PM (#16195448)
It's a joke. And yeah, it gives wrong answers for some numbers.

BTW, JS has unary minus, so you can write:

    x = -x
Re:GG-flip: simplest and most efficient ways to flip the sig... by IncRnd on Sunday January 21, 2018 @12:35PM (#16198978)
I think the author chose a more efficient table-driven approach, due to the extra 0 in your 0-x expression.