▼
Posts: 349
Threads: 66
Joined: Apr 2007
Hi,
Now that the 15C LE is announced, I did a slight update to the PPC HP-calc archive DVD disk to include the 53 HP15C-related pages distributed at the HHC2010 conference last year. Each attendee received an "HP15C+" prototype under NDA and they even based the annual programming contest on the 15C. (Can you imagine everyone keeping quiet for a year? It somehow worked out...) More info on the disk may be obtained by checking http://www.pahhc.org/ppccdrom on the web.
Thanks,
Jake
P.S. - HHC2011 is going to be amazing.....check http://hhuc.us/2011/index.htm for info
▼
Posts: 2,761
Threads: 100
Joined: Jul 2005
Quote:
(Can you imagine everyone keeping quiet for a year? It somehow worked out...)
You are a bunch of trustworthy people!
Posts: 1,545
Threads: 168
Joined: Jul 2005
The contest for the 15c LE was to sort numbers in 0 through 9 in ascending order.
Winning program was published here and was something like this:
LBL A
8
STO I
RCL 9
LBL 0
RCL (i)
TEST 7
GTO 1
DSE I
GTO 0
RTN
LBL 1
X<>Y
X<> (i)
ISG I
LBL 1
STO (i)
GTO A
That at least, was my program. :-) Richard Schwartz won the contest by replacing the NOP LBL 1 I used with MATRIX 9, certainly a more ingenious NOP.
However, the contest for RPL machines was to sort a list of numbers in ascending order but to sort the odd numbers first, then the even numbers. So, given 1, 2, 3, 4, the result would have been 1, 3 then 2, 4 but for 10 values.
After the conference, I wrote the program on the PDF attached so the 15c LE could sort numbers in 0 through 9 with the odd numbers sorted first and the even numbers sorted afterward.
This took a LONG time with the 15c, but runs FAST on the 15c LE.
Program Listing
I expect a great deal of additional information will be presented at HHC 2011 in a few weeks.
▼
Posts: 3,229
Threads: 42
Joined: Jul 2006
Quote: Richard Schwartz won the contest by replacing the NOP LBL 1 I used with MATRIX 9, certainly a more ingenious NOP.
Why would this make the difference between winning and not?
- Pauli
▼
Posts: 1,545
Threads: 168
Joined: Jul 2005
Because it was considered more elegant. :-)
It was funny...Richard and I *independently* came up with the exact same solution otherwise. Richard turned his in several hours before I did, which also properly figured into it, since the solutions were the same otherwise.
So, having lost the HHC contest, I programmed the RPL challenge on the 15c LE, which has now been shared in the PDF.
▼
Posts: 3,229
Threads: 42
Joined: Jul 2006
More elegant? No way. MATRIX 9 is a *two* byte command whilst LBL 1 is a *one* byte command. You lost unfairly ;-)
Not being first is a good reason however.
- Pauli
▼
Posts: 1,545
Threads: 168
Joined: Jul 2005
Oh, I wasn't sad at all. Richard Schwartz is an amazing person and merely coming up with the same code as he did, even if a bit later, :-) made me feel very nice.
Hey Pauli... how about a 34s program that does the same thing?
Random positive integers stored in 0 through 9. Sort the odd numbers first, then the even numbers. Examples of input and output:
Input stored in 0 through 9: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
Output stored in 0 through 9: 1, 3, 5, 7, 9, 2, 4, 6, 8, 10.
Input stored in 0 through 9: 2, 2, 5, 1, 9, 4, 8, 8, 6, 3
Output stored in 0 through 9: 1, 3, 5, 9, 2, 2, 4, 6, 8, 8.
etc. Be good to see just how small and fast a 34s version would be.
▼
Posts: 3,229
Threads: 42
Joined: Jul 2006
Quote: Hey Pauli... how about a 34s program that does the same thing?
The base challenge for the 15c is kind of a non-event:
001: LBL A
002: .
003: 1
004: R-SORT
005: RTN
The odd/even version might be a fun challenge to pose.
Maybe I should modify R-SORT to take a label argument that defines an ordering function.
- Pauli
Edited: 2 Sept 2011, 8:11 a.m.
▼
Posts: 1,545
Threads: 168
Joined: Jul 2005
Agreed on the plain "sort 1 through 9" or "sort 0 through 9" part. :-)
It is the odd / even distinction that makes it interesting! :-)
Is redefining how a function works considered cheating? :-)
▼
Posts: 3,229
Threads: 42
Joined: Jul 2006
Quote: It is the odd / even distinction that makes it interesting! :-)
Had a neat idea about this one last night while suffering a bit of insomnia. If we run the 34S in integer sign and mantissa mode and assume that the supplied integers are positive then we can apply this bit of code:
9
STO I
LBL 00
RCL->I
ODD?
NOT
STO->I
DSZ I
GTO 00
Then sort registers 1 - 9 however you want. R-SORT isn't viable here unfortunately here since we're in integer mode. Finally:
9
STO I
LBL 01
RCL->I
x<0?
NOT
STO->I
DSZ I
GTO 01
And you have you result. The clever trick I'm relying on here is that in sign and mantissa mode, NOT negates the number without reversing the apparent ordering of the numbers. For example, in 4 bit integer mode:
# NOT #
1 -6
3 -4
5 -2
This relies on having positive numbers in the registers. If negatives are permitted as well, the problem is a bit more interesting. RR 01 might be a viable transform.
Quote: Is redefining how a function works considered cheating? :-)
Only if I can't justify the change as useful more globally :-)
- Pauli
▼
Posts: 1,545
Threads: 168
Joined: Jul 2005
Quote:Gene -- Is redefining how a function works considered cheating? :-)
Quote: Pauli -- Only if I can't justify the change as useful more globally :-)
I agree with that! I will key this in and play.
Posts: 1,830
Threads: 113
Joined: Aug 2005
Since we assume all were positive, we can do
RCL->I
ABS
STO->I
in the second code block. I'm assuming we have "ABS" on the 35s. Mine is out of batteries too.
▼
Posts: 3,229
Threads: 42
Joined: Jul 2006
Quote:
Since we assume all were positive, we can do
RCL->I
ABS
STO->I
in the second code block. I'm assuming we have "ABS" on the 35s. Mine is out of batteries too.
Yes, the *34S* has ABS.
ABS isn't sufficient in this case. The NOT used initially isn't just negating the number. It is making the number negative in a way such that the relative ordering of the (positive) numbers doesn't change.
- Pauli
Edited: 2 Sept 2011, 7:35 p.m.
Posts: 3,229
Threads: 42
Joined: Jul 2006
Quote: Hey Pauli... how about a 34s program that does the same thing?
How about this:
001: LBL A
002: 8
003: STO I
004: RCL 09
005: LBL 00
006: ODD?
007: GTO 90
008: RCL->I
009: ODD?
010: GTO 80
011: x>? Y
012: GTO 01
013: GTO 80
014: LBL 90
015: RCL->I
016: EVEN?
017: GTO 01
018: x>? Y
019: GTO 01
020: LBL 80
021: DSE I
022: GTO 00
023: RTN
024: LBL 01
025: X<>Y
026: X<>->I
027: INC I
028: STO->I
029: GTO A
If I could be bothered counting steps and using SKIP and BACk, the total would reduce by four steps to 25. The final RTN could also be omitted by moving the LBL 01 block above LBL 90 to bring the total to 24.
- Pauli
▼
Posts: 3,229
Threads: 42
Joined: Jul 2006
A bit of rearrangement and it is down to 24 steps without omitting the final RTN. 23 if it is omitted.
001: LBL A
002: 8
003: STO I
004: RCL 09
005: ODD?
006: SKIP 10
007: RCL[->]I
008: ODD?
009: SKIP 12
010: x[<=]? Y
011: SKIP 10
012: x[<->]y
013: x[<->][->]I
014: INC I
015: STO[->]I
016: GTO A
017: RCL[->]I
018: EVEN?
019: BACK 07
020: x>? Y
021: BACK 09
022: DSE I
023: BACK 18
024: RTN
Any advances?
- Pauli
Posts: 170
Threads: 7
Joined: Apr 2009
any chance of the information (the 50+ pages) being made available online?
cheers,
rob :-)
▼
Posts: 349
Threads: 66
Joined: Apr 2007
Quote:
any chance of the information (the 50+ pages) being made available online?
Here you go:
http://dl.dropbox.com/u/33228006/HHC2010%20Programming%20Contest.pdf
http://dl.dropbox.com/u/33228006/HP15C%2B%20Speed%20Comparison%20and%20Reference.pdf
http://dl.dropbox.com/u/33228006/Programming%20the%2015C%2B.pdf
(I hope this works)
▼
Posts: 1,545
Threads: 168
Joined: Jul 2005
Note: the 15c given to us at the conference was a beta version. There were a couple of issues that were fixed for the 15c LE, which increased speed on some things.
The speed tests are for the BETA unit, not the shipping unit.
I know many presentations will be made in a couple of weeks at the conference on this great machine.
This year's conference will truly be great.
▼
Posts: 1,545
Threads: 168
Joined: Jul 2005
Here's a slightly better version of my 15c example presentation.
I did the problem to be FUNNY with it and to see how fast the machine really is.
Turns out this example pointed out a slight problem with the emulator which has been fixed and now this example runs at about 150X faster as well, which was not quite the case at the conference.
15c session better copy
Posts: 3,229
Threads: 42
Joined: Jul 2006
Stop making those of us who cannot attend jealous :-(
- Pauli
▼
Posts: 2,247
Threads: 200
Joined: Jun 2005
Maybe Jake can post some of the sessions on YouTube???
Namir
▼
Posts: 349
Threads: 66
Joined: Apr 2007
Quote:
Maybe Jake can post some of the sessions on YouTube???
Actually, if you search for "HHC2010" on YouTube, you will find many session videos up there, placed there by Eric Rechlin. It is still my goal to have the DVDs complete by conference time, and to have multiple sets on the door-prize table.
Jake
▼
Posts: 1,830
Threads: 113
Joined: Aug 2005
If you do that search, you get a lot of hits related to Hip Hop. I know that fits the demographics here to a "T," but you might try going directly to Eric Rechlin's YouTube page instead :)
Posts: 170
Threads: 7
Joined: Apr 2009
all downloaded successfully :-)
Posts: 1,830
Threads: 113
Joined: Aug 2005
That reference document is priceless. The reprintings of Valantin Abillio's "Long Live the HP-15C!" and his polynomial fitting article lay out the case for the HP-15Cs worthiness better than any other documents I'm aware of. Then we find, later on in the appendices, John Dearing's 15C review in the PPC journal. Some of his complaints about the machine, coming from the perspective of a 41C user, echo many that I've seen here lately. His list of pros include many of Mr Abillio's points and few more. The rest of the material is extremely useful and interesting too. Kudos!
▼
Posts: 1,545
Threads: 168
Joined: Jul 2005
Howard, see what happens when you skip an HHC?
:-)
See you in a couple of weeks.
▼
Posts: 1,830
Threads: 113
Joined: Aug 2005
A fault I will remedy this year :)
|