freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Devel] FT_SquareFix?


From: Keith Packard
Subject: Re: [Devel] FT_SquareFix?
Date: Sat, 28 Apr 2001 16:18:56 -0700

Around 12 o'clock on Apr 28, Tom Kacvinsky wrote:

> I wonder: is there an optimization that could be made for calculating the
> square of two 16.16 fixed numbers?

Of course there is, if you're doing 16-bit partial products:

        a * a = (a0 * 65536 + a1) * (a0 * 65536 + a1)
              = a0*a0 * 2^32 + 2 * a1*a0 * 65536 + a1*a1

As you can see, you can eliminate a 16x16 multiply in the middle over
the usual multiplication routine.  This takes 3/4 the time of a simple 
multiply.

address@hidden   XFree86 Core Team              SuSE, Inc.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]