The Museum of HP Calculators

HP Forum Archive 15

[ Return to Index | Top of Index ]

The pace of progress - exact factorials and the past!
Message #1 Posted by Gene on 29 Apr 2005, 3:48 p.m.

While digging into some of the old TI PPC Notes PDFs I have to figure out why the TI CC40 matrix routines weren't working that I was writing (what? you don't have copies? You should all have copies of the PPC Journal competitor...you just never know when they might be of use! See ** below :-), I came across another TI speed test that caught my eye.

You remember the types of problems people used to do:

* Calculate 1000 digits of PI as fast as you can. * Factor 9999999997 as fast as you can

etc.

This was to calculate EXACT factorials as fast as possible. A program to compute exact factorials in FAST MODE on the TI59 was presented in V8N5P5. Results?

It computed the exact factorial of 610 in 7 hours and 29 minutes.

I pulled out my trusty HP49g+ in exact mode and using << 610 ! >> TEVAL got 9.0956 seconds.

Then I pulled out my Tungsten C (400Mhz X-scale) running Power48, and on the HP49 emulation in exact mode did the same thing.

Time? 2.3901 seconds.

Wow. The HP49g+ is nearly 2962 times faster than the old TI--59 program and my Tungsten C running the HP49 emulator is nearly 11272 times faster.

What a world we live in 22 years later. Gene

** These are available on Viktor Toth's web site and on the HHC2004 conference CD.

      
Re: The pace of progress - exact factorials and the past!
Message #2 Posted by J.C. Boco on 29 Apr 2005, 5:43 p.m.,
in response to message #1 by Gene

Yes indeed.

I follow computer chess, and the ride of computer strengths from rank beginner to Grandmaster Strength has been quite a fun journey.

      
Re: The pace of progress - exact factorials and the past!
Message #3 Posted by . on 29 Apr 2005, 9:44 p.m.,
in response to message #1 by Gene

"I pulled out my trusty HP49g+ in exact mode and using << 610 ! >> TEVAL got 9.0956 seconds."

Thats pretty poor. With the proper sotware (search for FFAC), it takes me about .14 seconds to get the exact result. No, thats not a mistake.

It just goes to show how fast the HP49g+ could be, if it weren't for all the legacy Saturn code.

.

            
Re: The pace of progress - challenge #8
Message #4 Posted by Palmer O. Hanson, Jr. on 29 Apr 2005, 11:06 p.m.,
in response to message #3 by .

Another data point in tha pace of progress: I wrote a 76 step TI-59 program to solve Valentin Albillo's Challenge Number 8 using the flag functions. The run time to find 81619 squared = 6661661161 was a little over 33 hours.

                  
challenge #8 on TI-59
Message #5 Posted by Marcus von Cube on 30 Apr 2005, 3:42 a.m.,
in response to message #4 by Palmer O. Hanson, Jr.

Quote:
I wrote a 76 step TI-59 program to solve Valentin Albillo's Challenge Number 8 using the flag functions.

Can you post the listing? I'd like to see it run on an emulator...

                        
Re: challenge #8 on TI-59
Message #6 Posted by doug on 30 Apr 2005, 3:48 a.m.,
in response to message #5 by Marcus von Cube

Quote:
Can you post the listing? I'd like to see it run on an emulator...

Emulator? I didn't knew that an TI-59 emulator exists. Where can I find one?

                              
Re: challenge #8 on TI-59 - Emulators
Message #7 Posted by Marcus von Cube on 30 Apr 2005, 4:06 a.m.,
in response to message #6 by doug

There is even an online version running as a Java applet:

http://www.n3times.com/vertigo/

More can be found on http://www.ti59.com

                                    
Re: challenge #8 on TI-59 - Emulators
Message #8 Posted by doug on 1 May 2005, 5:10 a.m.,
in response to message #7 by Marcus von Cube

This is simulator. I doubt it will show the same results as the real TI-59.

                                          
Re: challenge #8 on TI-59 - Emulators
Message #9 Posted by Marcus von Cube on 1 May 2005, 12:44 p.m.,
in response to message #8 by doug

Quote:
This is simulator. I doubt it will show the same results as the real TI-59.

Agreed! I doubt anyone has ever created a circuit or CPU level emulation of the real TI-59.

                                                
Re: challenge #8 on TI-59 - Emulators
Message #10 Posted by doug on 2 May 2005, 1:38 a.m.,
in response to message #9 by Marcus von Cube

Quote:
Agreed! I doubt anyone has ever created a circuit or CPU level emulation of the real TI-59.
AFAIK, no. See the thread http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/archv013.cgi?read=47346
                        
