Implement binary long division. Sure, regular base 10 long division uses a divide operation, but since the binary equivalent needs to arrive at either a 0 or a 1, you could get away with an if statement.
This algorithm would be O(log product), while the subtraction algorithm would be O(result).
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com