[cairo] Patches for speeding up _cairo_fixed_from_double
daniel.amelang at gmail.com
Mon Nov 6 15:49:32 PST 2006
On 11/6/06, Behdad Esfahbod <behdad at behdad.org> wrote:
> On Mon, 2006-11-06 at 18:28 -0500, Daniel Amelang wrote:
> > > So we've fixed bugs in this area before, and I'd like to not make
> > any
> > > regressions here. It would be a nasty thing to check for since it's
> > a
> > > run-time condition. But perhaps the current code works fine. Have
> > you
> > > tested and verified failure in single-precision mode?
> > Yes.
> So, can you elaborate? How and why does it fail?
In single-precision mode, the new function returns zero for all input.
This is because the large add that is performed overflows the FPU when
it's only operating on 32-bits.
> I understand what you are suggesting, and I think it makes sense to
> document cairo not working with single-precision, but still i don't see
> how that affects the fast conversion which doesn't work with FPU at all.
The fast conversion _does_ work with an FPU (and without one), the
issue is what mode that FPU is in.
I can explain more this Thursday if you need, I really have to get
back to school work right now, sorry. I know you and Carl have other
questions unanswered in this thread, I promise 'll get to them later.
More information about the cairo