Re: OT : Approximate / fast math libraries ?

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

 



On Fri, Aug 31, 2007 at 03:48:45PM +0100, Chris Jones wrote:
> Does anyone have any recommendations for fast maths ? search around on 
> the web I've found a lot of references to fast / approximate math 
> libraries, but nothing obvious.
 
The AMD Core Math library ( http://developer.amd.com/acml.jsp ) is
free beer, not F/OSS, but you might want to compare your own results
to the documented scalar and vector performance of their transcendental
function implementations.  [Intel has a more extensive library, but I've
never looked through their documentation.]

Below are some performance figures excerpted from the  ACML v3.6
documentation.  In addition to the scalar and general vector versions,
there are also specialized versions for 2-vectors and 4-vectors.

The  documentation for each of these functions says: "the routine is
accurate to better than 1 ulp over the valid input range."

[ulp = unit in the last place, i.e., the trailing bit.]


fastexp: fast double precision exponential function
: double fastexp (double x)

     * Performance:
          + 75 cycles for most valid inputs.

vrda_exp: Array double precision exponential function
: void vrda_exp (int n, double *x, double *y)

     * Performance:
          + 33 cycles per value for valid inputs, n = 24.

fastlog: fast double precision natural logarithm function
: double fastlog (double x)

     * Performance:
          + 97 cycles for most valid inputs.
            86 cycles for .97 < x < 1.03


vrda_log: Array double precision natural logarithm
: void vrda_log (int n, double *x, double *y)

     * Performance:
          + 51 cycles per value for valid inputs, n = 24.

Regards,

    Bill Rugolsky


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux