HP Forums

Full Version: 13: Unlucky number for some...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

Greetings fellow SW archaeologists :)

I few days ago I started to look into the 41 OS code (ROM_1) to better understand the 13-character math routines. It's been a great journey of discovery, which has finally been fruitful.

Once I understood their design and utilization I set forth to "update" every possible system call within the SandMath and the 41Z, ttaking advantage of the "extended precision" routines. Not a totally trivial thing, as it's all ridden with potential goofs if you aren't extra-careful (and even if you are!)

The good news is the work is done - Yep, they make a (small) difference, so that the final results are correct to the 10th decimal digit - I love it when GAMMA(7) is exactly 720, pure integers all the way up to the range of the 41 :)

The added bonus is that the code is shorter - it's now clear to me that the math routines within the OS where designed to be all 13-char. There are auxiliary ones that make the data handling easier, and in general they require a reduced number of steps. ADDONE, SUBONE, STSCR, RCSCR...etc. Even PI/2 and LNC10 ar all in 13-char fashion, quite some piece or work indeed.

Oh, they also are NOT slower than the 10-char counterparts - just because there are no 10-char counterparts! They are the same routines, just using the "truncated form" in the data input. Clever as it can get, an awesome design to overcome the limitations of yore.

So be in the lookout for the updated modules posted in a couple of days at a TOS near you :)


Edited: 28 Nov 2010, 1:27 p.m.


Would it be possible to document your findings now that you understand it and have it fresh in your mind? It could be of help to others...

Anyway, great work!

Yes, I shall prepare a short article for the forum and a pdf for download @ TOS... it's a bunch of routines, so a few pages will be required.

Perhaps that is why there was never a HP-13 ;-D

The mini-paper is done and submitted to TOS. I tried Geir's Wiki but got lost in the process, afraid I'll need some practice with the new tool. Let me know if you'd like the sneak peek and I'll email you the pdf doc.


... but, let's get through the learning curve.

What you need to do is take pure text and paste it into the page after clicking "edit".

I really want to see this wiki capture knowledge.