The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
[VA] SRC #012b - Then and Now: Root
11-07-2022, 10:14 PM
Post: #1
[VA] SRC #012b - Then and Now: Root
  
Hi, all,

After the many excellent solutions & comments posted for Problem 1 and once the 7,100 views mark has been met and exceeded, now's the time for the 2nd part of my new SRC #012 - Then an Now, where I'll demonstrate that advanced vintage HP calcs which were great problem-solvers back THEN in the 80's (some 40 years ago !) are NOW still perfectly capable of solving recently-proposed tricky problems intended to be tackled by using fast modern 2020-era personal computers, never mind slow ancient pocket calcs.

In the following weeks I'm proposing six increasingly harder such problems for you to try and solve while respectfully abiding by the following mandatory rules summarized here:
    You must try and solve them using EXCLUSIVELY your preferred VINTAGE HP CALCULATORS (physical or virtual,) coding in either RPN (including HP-41 microcode), RPL (any variant existing at the time, including SysRPL) or HP-71B languages (including BASIC, FORTH and Assembler) AND NOTHING ELSE: NO CAS/XCAS, MATLAB, MATHEMATICA, EXCEL, C/C++/C#, PYTHON or the like, AND NO LENGTHY MATH SESSIONS/LECTURES. Also, NO CODE PANELS, please !

    On the positive side, you may use any official/well-known modules, pacs or libraries which were available at the time, such as the Math Pac and JPC ROM for the HP-71B, the Advantage Module, PPC ROM and Extended Memory for the HP-41, and assorted libraries for the RPL models, to name a few.

This Problem 2 deals with polynomial roots with a bang, namely:

Problem 2: Root
    Write a program to find the minimum absolute value among the roots of the following polynomial:

      P(x) = 2 + 3 x + 5 x2 + 7 x3 + 11 x4 + 13 x5 + ... + 104743 x10,000

    whose coefficients are the prime numbers in order: 2, 3, 5, 7, 11, 13, ... , 104743.

Your program should have no inputs and must output the asked value and automatically end. You should strive for 10-12 correct digits (gave or take a few ulp) depending on your HP model, and the faster the running time the better. Also, you must justify in your comments the soundness of your approach, not "just trying" or relying on luck. Smile

Some useful advice is to try and find the correct balance between letting the program do all the work (i.e. sheer brute force, which could potentially take far too much RAM and running time) with no help from you, or else use a little bit of insight to help significantly speed up the process. Your choice.
    (As an aside, I wonder if any (or even all !) forum members who successfully posted correct solutions for Problem 1 will be able to follow suit and solve this Problem 2 as well, for a perfect 2 for 2 score ! Big Grin )

If I see interest I'll post in a few days my original solution for the HP-71B, a 5-liner which computes the required absolute value relatively quickly and accurately (it can be done in just 4 lines albeit at a significantly slower speed).

In the meantime, let's see your very own clever solutions AND remember the above rules, please.
V.

  
All My Articles & other Materials here:  Valentin Albillo's HP Collection
 
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
[VA] SRC #012b - Then and Now: Root - Valentin Albillo - 11-07-2022 10:14 PM



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