3 ms·
is BCD really a bad idea? it's 2012 and generally we still have to live with binary-only floats and without a decently fast decimal arithmetic.
by blue1 14y ago
is BCD really a bad idea? it's 2012 and generally we still have to live with binary-only floats and without a decently fast decimal arithmetic.
- adr_ 14y agoBCD is not a bad idea... It's not great, you can pack arbitrary precision values more tightly, and you rarely need to display them (even when you do, the screen is slower than the maths), but it's useful for a bunch of things and it's nice to think about. But does it really need an instruction on every modern computer's processor to make it that tiny bit faster? When was the last time you used a program that used that instruction? I've never run in to it (and I spend a decent amount of time looking at x86 assembly). Nonetheless, it shows up at the top of every instruction reference - you need to implement it if you want to simulate x86 correctly. But at least I can run some old 8086 code on my computer... Right?
- mmphosis 14y agoIt was a bad idea in the 6502. It was a "mode" which meant that you had to clear the decimal flag to make sure it was turned off. http://en.wikipedia.org/wiki/Ricoh_2A03 http://en.wikipedia.org/wiki/Ricoh_2A03