Re: challenge #8 on TI-59
Message #11 Posted by Palmer O. Hanson, Jr. on 1 May 2005, 11:03 p.m.,
in response to message #5 by Marcus von Cube

The TI-59 solution relies on the flag feature in which the only the ones digit of the value accessed by a St Flg Ind command is used to determine which flag to set. The program won't run well with the printer attached because each time Flag 9 is set the printer goes into TRACE mode.

000   61   GTO
001   60   DEG
002   76   LBL
003   11    A
004   02    2
005   32   X<>T
006   09    9
007   09    9
008   09    9
009   09    9
010   09    9
011   42   STO
012   01    01
013   76   LBL
014   60   DEG
015   69   OP
016   31    31
017   43   RCL
018   01    01
019   33   X-squared
020   42   STO
021   09    09
022   01    1
023   00    0
024   42   STO
025   00    00
026   76   LBL
027   70   RAD
028   86   STF
029   40   IND
030   09    09
031   01    1
032   00    0
033   22   INV
034   49   PRD
035   09    09
036   97   DSZ
037   00    00
038   70   RAD
039   87   IFF
040   00    00
041   35   1/X
042   09    9
043   42   STO
044   00    00
045   25   CLR
046   76   LBL
047   39   COS
048   22   INV
049   87   IFF
050   40   IND
051   00    00
052   38   SIN
053   01    1
054   85    +
055   76   LBL
056   38   SIN
057   97   DSZ
058   00    00
059   39   COS
060   00    0
061   95    =
062   67    EQ
063   30   TAN
064   76   LBL
065   35   1/X
066   81   RST
067   76   LBL
068   30   TAN
069   43   RCL
070   01    01
071   33   X-squared
072   42   STO
073   11    11
074   91   R/S
075   81   RST
                              
Re: challenge #8 on TI-59
Message #12 Posted by Marcus von Cube on 2 May 2005, 9:21 a.m.,
in response to message #11 by Palmer O. Hanson, Jr.

Quote:
The TI-59 solution relies on the flag feature in which only the ones digit of the value accessed by a St Flg Ind command is used to determine which flag to set.

I tried the same on my TI-66 (which was kind of successor to the TI-59 with the same instruction set but without modules). The above mentioned trick does not work on this machine. It looks like I need to separate the last digit on order to make St Flg Ind to work.

                                    
Re: challenge #8 on TI-59
Message #13 Posted by Palmer O. Hanson, Jr. on 2 May 2005, 9:16 p.m.,
in response to message #12 by Marcus von Cube

I don't remember noting the diffference in flag implementation. My TI-66 and manual aren't immediately available. I may be able to get to them next month.

                                          
Re: challenge #8 on TI-59
Message #14 Posted by Palmer O. Hanson, Jr. on 2 May 2005, 10:12 p.m.,
in response to message #13 by Palmer O. Hanson, Jr.

While I do not have my TI-66 or the TI-66 manual available at this time I do have the issues of TI PPC Notes from the period when the TI-66 came on the market. Page 6 of the Volume 9 Number 9 issue released in early 1984 states:

"... There is no indirect StFlg/IfFlg capability to operate on the least significant digit of a value in the indirect register ..."

While looking for that I found the following limitation on the TI-59 flag capability on page 17 of the Volume 8 Number 2 issue:

"... the StFlg Ind XX sequence sets a flag according to the ones digit if the value in register XX is an integer of twelve digits or less. If the value in register XX is an integer of thirteen digits then the StFlg Ind XX function sets a flag on the basis of the tens digit. ..."

Now you know more about all of this that you probably ever wanted to know. One of my friends used to say that Palmer is the kind of person who, if you ask him for the time of day, tells you how to build a clock.

      
Re: The pace of progress - exact factorials - 610!
Message #15 Posted by Marcus von Cube on 30 Apr 2005, 4:00 a.m.,
in response to message #1 by Gene

I always thought that the TI-92 (and its siblings) ran derive as their CAS but that's not entirely true:

Derive 6 on a PC can compute the factorial of 610 in exact mode within a fraction of a second. It displays all 3307 (?) digits. (Enter 610! and then press the [=] icon.)

The same on my TI-92+:

In exact mode 610! results in 610! (Too big to be evaluated)

In approximate mode: oo (with a warning about overflow.)

            
Re: The pace of progress - exact factorials - 610!
Message #16 Posted by . on 30 Apr 2005, 4:05 a.m.,
in response to message #15 by Marcus von Cube

Your PC has a hundred times the CPU speed and memory of the TI-92.

.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall