I tried to start with the Original Poster's code but with improvements and printout values that might lead to further improvement. It was intended to be the beginning, not the end of the...
Type: Posts; User: Zaphod_b
I tried to start with the Original Poster's code but with improvements and printout values that might lead to further improvement. It was intended to be the beginning, not the end of the...
Regardless of the speed of Math.pow(), you are calling it way too many times.
I mean, think about it: The outer loop is trying different values of p. (Note seems a little wasteful to start with...