![]() |
Some Vintage HP15Cs Faster than Others? - 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: Some Vintage HP15Cs Faster than Others? (/thread-210069.html) |
Some Vintage HP15Cs Faster than Others? - Bruce Zastera - 01-25-2012 Someone mentioned that their HP15C circa 1985 took 30 seconds to compute 69 factorial. My vintage HP15C computes that almost instantaneously. I purchased mine in 1990, and going by the serial number, it was built in 1986 (first 2 digits are 26 which indicate the number of years since 1960). I'm considering purchasing one from 1983 or 1984, so if those are significantly slower, I'd really like to know that before I buy it. I'd appreciate it if someone with an older model can tell me how fast their calculators perform the following 2 functions: 69 f x! 100 ENTER 50 g Cx,y The second of those takes much longer than the first - about 10 seconds on mine. Please post the first 4 digits of the serial number with any results. I'm only talking about the vintage models here. I understand that the new limited editions are much faster.
Thanks.
Re: Some Vintage HP15Cs Faster than Others? - uhmgawa - 01-26-2012 Quote:
They may have just been mistaken. The clock frequency
Quote:
~10s for x! and 0.5s for Cx,y on a 24xx and 25xx 15c.
Re: Some Vintage HP15Cs Faster than Others? - Peter Murphy (Livermore) - 01-26-2012 69! is quick.
100C50 takes 11.3 s on my 24xxA and 11.6 s on my 27xxA.
Re: Some Vintage HP15Cs Faster than Others? - Gerson W. Barbosa - 01-26-2012 Quote: This is irrelevant. Any differences you may notice are due to modifications done by some users, they are not related to the serial numbers. Please take a look at the following past threads: http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/archv015.cgi?read=77430 http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/archv019.cgi?read=157905 (professionally done mod) Regards, Gerson. ------------------- Since you've asked: 69 f x! -> about 0.8 seconds 100 ENTER 50 g Cx,y -> 11.4 seconds 69.5 CHS f x! -> 13.5 seconds. (2343B75099, no mod)
Edited: 26 Jan 2012, 2:19 a.m.
Re: Some Vintage HP15Cs Faster than Others? - Dieter - 01-26-2012 Bruce wrote: Quote:I think we can safely assume that no 15C ever (and no other HP I can think of) would require half a minute to compute 69!. Even on my 34C (about the same speed, maybe a bit slower) this is done within a second. Half a minute might be okay for a user-written program. Maybe this is what the timing refers to. Quote:So should any other standard 15C. Quote:These are two typical results. Anyway, I wonder why the 15C took that long for the Cx,y function which is essentially a loop with 50 multiplications and divisions. The current 35s does this within a second, and even a hand-written program in user code does it in just 5 seconds. Yes, the 35s is much faster faster than the 15C (ten, maybe twenty times), but shouldn't a 15C-routine in machine code run at least as fast as a 35s-program in user code?! Dieter
Edited: 26 Jan 2012, 7:20 a.m.
Re: Some Vintage HP15Cs Faster than Others? - Marcus von Cube, Germany - 01-26-2012 Dieter are you sure the 15C uses multiplications for Cxy? Another approach could be using lnGamma.
Re: Some Vintage HP15Cs Faster than Others? - Bruce Zastera - 01-26-2012 Quote:
I'm guessing that it takes precautions against overflow such as adding logs. Something like that is required for larger combinatorics.
Re: Some Vintage HP15Cs Faster than Others? - Dieter - 01-26-2012 I don't think that the 15C uses logs for the C(y,x) function. The usual straightforward implementation of this function will not cause an overflow either - at long as the result doesn't overflow as well.
Example for C(400, 108) = 9,432 E+99: C(400, 108) = 400 / 108 * 399 / 107 * 398 / 106 * ... * 294 / 2 * 293 / 1Before the last multiplication the value is less than the final result, which is then obtained by the multiplication with 293. In other words: there is no "intermediate overflow". As long as the result is within the limits, the algorithm will not cause an overflow either. At least that's what it looks to me. ;-)
Dieter
Re: Some Vintage HP15Cs Faster than Others? - Dieter - 01-26-2012 Of course I'm not sure of anything as far as the internal programming of the 15C is concerned. But I don't think that a lngamma approach is used here. First, because in this case that function probably would have been made available to the user. And second, simply think of the time three lngammas would require here... #-)
Dieter
Re: Some Vintage HP15Cs Faster than Others? - Bruce Zastera - 01-26-2012 Quote:
You're right, I was thinking of evaluating the binomial distribution, where the C(y,x) terms can overflow even though the binomial terms do not since the large C(y,x) terms get multiplied by very small values. Excel had a problem with this a few years ago, and they implemented an algorithm to fix it. That can also be fixed by summing logs. Of course the HP15C doesn't have a key for the binomial distribution.
Re: Some Vintage HP15Cs Faster than Others? - Bruce Zastera - 01-26-2012 Quote:
The x! key appears to return gamma(x+1). For example, -0.5! returns gamma(0.5) = sqrt(pi).
Re: Some Vintage HP15Cs Faster than Others? - Dieter - 01-26-2012 Regarding statistical functions I don't think Excel has problems. For me it looks more like Excel is the problem. ;-)
Just as C(y,x), also the binomial pdf can be evaluated with minimal overflow risk. For instance this way (just the basic idea): function binpdf(x, n, p)The major risk here is an underflow during the calculation of q^n. ;-)
Dieter
Re: Some Vintage HP15Cs Faster than Others? - Dieter - 01-26-2012 Quote:Yes, this is documented in the manual, and it was already available on the good old 34C from 1979. However, obviously two different algorithms are used for the factorial and the gamma function. Try 10! and the result appears immediately, as with other non-negative integers. Then try 10.001! and the calculator has to switch to "gamma mode" where the result requires a few seconds of computation time.
Dieter
Re: Some Vintage HP15Cs Faster than Others? - Bruce Zastera - 01-26-2012 Quote:
Here is a link about Microsoft's fix (near the bottom).
Re: Some Vintage HP15Cs Faster than Others? - uhmgawa - 02-04-2012 Quote:
But I have come across an apparent oddity which may relate
I had loan of a 10c for the purpose of testing KEMU with
This was a 22xx serial number 10c which has the early
The sequence of segments enabled during the keypad test for
Would someone with a 22xx serial number voyager other than a Thanks!
Re: Some Vintage HP15Cs Faster than Others? - Katie Wasserman - 02-04-2012 Interesting find and nice display pattern map! My collection verifies what you said:
10C 22xx --> b
Edited: 4 Feb 2012, 11:34 a.m.
Re: Some Vintage HP15Cs Faster than Others? - uhmgawa - 02-04-2012 Quote: Hmm.. given the above this may be a quirk unique to the 10c.
I have a 2301A 16c and several 23xxA 12c units which all possess
It looks to be a layout change for unknown reasons on the
Unknown at this point. If I ever manage to add a 10c to my Thanks! [edit: fix formatting botch]
Edited: 4 Feb 2012, 4:14 p.m.
|