|13: Unlucky number for some...|
Message #1 Posted by Angel Martin on 28 Nov 2010, 12:05 p.m.
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.