[cairo] Bug in PDF output with independent path/pen transformations

Jamey Sharp jamey at minilop.net
Sat Nov 3 22:52:56 PDT 2007

Hash: SHA1

On 10/31/07, Behdad Esfahbod <behdad at behdad.org> wrote:
> 18 digits is still not enough to write a number like 7e-100.  What we
> really want is up to a large number of digits (100?), but only 5 6
> meaningful digits.  How many and how many exactly?  For implementing
> it, we can either write a loop of some kind or use more expensive
> operations ...

I guess the rafb.net post expired, as it returns 404 for me. But Mike
Haertel was recently working on printing minimum sequences of digits for
floating point numbers, so I asked him how that's going. He told me he
has short, simple, but slow code that isn't quite production quality
yet--doesn't put the decimal point in the right place, for example, but
gets the right sequence of digits. It uses exclusively integer
operations, I gather.

Alternatively, he pointed me at <http://www.netlib.org/fp/>, especially
dtoa.c and the sample driver routine in g_fmt.c. There's also a
reference there to a paper describing the algorithms used. That should
be very fast, but is large and complicated. Its speed comes from using
the FPU to do most of the work in most cases, apparently.

I hope the reference is helpful. If you're interested in Mike's simple
implementation, I can see if he'll finish it and pick a license for it
that's compatible with cairo.

Version: GnuPG v1.4.6 (GNU/Linux)


More information about the cairo mailing list