Post Reply 
Prime Factors in the ALPHA REG.
12-10-2015, 06:25 PM
Post: #18
RE: Prime Factors in the ALPHA REG.
(12-10-2015 05:43 PM)fhub Wrote:  
(12-10-2015 05:24 PM)Dieter Wrote:  BTW, is there a special reason why in this thread noone ever mentioned the NEXTP function to obtain the next divisor? Instead the programs simply test all odd divisors. #-)

I have modified your program accordingly, and it still works fine. Just a bit faster.
I remember that long time ago a member here mentioned, that NEXTP (which is still in my original version in the WP34s library) would be MUCH slower (on a real calc) than simply using INC, so I've changed this for the current version.
It's strange that you state it would be faster!?

Ok, I've now checked both versions with the emulator, I've used the biggest 12-digit primenumber 999999999989:
the new version (with INC X, EVEN?, INC X) needs about 5 secs and the old version (with NEXTP) needs about 50 secs, i.e. it is 10-times slower!
(I don't think this would be much different on a real WP34s)

Franz
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Prime Factors in the ALPHA REG. - fhub - 12-09-2015, 02:33 PM
RE: Prime Factors in the ALPHA REG. - fhub - 12-09-2015, 06:32 PM
RE: Prime Factors in the ALPHA REG. - fhub - 12-10-2015, 05:43 PM
RE: Prime Factors in the ALPHA REG. - fhub - 12-10-2015 06:25 PM



User(s) browsing this thread: 1 Guest(s)