[sac-user] print function alternatives?

Robert Bernecky bernecky at snakeisland.com
Mon Aug 2 20:06:14 CEST 2010

Thanks for the pointer to netlib; I'll take a look at it!

The Steele and White paper predates the Burger and Dybvig,
paper, which is why the latter paper title include "Quickly and".

I think printf and friends support hex output. If so,
it should be trivial to enhance show() to include the
format string as an added argument.


Raphael 'kena' Poss wrote:
> Hi all,
> Op 2 aug 2010, om 18:45 heeft Robert Bernecky het volgende
> geschreven:
>> In particular, it still uses printf() [...] My intent was to make
>> it use a precise formatter, such as that proposed in "Printing
>> Floating-Point Numbers Quickly and Accurately", by Robert G. Burger
>> and R. Kent Dybvig.
> For your information, many open-source Unices nowadays use the gdtoa
> library by D. Gay from netlib: http://www.netlib.org/fp/gdtoa.tgz
> This uses concepts and algorithms from
> T. J. Dekker, "A Floating-Point Technique for Extending the Available
> Precision", Numer. Math. 18 (1971), pp. 224-242
> and
> "How to Print Floating-Point Numbers Accurately" by Guy L. Steele,
> Jr. and Jon L. White [Proc. ACM SIGPLAN '90, pp. 112-126].
> As far as precision goes, this is formally specified. I don't know
> how it compares to the techniques in Burger & Dybvig, actually.
> As an option, is it possible to output floats in hexadecimal? This
> should prevent rounding errors.

More information about the sac-user mailing list