News for hackers. Stuff that matters.
Re:Finding the average of two unsigned integers without over... by worewood on Monday February 07, 2022 @08:38PM (#30253966)
Just by reading the headline, before opening the article, I thought of the patented solution in my head. "Just halve before adding, it can be off by one but some boolean logic might do it"

Software patents are absolutely disgusting.

Re:Finding the average of two unsigned integers without over... by jws on Monday February 07, 2022 @08:48PM (#30254018)
Absolutely the same thing I did. I even had the low bit logic worked out by the time I scrolled the article down and saw the patented line. Clearly we have both had miraculous enlightenment because legally this is “not obvious”.
Re:Finding the average of two unsigned integers without over... by hackthefender on Monday February 07, 2022 @09:26PM (#30254244)
> Clearly we have both had miraculous enlightenment because legally this is “not obvious”.

To be precise, legally it is "not obvious back in 1996." There is a lot of stuff that is obvious today that wasn't 25 years ago. That said, this one in particular probably would have been invalidated as obvious if it was ever litigated (and it was not). Also, the USPTO has reined in software patents a lot in recent years (but always people advocating for more or less).

Re:Finding the average of two unsigned integers without over... by doctor_eval on Monday February 07, 2022 @10:36PM (#30254632)
Seriously, I could have done this in 1996 and so could anyone. I reckon I could probably have worked this out in 1986. It’s not like binary arithmetic has changed significantly in the last 20 years.
Re:Finding the average of two unsigned integers without over... by unnah on Tuesday February 08, 2022 @01:43AM (#30255582)
And back in 1996, programmers were much more familiar with bit-twiddling than today.
Re:Finding the average of two unsigned integers without over... by ______-_-______ on Monday February 07, 2022 @10:53PM (#30254737)
It's not even computer science, it's literally just math. (a+b)/2 = a/2 + b/2. They were teaching that in pre-algebra in middle schools well before 1996.
Re:Finding the average of two unsigned integers without over... by andi999 on Tuesday February 08, 2022 @03:49AM (#30256190)
Yes. I think though the next solution is not obvious. (a & b)+ (a^b)/2
Re:Finding the average of two unsigned integers without over... by umeshunni on Monday February 07, 2022 @09:23PM (#30254232)
It's not the solution that's patented, but it's the implementation in a single CPU cycle in hardware.
Re:Finding the average of two unsigned integers without over... by jagger27 on Monday February 07, 2022 @10:51PM (#30254726)
That’s a pretty important distinction. If someone in the 1800s invented a mechanical calculator that could do this operation in a single crank, I don’t think anyone would upset about that patent.
Re:Finding the average of two unsigned integers without over... by upofadown on Tuesday February 08, 2022 @07:02AM (#30257454)
But then the patent would not be on the logic but the mechanical implementation. The obviousness would need to be judged on that basis. The method can be implemented using straightforward combinational logic so the single crank/cycle is a given after you have come up with the obvious method.

Back before software patents were a thing, the "math" was not patentable. Eliminating software patents will be a return to the previous status quo.

Re:Finding the average of two unsigned integers without over... by pclmulqdq on Tuesday February 08, 2022 @07:23AM (#30257598)
We have eliminated most software patents: see Alice Corp vs CLS bank.

The only thing this patent covers is the physical circuit implementation, not the math.

Re:Finding the average of two unsigned integers without over... by rrss on Tuesday February 08, 2022 @09:54AM (#30259069)
> The only thing this patent covers is the physical circuit implementation

The claims in that patent are not limited to a physical circuit implementation.

The description includes a circuit diagram as one possible embodiment of the claimed invention, but the patent covers any implementation (and the description indicates it was intended to cover instructions running on general purpose processors).

Re:Finding the average of two unsigned integers without over... by sebazzz on Tuesday February 08, 2022 @01:36AM (#30255545)
So the compiler developers had to pay fees? Or Intel and AMD?
Re:Finding the average of two unsigned integers without over... by umeshunni on Wednesday February 09, 2022 @03:06PM (#30277709)
If the compiler developers were developing their own circuits, yes.

But likely, Intel/AMD would have had to pay fees if they were implementing a similar solution in their hardware.

Re:Finding the average of two unsigned integers without over... by teaearlgraycold on Monday February 07, 2022 @09:23PM (#30254227)
As if anyone would ever get prosecuted for that, though.

Given its simplicity this makes me wonder if a compiler has ever transformed legal original IP code into patented code.

Re:Finding the average of two unsigned integers without over... by enneff on Monday February 07, 2022 @09:42PM (#30254357)
That’s not really how software patents are (ab)used. Just having the patent and a vaguely credible claim that someone is using the patented technology is enough to encumber them with enough legal issues that many people will settle instead of fight it.