4 ms·
The second Parallax Propeller chip has a CORDIC engine in silicon. It's fast, and handles 64bit intermediate products, which makes the divide and trig stuff mo
by ddingus 2y ago
The second Parallax Propeller chip has a CORDIC engine in silicon. It's fast, and handles 64bit intermediate products, which makes the divide and trig stuff more than adequate precision for most things. One can always increase precision in software too.
I was late to the game learning about CORDIC. I had used fixed point a lot in 8 and 16 bit assembly land for performance, and determinism.
When I found out about it, I was stunned! It was fast, and only required basic math capability to be useful.
- djmips 2y agoI found that a lack of barrel shifter or at least micro-coded shift 'n' hampers Cordic in an 8 bit CPU but I coded a routine up for fun in 6502. I never found a use for it myself as there always seems to be a faster way to do things for games programming at least. https://forums.atariage.com/blogs/entry/3385-atan2-in-6502/ https://forums.atariage.com/blogs/entry/3385-atan2-in-6502/
- ddingus 2y agoYes a barrel shifter would have been a nice addition to the 6502. L Yes, general purpose code is rarely the answer. I think all of us see that after a while. Then, after that process, one starts coding differently. Chain stuff together, using common ops, pulling off intermediate values, etc... For most things, a fast way exists, but it will often be a tweak or two to make sense in the context.
- ddingus 2y agoI looked it over and frankly, I could not do better, or maybe even as good. Nice work!
- djmips 2y agoThanks!