Showcase Your Relics!

That's fast. Try 2 to 100,000. Where did you find the bug?
The commented out IF at the end checking if any were found did not work when found.
I tried 2 to 100000, it to 28 seconds but there must be another bug because the found list was the same.
 
The commented out IF at the end checking if any were found did not work when found.
I tried 2 to 100000, it to 28 seconds but there must be another bug because the found list was the same.
Oops, I must have accidentally commented that line when posting the code. Your results for 2 to 100K are valid because there's no perfect numbers between 8,129 and 100K. The next perfect number is 33,550,336. That one has many whole number divisors. You can set min to 1 number below that num, and max to 1 after to see how long it takes to calc that one.

The first seven perfect numbers are 6, 28, 496, 8,128, 33,550,336, 8,589,869,056, and 137,438,691,328.
 
Last edited:
Oops, I must have accidentally commented that line when posting the code. Your results for 2 to 100K are valid because there's no perfect numbers between 8,129 and 100K. The next perfect number is 33,550,336. That one has many whole number divisors. You can set min to 1 number below that num, and max to 1 after to see how long it takes to calc that one.

The first seven perfect numbers are 6, 28, 496, 8,128, 33,550,336, 8,589,869,056, and 137,438,691,328.
I did the comment out and replaced your if because it didn't calculate true when perfect numbers were found.

2 to 33550338, I stopped it after 20 minutes.

Access looks to be using multiple processors to run this code.

1761857807512.png

1761857885140.png
 
I did the comment out and replaced your if because it didn't calculate true when perfect numbers were found.
Understood
2 to 33550338, I stopped it after 20 minutes.
Yeah, as the loop increments the number being evaluated, the more divisors it has to examine to see which one's are integers, add them to the running total, and compare the final sum to the number being evaluated to see if it's a perfect num.

Try 33,550,336 to 33,550,336 to see if it displays that num as being perfect. The inner loop will eval 33,550,334 sequential numbers to see which one's are whole number divisors, add them up, and compare if the sum equals 33,550,336.
Access looks to be using multiple processors to run this code.
Yes, they're crunching in parallel. I don't see CPUØ. Does your machine have Intel Xeon or AMD Ryzen cores?
In task mgr you can set affinity to the MSACCESS.EXE process to make it run faster.
 
Understood

Yeah, as the loop increments the number being evaluated, the more divisors it has to examine to see which one's are integers, add them to the running total, and compare the final sum to the number being evaluated to see if it's a perfect num.

Try 33,550,336 to 33,550,336 to see if it displays that num as being perfect. The inner loop will eval 33,550,334 sequential numbers to see which one's are whole number divisors, add them up, and compare if the sum equals 33,550,336.

Yes, they're crunching in parallel. I don't see CPUØ. Does your machine have Intel Xeon or AMD Ryzen cores?
In task mgr you can set affinity to the MSACCESS.EXE process to make it run faster.
It's an Intel i7 about 5 years old.
 

Users who are viewing this thread

Back
Top Bottom