The pace of progress - exact factorials and the past!



#8

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.


#9

Yes indeed.

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

#10

"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.

.


#11

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.


#12

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...


#13

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?


#14

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


#15

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


#16

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.


#17

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
#18

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

#19

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.


#20

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.


#21

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.

#22

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.)


#23

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

.


Possibly Related Threads...
Thread Author Replies Views Last Post
  [HP Prime] "Error while checking exact value with approximate value, returning both!" Chris Pem10 13 1,775 12-06-2013, 05:12 AM
Last Post: parisse
  New Blog: Factorials Eddie W. Shore 6 846 10-21-2012, 11:27 AM
Last Post: Eddie W. Shore
  DIY5 calculator progress Eric Smith 7 783 09-13-2012, 05:01 PM
Last Post: Walter B
  DIY4X/DIY5 progress! Eric Smith 6 761 03-08-2012, 06:51 PM
Last Post: Eric Smith
  When is exact mode not so exact? hugh steers 7 716 02-24-2012, 05:37 AM
Last Post: Bart (UK)
  9100B restoration progress David Ramsey 6 742 11-27-2011, 10:33 AM
Last Post: Etienne Victoria
  9100B progress David Ramsey 11 1,008 11-17-2011, 08:30 AM
Last Post: Joel Setton (France)
  9100B progress David Ramsey 6 755 11-04-2011, 11:32 AM
Last Post: David Ramsey
  OpenRPN Prototyping In Progress Hugh Evans 19 1,524 10-20-2011, 09:16 AM
Last Post: Oliver Unter Ecker
  HP keyboards, past and present Cristian Arezzini 4 544 10-14-2011, 01:34 PM
Last Post: Lincoln R.

Forum Jump: