5 ms·
Do processors accelerate decimal/fixed point? I know some have offered this in the past but I’m not current on instruction sets for accelerated maths. My guess
by fnordpiglet 4y ago
Do processors accelerate decimal/fixed point? I know some have offered this in the past but I’m not current on instruction sets for accelerated maths. My guess is a lot more energy goes into floating point and integer.
- dahfizz 4y agoNot at far as I know. That would require everyone to agree on one binary representation, which hasn't happened. There are tons of different fixed-point implementations out there, each with different tradeoffs. Choosing one implementation and getting all languages to implement it (so that CPU makers would bother accelerating it) would be a herculean task, IMO.
- labcomputer 4y agoIEEE 754 actually does specify a decimal floating point format since 2008, but I don’t think it’s widely implemented.
- dahfizz 4y agoDo you have any more info on this? The text of IEEE 754 costs $100 and I can't find any reference to it on Google
- jabl 4y agoIEEE 754-2008 combined the IEEE 754 with the IEEE 854 decimal float standard, so hence any post-2008 IEEE 754 version also contains decimal float (and IEEE 854 has been withdrawn). But like the parent poster noted, hardware tends to not actually implement the decimal float parts (I mean, IEEE 754 doesn't care about how calculations are made or how fast they are, so a software emulation is perfectly acceptable from the standard perspective). I think IBM POWER has one of the rare HW implementations of decimal floats.
- dahfizz 4y agoThank you! With the hint of IEEE 854 I was able to find https://en.wikipedia.org/wiki/Decimal64_floating-point_format https://en.wikipedia.org/wiki/Decimal64_floating-point_forma...
- kazinator 4y agoI'm amazed you didn't write: "The text of IEEE 754 costs $100.00000000000003 and I can't find any reference to it on Google." :)
- fnordpiglet 4y agoHe tried but he threw a NaN
- dev_hugepages 4y agoI don't think they do, at least on x86-64 and arm
- blibble 4y agofixed point arithmetic is just integer arithmetic (with a multiplication to enter and a division to exit)
- gpderetta 4y agoSome IBM POWER and mainframe microarchitectures have hardware support for decimal floats. Acceleration for binary fixed precision was (still is I guess) common in DSPs. Not decimal fixed though. I lost track of which extensions Intel provides, but I wouldn't be surprised if something was available.
- rerdavies 4y agoIntel processors have instructions for performing decimal addition and subtraction, with 2 decimal digits per byte, but they are only available in 32-bit mode, and were dropped in 64-bit mode, which I guess answers the question of whether anyone ever actually used them. https://docs.oracle.com/cd/E19120-01/open.solaris/817-5477/eoizj/index.html https://docs.oracle.com/cd/E19120-01/open.solaris/817-5477/e...