[VA] HP-71B Mini-challenge: Qualifying for a job
|
09-14-2022, 04:00 PM
Post: #1
|
|||
|
|||
[VA] HP-71B Mini-challenge: Qualifying for a job
.
Hi, all, Lately there's been an unusually large number of HP-71B-related threads and posts, which pleases me no end because I've always felt poor 71B is considered the 'ugly duckling' among the HP calc family. It's always been unjustly underappreciated, a niche model which barely registered in an essentially RPN/RPL community. It isn't even considered as a valid model to enter many challenges (not mine, mind you.) In the distant past, almost 40 years ago, this was well justified by the 71B's outrageous price which put it utterly out of reach for most people. For instance, where I live a bare-bones 71B (w/o any mass storage) was 5x-6x more expensive than the HP-41C, and I only could get my hands on one because of my contacts at local HP first, and then when I persuaded my company's boss to get one and lend it to me on a permanent basis (I still have it !) However, nowadays there's a number of emulators which run on various OS, some free (Emu71/DOS, Emu71/Win), some not (go71b, but quite affordable,) providing the major convenience of running a virtual HP-71B on a portable device (smartphone, tablet), at speeds hundreds of times faster than the physical unit, with full memory (> 400 Kb RAM) and all ROMs (Math, JPC, ...) and LEX/BIN files available at no cost, so you can tackle and solve most math-related problems anywhere, even on the go. Add to that its superb version of BASIC, only marred by no long variable names but enormously enhanced by the various ROMs providing IEEE math, complex number support, matrix operations, polynomial and generic rootfinders, numerical integration, FORTH, Assembler, Finance, etc., and with support for recursive multi-line user-defined functions and subprograms with their own environments separated from the main program and with parameter passing by value and/or reference, plus the great clarity and simplicity afforded by BASIC, and you've got what should have been a winner hands down back then (were it not for the unaffordable price) and which certainly deserves to regain its birthright now that price and availability are no longer an issue. That said, and in order to help appreciate it better, all forum members - both new to the HP-71B and seasoned experts alike - can try and sharpen their claws and teeth by tackling this nice, simple, cute HP-71B Mini-challenge: Qualifying for a job On a bare-bones HP-71B, the Human Resources manager (who's checking out your qualification for the job you're applying to) asks you to write a BASIC program implementing the following five utility user-defined functions, namely: FNS(N) Returns the sum of N random numbers generated sequentially by using the RND function FNG Parameterless function, returns a pseudo-gaussian random number generated by adding up 8 random numbers (RND) and then subtracting the value 4 FND Parameterless function, returns a random throw of a die, i.e. an integer between 1 and 6 FNO Parameterless function, always returns One (1) FNZ Parameterless function, always returns Zero (0) A sample use from the command line prompt would be: >DESTROY ALL @ STD @ RANDOMIZE 1 >FNS(100) -> 48.4961724443 >FNG;FNG;FNG -> -.57175274691 -.95449301737 1.07825991612 >FND;FND;FND -> 5 5 3 >FNO -> 1 >FNZ -> 0 She also mentioned that eventually your code would be immediately followed by some main-program initialization code written by another applicant, and that in order to gauge your efficiency your program should be at most 92 bytes long (as reported by the CAT function,) lest you wouldn't qualify for the job. Well. I hope you'll like this simple mini-challenge, surely an enjoyable way for you to practice your HP-71B BASIC skills. I'll post my original solution in a few days, so you've got plenty of time to go for it. Waiting for your entries, best of luck with your job application ! V. All My Articles & other Materials here: Valentin Albillo's HP Collection |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)