Most advantageous program written for 41/42? - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: General Forum (/forum-4.html) +--- Thread: Most advantageous program written for 41/42? (/thread-16441.html) |
Most advantageous program written for 41/42? - DM48 - 03-08-2021 03:08 AM What do you believe to be the most advantageous program written for the HP41/42? I was reading through the 41 software library forum and the width, breath, and depth of programs amazed me. I was wondering what everyone here thought would be one of the most advantageous programs written for the 41/42. There are no wrong answers, just no answers. RE: Most advantageous program written for 41/42? - Sukiari - 03-10-2021 06:14 AM (03-08-2021 03:08 AM)DM48 Wrote: What do you believe to be the most advantageous program written for the HP41/42? For me it’s a primarily test. Very basic feature imho missing from (all?) the RPN machines. RE: Most advantageous program written for 41/42? - John Keith - 03-10-2021 02:48 PM I assume you mean primality testing? I would guess that it was not a built-in feature because it would be uselessly slow for numbers over 3 digits in most cases. With today's fast hardware and emulators of course this is no longer the case. RE: Most advantageous program written for 41/42? - Allen - 03-10-2021 10:57 PM I would tend to agree regarding the primality testing. Many primality testing algorithms are quite fast if you have a modular exponentation function available on the calculator. The Rabin-miller test for example can guarantee primailty for n < 1,122,004,669,633, by only testing 4 situations where a = 2, 13, 23, and 1662803. ( other bounds in the wikipedia article) I heavily use a pollard-rho factorization algorithm on my 42s (excellent free42 emulator) which can factor any number my emulated 42s can handle in less than a second. RE: Most advantageous program written for 41/42? - DM48 - 03-10-2021 11:44 PM (03-10-2021 10:57 PM)Allen Wrote: I would tend to agree regarding the primality testing. Do you have a link to the program or can you paste the code here? I had no idea we would have such agreement so early in the beginning! RE: Most advantageous program written for 41/42? - Dave Britten - 03-11-2021 01:47 AM (03-10-2021 11:44 PM)DM48 Wrote:(03-10-2021 10:57 PM)Allen Wrote: I would tend to agree regarding the primality testing. Here's a Miller-Rabin prime tester that I occasionally use on my 42S and/or DM42: https://archived.hpcalc.org/hp42s/programs/prm/prm.html RE: Most advantageous program written for 41/42? - Gerald H - 03-11-2021 06:22 AM Shanks' square form factorization generally faster than Pollard rho on 42S. For info on SQFOF see https://en.wikipedia.org/wiki/Shanks%27s_square_forms_factorization The two programmes below realize SQFOF on 42S. Enter number N to factorize on stack level X & actuate SQFO, programme returns factor to stack level X or declares “Elliptic Period” if the continued fraction is too short to discover a factor. If no factor found you can try multiplying N by a small factor, eg 3 or 5 or 7...... & run SQFO on the product, possibly resulting in a proper factor of N being returned. Code: 0. { 217-Byte Prgm } RE: Most advantageous program written for 41/42? - Gamo - 03-11-2021 06:35 AM Not the most advance but not include in the HP pac is This program called Profit on Pricing or Business Percentage. So I make one especially for 41/42 https://www.hpmuseum.org/forum/thread-15092.html Gamo RE: Most advantageous program written for 41/42? - Ren - 03-11-2021 04:10 PM So now this math deficient needs to look up what primality testing is about. B^) From Wikipedia, the free encyclopedia A primality test is an algorithm for determining whether an input number is prime. Among other fields of mathematics, it is used for cryptography. Unlike integer factorization, primality tests do not generally give prime factors, only stating whether the input number is prime or not. Factorization is thought to be a computationally difficult problem, whereas primality testing is comparatively easy (its running time is polynomial in the size of the input). Some primality tests prove that a number is prime, while others like Miller–Rabin prove that a number is composite. Therefore, the latter might more accurately be called compositeness tests instead of primality tests. RE: Most advantageous program written for 41/42? - EdS2 - 03-12-2021 08:31 AM (03-11-2021 06:22 AM)Gerald H Wrote: Shanks' square form factorization generally faster than Pollard rho on 42S. See also Shanks' own notes on SQUFOF, as transcribed here, and particularly this bit about the HP-65: Quote:Concerning Brillhart’s second question, I felt that the answer would be, “no”—N₀ does not lead to absolute failure, but to prove this I had only a hand-held HP-65 with its very small memory (100 steps in the program). Obviously, one cannot put the huge BRIMOR on such a machine. But one can put on the simple algorithm... |