Extending the precision of Woodstock or Saturn based calculators
09-24-2017, 07:57 AM (This post was last modified: 09-24-2017 08:06 AM by Alejandro Paz(Germany).)
Post: #16
 Alejandro Paz(Germany) Member Posts: 135 Joined: Mar 2016
RE: Extending the precision of Woodstock or Saturn based calculators
Quote:Start with divide by 3, and square root of 5, before jumping to : asin(acos(atan(sin(cos(tan(1/9))))))

That's why I used 5 as an example for the square root .

Anecdotally, some TI calculators like the TI-82, TI-83, TI-84, TI-85 and TI-86 among others use a Z80 as main processor. They can be divided in two groups lower and upper end. Both groups use very similar routines, the difference lays in the precision of the algorithms used, really minimal, like 2-4 digits and larger exponents.

But, the interesting part is that the numbers are stored in memory and used in place. The Z80 has a full complement of BCD friendly opcodes add, sub, daa (for addition and subtraction), and 4 bit shifts between accumulator and memory !, and many 16 bit pointers. All these resources are very well exploited in the mentioned models.

The whole math group of routines in the Saturn takes like 4 kbytes of memory, in the case of the Z80 (like in the TI-8x but not the 89) it takes, if I'm not mistaken, like 10 kbytes with the inflexibility of having the numbers always fixed in memory.

One could tailor such routines to use BC, DE, and HL but that means only 6 digits. I think that the way the TIs handle the whole is quite clever. That is a point where the Z80 actually excels in comparison with other more modern processors. Always talking about packed BCD. Nowadays one can achieve quite a bit more performance using base 100 (like I did), base 10000 (like the unix command bc) or greater bases like newRPL and others. Something doable when you have a relatively fast division and multiplication instructions, something totally lacking in the Z80. (The Z180 has a mul instruction) and memory constraints are not as severe as they once were !.

Another anecdote: Some like 20 years ago, I decided to use the H8/300H (A then Hitachi processor much like but not compatible with the MC68k) as the basis for my handheld calculator. This processor has 8 32 bit registers, as you can imagine I used the registers to temporarily contain the fractions of the floating point registers as I performed calculations, limited to 16 packed BCD digits. My target speed was like 8 MHz and that made kind of sense. Today, I'd go with a greater base, it just makes more sense with a RISC processor.

I also developed an AVR based BCD four function package with 16 digits precision. The AVR doesn't help at all with BCD and unrolled routines needed quite a bit of space.
 « Next Oldest | Next Newest »

 Messages In This Thread Extending the precision of Woodstock or Saturn based calculators - Alejandro Paz(Germany) - 08-09-2017, 07:17 AM RE: Extending the precision of Woodstock or Saturn based calculators - Paul Dale - 08-09-2017, 08:32 AM RE: Extending the precision of Woodstock or Saturn based calculators - Massimo Gnerucci - 08-09-2017, 10:00 AM RE: Extending the precision of Woodstock or Saturn based calculators - Paul Dale - 08-09-2017, 11:04 AM RE: Extending the precision of Woodstock or Saturn based calculators - Massimo Gnerucci - 08-09-2017, 01:22 PM RE: Extending the precision of Woodstock or Saturn based calculators - Paul Dale - 08-10-2017, 07:42 AM RE: Extending the precision of Woodstock or Saturn based calculators - Alejandro Paz(Germany) - 08-10-2017, 05:58 AM RE: Extending the precision of Woodstock or Saturn based calculators - J-F Garnier - 08-10-2017, 07:48 AM RE: Extending the precision of Woodstock or Saturn based calculators - Alejandro Paz(Germany) - 08-10-2017, 12:22 PM RE: Extending the precision of Woodstock or Saturn based calculators - Paul Dale - 08-11-2017, 03:07 AM RE: Extending the precision of Woodstock or Saturn based calculators - Claudio L. - 08-11-2017, 04:09 PM RE: Extending the precision of Woodstock or Saturn based calculators - Alejandro Paz(Germany) - 08-11-2017, 06:04 AM RE: Extending the precision of Woodstock or Saturn based calculators - Alejandro Paz(Germany) - 09-14-2017, 11:38 AM RE: Extending the precision of Woodstock or Saturn based calculators - Alejandro Paz(Germany) - 09-14-2017, 11:47 AM RE: Extending the precision of Woodstock or Saturn based calculators - sa-penguin - 09-23-2017, 07:48 AM RE: Extending the precision of Woodstock or Saturn based calculators - Alejandro Paz(Germany) - 09-24-2017 07:57 AM RE: Extending the precision of Woodstock or Saturn based calculators - Alejandro Paz(Germany) - 09-28-2017, 12:40 PM

User(s) browsing this thread: 1 Guest(s)