> Different versions of an algorithm are different algorithms.
Splitting hairs like that doesn't change anything because it's still not the algorithm which you get a copyright on. It's the work of authorship implementing it.
But you can certainly produce multiple implementations of source code that are not only functionally equivalent in practice but actually generate identical machine code.
> Copyright protects how code is written not what it does. And the how applies just as much to interfaces as implementations.
The issue is that the interface is strictly the what it does part. Given the implementation, or the need for compatibility with one, the API is purely a factual description of the call spec. You can't rewrite it or it changes the what, which means there is no room to change the how, and the code correspondingly required shouldn't be copyrightable because it's purely functional and leaves no room for alternative compatible implementations.