HP Forums
Microchallenge 41/42: nr of digits - Printable Version

+- HP Forums (https://archived.hpcalc.org/museumforum)
+-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html)
+--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html)
+--- Thread: Microchallenge 41/42: nr of digits (/thread-124771.html)

Microchallenge 41/42: nr of digits - Werner - 09-14-2007

write a program that can run unchanged on either a HP41 or a HP42, and will return 10 on a HP41 and 12 on a HP42. It must not depend on any modes or flag settings.
Goal: shortest program excluding LBL and END

to give you an idea, this is my first thought:


or, 8 bytes (41) and 10 bytes (42)
Can you do better?

Re: Microchallenge 41/42: nr of digits - Allen - 09-14-2007

not nice to do mini-challenges in the morning.. it makes us late for work. SMILE!

Re: Microchallenge 41/42: nr of digits - Werner - 09-14-2007

At the time of posting, it was luchtime where I am.

Re: Microchallenge 41/42: nr of digits - Howard Owen - 09-14-2007

Yes, I realized that the world had really changed when I started having to take account of time deltas greater than three hours in both my work and my recreational lives. Back when the calculators we love so much were created, correspondence between continents was not routine like it is today. Of course, this is still mainly limited to the developed world, although that is projected to rapidly change, and soon. I wish I could say I'm hopeful that the conversations engendered by this coming surge of new netizens would all be as rational, calm and friendly as discussions here tend to be. Even when we are annoyed with one another, we tend to be civil about it. But recent years have shown that enhanced communication doesn't necessarily contribute to better understanding between peoples. It should have been obvious to me that people can spew hatred over the Internet just as easily as fellowship, but it wasn't. I still think that when the sum of all the conversations are added up, the balance is helpful, constructive, rational, loving and above all, useful to human beings everywhere. Wikipedia shows this at work. There is a lot of entropy tugging at that project, but the content still seems to tend toward all those qualities I just mentioned, through the strenuous efforts of lots of dedicated folks.

I just had my day interrupted by a blown clutch, and had a spun down moment, and that's what came up. We now return you to your HP calculator enthusiast's discussion forum, already in progress.