Ego massage mode maybe but based on genuine interest.
I recently became aware of the so called CORDIC division algorithm thanks to a post by member @cmartinez which brought me to this site. If I recall right, member @jpanhalt contributed there and maybe @Papabravo and Bob something (sorry).
Instead of limiting myself to 16 bits I decided to greedily work out a routine able to cope with up to 48 bits (dividend) and 32 bits (divisor). The algorithm gives de facto the remainder whether you need it or not.
Two hours ago I completed the first tests with valid results. Had to struggle with lot of clerical errors and a printed flow diagram was invaluable.
Code is not optimized in any way albeit seems to be correctly debugged but I do not plan to show it yet.
The calculations for the initial alignment of both MS bits plus the subsequent shiftings make for a lot of code, lot of RAM registers and a lot of T cycles.
My request: before deciding whether to stop here or to continue improving my code, I would like to hear comments if it sounds reasonable simply maybe because this CORDIC variety is not the way to go for huge numbers.
Gracias.
F2 79 D8 94 65 31 / BC = 01 4A 2E 16 93 9A | 19
I recently became aware of the so called CORDIC division algorithm thanks to a post by member @cmartinez which brought me to this site. If I recall right, member @jpanhalt contributed there and maybe @Papabravo and Bob something (sorry).
Instead of limiting myself to 16 bits I decided to greedily work out a routine able to cope with up to 48 bits (dividend) and 32 bits (divisor). The algorithm gives de facto the remainder whether you need it or not.
Two hours ago I completed the first tests with valid results. Had to struggle with lot of clerical errors and a printed flow diagram was invaluable.
Code is not optimized in any way albeit seems to be correctly debugged but I do not plan to show it yet.
The calculations for the initial alignment of both MS bits plus the subsequent shiftings make for a lot of code, lot of RAM registers and a lot of T cycles.
My request: before deciding whether to stop here or to continue improving my code, I would like to hear comments if it sounds reasonable simply maybe because this CORDIC variety is not the way to go for huge numbers.
Gracias.
F2 79 D8 94 65 31 / BC = 01 4A 2E 16 93 9A | 19