The Museum of HP Calculators

HP Forum Archive 19

 Early calculators that could do x! for x > 69 ?Message #1 Posted by Gene Wright on 19 May 2010, 1:51 p.m. Always remembered 69 as the highest integer for which one could compute x! on machines with a two digit exponent. However, I recently came across a calculator from 1976 that would compute the value for x > 69 up to a higher value. Before I reveal that particular machine :-) does anyone else know the "first" machine that could do this? What early (meaning red LED displays) could give a usable / correct result for 70 ! ?

 Re: Early calculators that could do x! for x > 69 ?Message #2 Posted by Thomas Radtke on 19 May 2010, 1:59 p.m.,in response to message #1 by Gene Wright The C= PR100 can (sort of) do that. It shows 1.2 * 10^00 and an overflow indicator.

 Re: Early calculators that could do x! for x > 69 ?Message #3 Posted by Gene Wright on 19 May 2010, 2:08 p.m.,in response to message #2 by Thomas Radtke So if you put in 90 and then computed the factorial, what would you see? Could you get the actual result with a "mental" adjustment?

 Re: Early calculators that could do x! for x > 69 ?Message #4 Posted by Thomas Radtke on 19 May 2010, 2:17 p.m.,in response to message #3 by Gene Wright It shows 1.49 * 10^38. Well, I certainly cannot adjust that mentally. Others likely can ;-).

 Re: Early calculators that could do x! for x > 69 ?Message #5 Posted by Gene Wright on 19 May 2010, 2:32 p.m.,in response to message #4 by Thomas Radtke Ah, ok, that's what I was hoping to find. Some early machines did the calculation but since they could not show 3 digits of an exponent, they showed the mantissa and the last 2 digits of the exponent. The Corvus 500 can do up to 120 ! and shows the result in a flashing display to indicate you have to add a 1 to the displayed exponent. Seems like this one did it too. So, which model was first to do this feat?

 Re: Early calculators that could do x! for x > 69 ?Message #6 Posted by Gerson W. Barbosa on 19 May 2010, 4:06 p.m.,in response to message #5 by Gene Wright Privileg SR54NC (1975)? Well, according to this ad, the answer should be Corvus 500. Quoting from the ad: `"FOR THE FIRST TIME you can raise the number 10 to 199th power or calculate Factorial (x!) of up to 120. Unbelievable!"` Edited: 19 May 2010, 4:42 p.m.

 Re: Early calculators that could do x! for x > 69 ?Message #7 Posted by Michael de Estrada on 19 May 2010, 5:24 p.m.,in response to message #6 by Gerson W. Barbosa I just checked this on my Corvus 500, and indeed it works. I read through the manual, and while it makes no mention of the range for x!, it does state that the exponent range is +199 through -200. Once you get the flashing display, you must press CLx before proceeding with further operations, and remember the implicit "1" in front of the 2-digit exponent. Since this is not stored internally, many operations will yield incorrect answers. For example 120! = 6.69^198 will yield 6.69^98, and taking the SQRT will then yield 2.59^49, which is incorrect.

 Re: Early calculators that could do x! for x > 69 ?Message #8 Posted by Katie Wasserman on 19 May 2010, 11:53 p.m.,in response to message #5 by Gene Wright The Omron 12SR and the APF Mark 90 do this too. The Bowmar MX-140 doesn't have factorial but it does allow exponential overflow. -Katie

 Re: Early calculators that could do x! for x > 69 ?Message #9 Posted by Andrés C. Rodríguez (Argentina) on 20 May 2010, 7:21 a.m.,in response to message #8 by Katie Wasserman The Texas Instruments SR-10 and SR-11 managed exponential overflow . The SR-11 had a "K" switch, for constant multiply and division. It was possible to use it as an event counter: Set 10 as the constant, hit the " X " key for constant multiply, and then press the "Equal" key once for each event to be counted; the exponent field will show the count and will work well after 99 (of course, it's up to you to tell, say, 129 from 229). I remember myself using it for events in the range of 160 per minute without any problem. That was before I got my HP-25... The SR-10 and SR-11 only had square root, inverse (1/x) and EE (enter exponent) as "slide rule" functions, they were not really scientific models as the HP-35/45 or the TI SR-50 of the time.

 Re: Early calculators that could do x! for x > 69 ?Message #10 Posted by Michael de Estrada on 20 May 2010, 9:52 a.m.,in response to message #8 by Katie Wasserman Katie, Did you mean the APF Mark 55? It uses the same Mostek ROM as the Omron 12SR and Corvus 500. I suspect that the Privileg SR54, Sanyo CZ2901 and GE CE93 will do x! for x>69 as well. Michael

 Re: Early calculators that could do x! for x > 69 ?Message #11 Posted by Katie Wasserman on 20 May 2010, 11:16 a.m.,in response to message #10 by Michael de Estrada Quote: Did you mean the APF Mark 55? No, the Mark 90. It's nearly identical to the Commodore PR100.

 Re: Early calculators that could do x! for x > 69 ?Message #12 Posted by Bart (UK) on 20 May 2010, 4:58 p.m.,in response to message #8 by Katie Wasserman Commodore SR7919 also does not have factorial, but allows overflow of exponent too.

 Re: Early calculators that could do x! for x > 69 ?Message #13 Posted by Bart (UK) on 26 May 2010, 5:34 p.m.,in response to message #12 by Bart (UK) OK, so this got me thinking, how to do a factorial using this "feature" on the SR7919. Just doing simple 1*2*3... doesn't help much of course and only gets to 70 and is error-prone (I think human error increases as the tediousness of repetition increases).So, in my search, Wikipedea was my friend and on their factorial page I found the following approximation by Srinivasa Ramanujan:LN(n!) = n*LN(n) - n + (LN(n(1+4n(1+2n))))/6 + (LN(pi))/2So all I have to do is calculate the right hand side (let's call it RHS) , and do e^x, except that the SR7919 doesn't do exponent overflow for the e^x function. The most complex function it does so for is x^2. Now I can see those cogs in your minds already at work and before you have finished reading this sentence, worked out thatSQR(n!)=e^(RHS/2)then do x^2 and -voila!- I have n! up to n=120. Some results: ```n SR7919 HP-20S 70 1.1978 E00 1.1978572 E100 99 9.3327 E55 9.3326215 E155 120 6.6894 E98 6.6895029 E198```These are just a few sample points and accuracy may differ more at other points.My next "challenge" - to find the least number of keystrokes to do this :).(And why a 20S for comparing? It happened to be laying on the table and is capable of E499) Edit: I used the 20S built-in n! function, whose accuracy I don't know either. It only accepts integers, so is not a Gamma aprroximation though. Edited: 26 May 2010, 5:57 p.m.

 Re: Early calculators that could do x! for x > 69 ?Message #14 Posted by BruceH on 19 May 2010, 9:28 p.m.,in response to message #1 by Gene Wright Ah, that brings back memories. When I first got my HP-28C, I showed it to a work colleague and the first thing he did was type in 69! and time it against his Casio. It was satisfyingly faster and he was duly impressed. *Then* I showed him the symbolic arithmetic. :-)

 Re: Early calculators that could do x! for x > 69 ?Message #15 Posted by Dimitri Simitas on 19 May 2010, 10:36 p.m.,in response to message #1 by Gene Wright Well, the HP-35S can do 253, no more. Not sure how to get the HP-41 to do it if it can. Dimitri

 Re: Early calculators that could do x! for x > 69 ?Message #16 Posted by Martin Pinckney on 20 May 2010, 9:43 a.m.,in response to message #15 by Dimitri Simitas Quote: Well, the HP-35S can do 253, no more. Same for 27s, 32sii. Interestingly, the 27s gives the answer almost instantly, the 32sii shows a 'calculating' message for about 2 seconds. Probably due to RAM differences?

 Re: Early calculators that could do x! for x > 69 ?Message #17 Posted by Bart (UK) on 20 May 2010, 4:59 p.m.,in response to message #16 by Martin Pinckney And 20S with about 2s "running" message.

 Re: Early calculators that could do x! for x > 69 ?Message #18 Posted by Gerson W. Barbosa on 20 May 2010, 5:15 p.m.,in response to message #16 by Martin Pinckney Quote: Probably due to RAM differences? Most likely the 27S uses the function approximation even for integers, instead of doing hundreds of multiplications. Try both 253! and 253.000000001! on the 32SII and see which is faster.

 Re: Early calculators that could do x! for x > 69 ?Message #19 Posted by Martin Pinckney on 20 May 2010, 6:25 p.m.,in response to message #18 by Gerson W. Barbosa Quote: Try both 253! and 253.000000001! on the 32SII and see which is faster. The latter is much faster on the 32sii. Almost instantaneous. The 27s gives "non integer" error, which, I dare say, is the correct answer. [edited to correct spelling] Edited: 20 May 2010, 8:08 p.m. after one or more responses were posted

 Re: Early calculators that could do x! for x > 69 ?Message #20 Posted by Gerson W. Barbosa on 20 May 2010, 6:40 p.m.,in response to message #19 by Martin Pinckney Quote: The 27s gives "non integer" error, which, I dare say, is the correct answer. This means the 27s has no gamma function. Therefore my guess about its factorial function being faster was wrong. Perhaps someone else can give us a valid explanation.

 Re: Early calculators that could do x! for x > 69 ?Message #21 Posted by Gene Wright on 20 May 2010, 5:59 p.m.,in response to message #15 by Dimitri Simitas Ah, but the 35s, 20s, etc are not "early" calculators with red LED displays. :-)

 Re: Early calculators that could do x! for x > 69 ?Message #22 Posted by Dimitri Simitas on 20 May 2010, 6:23 p.m.,in response to message #21 by Gene Wright I know but I never used a "!" function on a calculator before so I turned to my HP41 and 35S to see if they had it. So thought I'd post it. Dimitri

 Re: Early calculators that could do x! for x > 69 ?Message #23 Posted by Raymund Heuvel on 21 May 2010, 2:19 p.m.,in response to message #15 by Dimitri Simitas HP71B in about 0.0377 seconds. BR Ray

 Re: Early calculators that could do x! for x > 69 ?Message #24 Posted by Frido Bohn on 20 May 2010, 3:10 a.m.,in response to message #1 by Gene Wright Well, I would say every calculator can do as long as it has the ability to handle logarithms. Instead of multiplying the integer, do a sum over the logarithms of the integers - et voilá, you should be able to generate a (logarithmic) result of say 9.999999999^99. Raise this to the power of 10, so you get the integer 10^(9.999999999^99) as the result. Now the question: the result of which factorial is that? And which - of course handheld - calculator is able to give the output? And don't tell me that's cheating. That's applied mathematics ;-) Cheers P.S.: To see what I suggest, try this little FOCAL app: Simply put the number to be factorized in the x-register and start the program. As an example, for 100 the output will be a count-down first and 9.3326E157 which corresponds to 9.3326 10^157. ```01 LBL "LOGFACT" 02 0 03 X<>Y 04 LBL 01 05 LOG 06 ST+ Y 07 RDN 08 LASTX 09 VIEW X 10 DSE X 11 GTO 01 12 RDN 13 INT 14 LASTX 15 FRC 16 10^X 17 CLA 18 ARCL X 19 >"E" 20 FIX 00 21 CF 29 22 ARCL Y 23 AVIEW 24 SF 29 25 FIX 04 26 END ``` Note: at Line 19 >"E" shall denote the alpha-append sign (ASN in ALPHA-mode) followed by E (without quotation marks). Edited: 20 May 2010, 9:47 a.m.

 Re: Early calculators that could do x! for x > 69 ?Message #25 Posted by Gerson W. Barbosa on 20 May 2010, 5:02 p.m.,in response to message #24 by Frido Bohn Quote: As an example, for 100 the output will be a count-down first and 9.3326E157 which corresponds to 9.3326 10^157. Which is correct, of course! If we are curious about all other digits and want the HP-41 to compute them, we can use R. Farrando's program and get ``` FACTORIAL OF 100 0093326215 4439441526 8169923885 6266700490 7159682643 8162146859 2963895217 5999932299 1560894146 3976156518 2862536979 2082722375 8251185210 9168640000 0000000000 0000000000 ``` This should take several minutes on the HP-41 (It took about 7 minutes on the HP-42S). See last message in the thread below. Regards, Gerson. Edited: 20 May 2010, 5:22 p.m.

Go back to the main exhibit hall