On Jul 22, 7:21 pm, Ben Pfaff <[EMAIL PROTECTED]> wrote: > James Kanze <[EMAIL PROTECTED]> writes: > > C doesn't have any support for decimal arithmetic, nor any means > > of adding it comfortably.
> http://www.open-std.org/jtc1/sc22/open/n4060.pdf Yes, I'd heard about this. But I wasn't too sure of its status, and it isn't implemented by the compilers I regularly use. IMHO, it is an important step forward. Both decimal and complex are really only used by a restricted community; one could argue on those grounds that they don't belong in the standard of a general purpose language. On the other hand, those communities really do need them, and not having them generally means that the language can't be used for certain applications, at least not effectively. C++ sort of side steps the issue; because it has operator overloading, you can (supposedly) write your own, or use a third party library. But your own or a third party library is still not the same thing as "standard"; and in the case of decimal arithmetic, there are also performance issues to consider: many machines have direct hardward support for decimal arithmetic, which a library written in C or C++ won't be able to access. (Many years back, I was involved in porting some software using BCD to different architectures. The person who ported it to the Siemens mainframe rewrote the four BCD arithmetic operators in assembler: something like 40 lines of assember, with no loops, to replace 400 lines of C, with several loops, and a speed up of five magnitude.) -- James Kanze (GABI Software) email:[EMAIL PROTECTED] Conseils en informatique orientée objet/ Beratung in objektorientierter Datenverarbeitung 9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34 _______________________________________________ gnu-misc-discuss mailing list [email protected] http://lists.gnu.org/mailman/listinfo/gnu-misc-discuss
