Sorry, I may have gotten a bit competitive. By no means am I saying your approach isn't valid, you still managed to make significant improvements and your thought process is very well explained.
I...
Type: Posts; User: helloworld922
Sorry, I may have gotten a bit competitive. By no means am I saying your approach isn't valid, you still managed to make significant improvements and your thought process is very well explained.
I...
[edit: code removed.]
Basic jist/hint: Use my post above where I described methods for directly calculating b or p given the other.
Algorithm 1:
Given a known b, solving for p: If done right,...
From what I can tell, you want to calculate the largest positive integer value of p < x such that pow(b,p) == x, for b=1..x. Correct?
I haven't benchmarked these at all, but given a certain p and...
What does it mean to get the highest pth of a number?