Looks fine. In Inverse and Reduce you hide one local variable called lhs with another, which is not that good an idea. You could also maybe make it more efficient by having only one lhs instead of repeatedly creating and destroying them.
All the buzzt CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
You use unsigned a lot in your code, perhaps qualifying this with a sized type for readability? (Most likely long, this seems to be 4 bytes on both 32-bit and 64-bit systems).
Potentially, replacing assert() with something that will throw an exception could be useful; checking speed impact may be necessary.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You". -- Linus Torvalds