HP Forums
Improvement on HP-45. - 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: Improvement on HP-45. (/thread-43110.html)

Improvement on HP-45. - r. d. bärtschiger. - 09-24-2003

Something just occured to me and in case no one else has thought of this, I thought I would post this and see if there are any responses. On page 7 of the HP-45 owner's Handbook there is an example of what a child prodigy can do. In this case calculate 365365365365365365 squared. It was stated that he was able to do this calculation in just under one minute. Well, I just tried this on my HP-49G+ in exact mode and in about one second it returned the answer, and it is the same as the one given in the book.


Re: Improvement on HP-45. - Valentin Albillo - 09-25-2003

Perhaps this particular problem is not that difficult
for a math-type prodigy, because of its 'regularity'.
I would proceed like this:


= (365 * 1001001001001001)^2
= 365^2 * 1002003004005006005004003002001

Now, 365^2 can be computed 'in the head' very fast
using the well´known trick for squaring numbers ending in 5, namely:
 [N]5 ^ 2 = [N^2+N]25  (e.g.: 45^2 = [4^2+4]25 = [16+4]25 = 2025)
so 365^2 is computed like this:
    [36^2+36]25 = [1296+36]25 = 133225
at once, requiring only the trivial addition of 36 to the memorized value of 36 squared (any math prodigy worth his/her salt has all squares up to 100^2 perfectly memorized, at the very least).

This being accomplished in a second or so, the prodigy must now compute:

    133225 *  1002003004005006005004003002001
but this is much easier to do than it seems, because 133225 is such a small, 6-digit value, and the other factor has only 6 different non-zero digits, arranged in such a regular fashion. The prodigy just needs to form the following 6 partial products:
  133225 * 1, 133225 * 2, ... , 133225 * 6
but they are trivially formed by simply starting with 133225, then keep on adding 133225 to the previous result
five times:
       133225, 266450, ... , 799350. 
Thus, all six of them can be computed mentally in a few seconds at most. Now, it's just simply a matter of arranging them properly for the sum, like this:
and that's it. It's actually much easier (for even a mild prodigy) than it seems at first, and most readers of this forum would be able to accomplish it rather easily with a little training. As you have seen, it has little to do with actual complicated computation but with arranging things properly and doing a few sums of small, 6-digit numbers. Only the final result is really multi-digit.

Best regards from V.

Re: Improvement on HP-45. - Patrick - 09-25-2003

So, Valentin, why is it that you collect calculators again?


Re: "Exact Mode" - Paul Brogger - 09-25-2003

I've heard much about this "exact mode" recently -- mostly in connection with HP-49G/G+ and the TI-89/V-200.

Would someone offer a quick explanation of it, its limits on those calculators (if indeed those all do make it available), and whether any other calculators offer it?


Re: "Exact Mode" - R Lion (Spain) - 09-25-2003

2 ENTER 4 / gives 0.5 in aprox. mode but 1/2 in exact mode.

48 with Erable, 49G and 49G+ offer these two ways. (I don't know about the 39&40)


Re: "Exact Mode" - Paul Brogger - 09-25-2003

I'm interested in playing with prime factorizations of llllllllaaaaaaaaarrrrgggggeeeee numbers, and it would appear that "exact mode" supports manipulation of quite long integers. Does any one know how long?

I'll look into the Erable documentation -- thanks for that!

Re: "Exact Mode" - Giiiii - 09-25-2003

Exact mode works like said before, 1/2 instead of 0.5, 1/3 instead of 0.333333333...
But it can work with incredibly long integers (its sort of different with floats.
For example, 100!*100! can be calculated VERY quickly.
I guess that the size of the integer nmbers you can work with are limited only by memory and time. (Just a guess)

Re: "Exact Mode" - dbrunell - 09-25-2003

On the TI-89/92/200, the limit for exact mode is a little over 600 digits. However, if you have an expression like 1000!, it will carry it around as an unevaluated (but exact) factorial.

Re: "Exact Mode" - Werner Huysegoms - 09-26-2003

'Long integers' are limited by available memory only.
Whether you're in exact mode or approx makes no difference:
arithmetic with long integers returns exact answers.
When you're in approx mode, you can't enter an integer directly, it will always be entered as a real (with a
decimal point following).


Re: Improvement on HP-45. - Valentin Albillo - 09-26-2003

Patrick wrote:
"So, Valentin, why is it that you collect calculators again?"

Well, you know, they are essentially "toys" for me. I don't have real-life uses for them, save occasional trivial arithmetic, but I find it challenging to explore their programming capabilities and overcome their limitations.
I specially like writing unusual programs and composing
'challenges', then write an article or two about it all to share with other likeminded people, such as yourself.

But one thing I don't do is "HP chauvinism". If some calculator is good, then it's good, be it HP, Sharp, Casio, TI, whatever. The 'fundamentalistic' approach of "If it's an HP then it's good (regardless of whether it obviously stinks) and if it isn't an HP then it's junk (regardless of it being a far superior machine)" just doesn't cut it here.

Best regards from V.

Programming fun - Patrick - 09-26-2003

Yes, Valentin, I applaud your attitude, even if I sometimes have trouble in exercising it myself. My first HP, that wonderful little HP-25 I bought way back in 1977, permanently polluted my view on life. That machine was so amazing for its day, so well engineered, so comfortable to use, and so challenging to use to its limits, that HP made something of a devoted little kitten out of me. Oh, the shame of it.

I share your love of exploring the programmatics of these machines. In fact, it is the real reason I became a collector. I have very few non-programmable machines in my collection (of course, HP made relatively few of them if you look back in history).

Right now, for instance, I'm working on a version of the SOLVE function for the HP-11C (only, what... 20 years too late?!). I am trying to be as faithful as I can to the original algorithm described by William H. Kahan in his December 1979 article in the HP Journal. Obviously, it is a challenge to fit such a sophisticated algorithm into the rather limited resources of an 11C, but for me that is the fun of it. I have a working version that implements most, but not all, of the secant method refinements described in the article. However, I am not yet happy with. It currently leaves only 39 program steps for the definition of the function to SOLVE, and is somewhat arcane in its implementation (a result of trying to squeeze the code, I think). Perhaps once I'm more happy with it, I'll follow your lead and submit an article to HPCC.

Best regards,

Re: Improvement on HP-45. - Andrés C. Rodríguez (Argentina) - 09-27-2003

Valentín, I would certainly attend any math course taught by you. Thank you for an interesting and insightful posting!

[OT] Re: Improvement on HP-45. - Valentin Albillo - 09-28-2003

You're welcome, Andres, thanks for your kind words and best regards from V.

Re: "Exact Mode" - Julián Miranda (Spain) - 09-29-2003

The HP40G will work in "Exact Mode" if you're using the CAS.
You can calculate 1000!, for example, it takes around a minute but you have all its digits.