Posts: 1,619
Threads: 147
Joined: May 2006
I was reading the "PI to 1,110 Places" article by Ron Knapp, and thought I'd give it a go, but the program does not work. I triple checked my code. I suspect a typo in the original article. Fortunately there is a barcode, but unfortunately the scan from my PPC Journal CD is too poor to use.
Before I spend the time searching for the source of the failure in this 396 line program I thought I'd ask if any has a working version in text or RAW format. Or if someone has a cleaner scan of the PPC Calculator Journal V7 N5. Or if you have the original can you wand it in for me.
There are some distinct advantages to the algorithm used in this article that I want to explore.
Thanks.
Posts: 255
Threads: 59
Joined: Jul 2007
Egan:
I pulled up my HP-41 disk and went through the NOP columns of the PPC issues after V7N5, but I didn't see any corrections for the "PI to 10,000 Places" program. I did find in the "Further Reading" column of V8N2P4 where there is a graphical comparison of how long several different calculators took to calculate Pi to different decimal points.
I have a paper copy of V7N5 and I can mail to you a Xeroxed copy of the bar code, or I can scan it with my wand (if it still works) and send you a magnetic card (I have had my card reader fixed). I do have HP-IL and could run it through my HPIL to RS232C converter (I need to build a D-25 to D-9 cable and I have all the connector shells here at work) that I got recently but haven't used yet. Or, I can get really crazy and dig out my HPIL ISA card and put it in my old Pentium 233 and load up LIF(?) utilities and try to transfer the program that way, but I've never done that before. I bought the hardware but I haven't been motivated yet to learn how to do this. Now, I have a reason to play.
So, I'll try to scan the program into my 41 if my Wand works and save it off to cards. Then I can let you know if this will work. If someone else chimes in with a quicker solution for you, then I don't have to rush to get you a file.
Gerry
Posts: 1,619
Threads: 147
Joined: May 2006
Thanks for the offer to wand it in. I do not have a card reader. All my I/O needs are met with HP-IL.
The ISA card is easy, just get EMU41 (free version now has HP-IL ISA support). I can send you the EMU41 config file to get you started. Then you just initialize a virtual floppy, copy the file over, and send me the virtual floppy file as email.
Something easier would be to wand it in and print it out, then just fax me the printout.
Photocopy of the barcodes would be fine too. I'll take whatever I can get.
BTW, there is no rush whatsoever. Take your time.
Thanks.
Posts: 255
Threads: 59
Joined: Jul 2007
Okay Egan, I check out my Wand this weekend. By the way, are you going to the HHC 2008? I didn't see you listed. I'm going to drive up from L.A. and as I've never gone to one of these 'conferences' before and it's in just a few weeks, I'm getting excited. I know, my wife thinks I'm crazy but she has given her blessing.
So, if you do go, please look me up.
Thanks,
Gerry
Posts: 1,619
Threads: 147
Joined: May 2006
Hold everything. I found the "bug". I am happy to report that it was all me. I had one statement as STO when it should have been GTO. It was easier to see my error with natural light.
If any want this program visit http://sense.net/~egan/41cx.
iPhone i41cx+ users can download directly to emulator with that URL, then set printer to MAN, then enter the number of digits you want and XEQ CPI.
Edited: 5 Sept 2008, 9:00 p.m.
Posts: 2,761
Threads: 100
Joined: Jul 2005
Quote:
Before I spend the time searching for the source of the failure in this 396 line program I thought I'd ask if any has a working version in text or RAW format. Or if someone has a cleaner scan of the PPC Calculator Journal V7 N5. Or if you have the original can you wand it in for me.
It's a bit late now, but these might be useful.
http://free42.sourceforge.net/42progs/pi_dec.raw
http://free42.sourceforge.net/42progs/pi.png
Gerson.
Posts: 1,619
Threads: 147
Joined: May 2006
Thanks.
I've posted the original PI.* and a modified version CPI.* here http://sense.net/~egan/41cx. The CPI.* version has improved output with time to solution, e.g.:
Time: 00:00:04.78
3.14159265358979323846
26433832795028841971
69399375105820974944
59230781640628620899
86280348253421170679
82148086513282306647
09384460955058223172
53594081284811174502
84102701938521105559
64462294895493038196
Ignore the Time, this run was from EMU41.
Posts: 255
Threads: 59
Joined: Jul 2007
Egan:
Good, I'm glad you found the problem. I tried using my Wand to scan the original barcode this weekend but all my 41s came up with checksum errors. I suspect that the LED in the Wand has gotten weak and is not reading the barcode properly.
I remember a long time ago, there was a lot of discussion in the PPC about publishing barcodes as the paper the PPC journals were printed on is thin and, in this case, there are barcodes on both sides of the page which could generate crosstalk and generate checksum errors.
I'm going to try the old trick of xeroxing the pages and try scanning the copies. That should tell me if it's the Wand's LED or the paper thinness.
Gerry
Posts: 1,619
Threads: 147
Joined: May 2006
Quote:
Good, I'm glad you found the problem. I tried using my Wand to scan the original barcode this weekend but all my 41s came up with checksum errors.
I got the same errors with the scan.
Quote:
I remember a long time ago, there was a lot of discussion in the PPC about publishing barcodes as the paper the PPC journals were printed on is thin and, in this case, there are barcodes on both sides of the page which could generate crosstalk and generate checksum errors.
Yes that is a problem, some of the scans have ghosts of the back pages.
I created my own barcodes if you want to test out your wand.
PDF of PI barcodes: http://sense.net/~egan/41cx/pi.pdf
PDF of CPI barcodes: http://sense.net/~egan/41cx/cpi.pdf
Posts: 255
Threads: 59
Joined: Jul 2007
Egan:
Thanks for the Barcode postings. I printed them out on a good HP Laserjet and tried to scan the PI program on my CV this morning. It scanned in just fine with little or no problems. Boy, my use of the Wand sure is rusty. Now I know that it reads good barcodes just fine.
Thanks again,
Gerry
Posts: 243
Threads: 122
Joined: Jan 2006
How did you create the bar codes?
Thank's
Posts: 1,619
Threads: 147
Joined: May 2006
Assuming you created an RPN program in plain text and called it prog.rpn:
DEL prog.raw
HP41UC /t=prog.rpn /r=prog.raw
DEL prog.ps
HP41UC /r=prog.raw /s=prog.ps "PROG"
Once you have the Postscript file, use any number of freely available Postscript to PDF converters. I use ps2pdf under Linux (included with most distros), UNIX, or Cygwin (UNIX environment for Windows, also free).
PS2PDF example:
ps2pdf PROG.PS prog.pdf
Once in Postscript format you can also convert to any other format with additional freely available tools, e.g. I used NetPBM to create a Web friendly barcode just for you:
Sadly you cannot wand it off the screen. At least not LCD, I've often wondered if E-ink would work.
Links:
Edited: 11 Sept 2008, 4:29 p.m.
Posts: 243
Threads: 122
Joined: Jan 2006
|