> I tried to make it clear what the function is capable of; it now does everything it did before and more.

Yes.  Now it _silently_ returns wrong answers too.

The point is - the purpose of the original function was very different (see reference).