I need an extension of bisection method for finding integer zeros of functions f: Z+ -> Z.

I've made an acceptable version of it, but I need some advice to make it 100% reliable.

It's related to efficient finding semiperfect numbers X of any size. I build an algorithmic function associated with each X, only defined in integer values (representing a combination of the factors), and each zero proofs that X is semiperfect), while the absence of it assures that X is not one of those.

Using bisection instead of linear search (checking all possible combinations of factors) means going from O(2^n) to O(n), where n is the number of proper factors in X.

More Alejandro Casares's questions See All
Similar questions and discussions