Android Stack Overflow Error Recursive Function Math