SSE2: Double precision log function

Question!

I need open source (no restriction on license) implementation of log function, something with signature

__m128d _mm_log_pd(__m128d);

It is available in Intel Short Vector Math Library (part of ICC), but ICC is neither free nor open source. I am looking for implementation using intrinsics only.

It should use special rational function approximations. I need something almost as accurate as cmath log, say 9-10 decimal digits, but faster.



Answers

If you cannot find an existing open source implementation it is relatively easy to create your own using the standard method of a Taylor series. See Wikipedia for this and a variety of other methods.

By : uesp


Framewave project is Apache 2.0 licensed and aims to be the open source equivalent of Intel IPP. It has implementations that are close to what you are looking for. Check the fixed accuracy arithmetic functions in the documentation.

By : renick


Take a look at AMD LibM. It isn't open source, but free. AFAIK, it works on Intel CPUs. On the same web page you find a link to ACML, another free math lib from AMD. It has everything from AMD LibM Matrix algos, FF and distributions.

I don't know any open source implementation of double precision vectorized math functions. I guess Intel and AMD libs are hand optimised by the CPU manufacturer and everyone uses them when speed is important. IIRC, there was an attempt to implement intrinsics for vectorized math functions in GCC. I don't how far they managed to get. Obviously, it isn't a trivial task.

By : pic11


This video can help you solving your question :)
By: admin