Pink Iguana

Home » Uncategorized » Naoki Shibata

Naoki Shibata


Naoki Shibata, Google+, here. Did SLEEF – SIMD Library for Evaluating Elementary Functions, here. Nice work. We have talked with various intrinsic library folks about producing a restricted range vector exponential for FinQuant applications. The idea is that by reducing the range of the vector expontential to be an interest rate that you actually expect to see in an MC  simulation you can reduce the number of approximation terms in the Chebyshev expansion without losing the desired error bounds. Such a code might save a couple of cycles per element ( a big deal) but would also need to catch exceptions ( and go slower) if the interest rate exceeded a max threshold. Interesting that Shibata uses the Taylor Series approximation in this code. I am not sure what the trade-offs are these days.

Most of today’s processors have capabilities to execute SIMD instructions, and we can expect significant speed-ups in various kinds of computation if these instructions are properly used. But, this is technically hard because many popular programming techniques like table look-ups, conditional branches, scattering/gathering operations can easily slow down the computation. With this library, the trigonometric functions(sin, cos, tan, sincos), inverse trigonometric functions(asin, acos, atan, atan2), exponential and logarithmic functions(exp, log, pow, exp2, exp10, expm1, log10, log1p), hyperbolic/inverse hyperbolic functions(sinh, cosh, tanh, asinh, acosh, atanh), and some other functions(cbrt, ilogb, ldexp) can be evaluated in both double precision and single precision without table look-ups, scattering from, or gathering into SIMD registers, or conditional branches using SSE2AVX, AVX2FMA4, or ARM NEON instruction sets.

You can download the library here.

You can see the javadoc here.

You can read the paper about the previous version of the library hereHere you can see presentation slides.

Many of the techniques used in SLEEF 2 are described in Elementary Functions: Algorithms And Implementation written by Jean-Michel Muller.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: