Vincent Lefevre wrote: > Changing the rounding precision is. The C standard defines how you > can change the rounding direction, but not the rounding precision.
Back in the early 1990's, work on solving this inadequacy was being done by the X3J11 Numerical C Extensions Group. Rex Jaeschke was the chair, if memory serves. In fact, NCEG *did* improve C's numerics if one uses the Zortech/Symantec/Digital Mars compiler. I know, because I wrote a 90-page manual on numerical computing for Zortech/Symantec. I haven't looked at Digital Mars C, but I believe it still supports the proposed NCEG extensions. Only a few fragments of NCEG's work made it into C99, much to my disappointment. I suppose it would be possible to implement NCEG in GCC, but I doubt anyone would pay for the work involved -- yet I'd love to have a -ffloat-nceg on platforms that could support it. If anyone's curious, I have a PDF of that old manual of mine I can make available. I don't have any electronic copies of the NCEG documents, unfortunately, but my book covers pretty much everything. ..Scott