SLEEF is a library that implements vectorized versions of C standard math functions. This library also includes DFT subroutines.
-
Web Page: https://sleef.org/
-
Sources: https://github.com/shibatch/sleef
The following table summarizes currently supported OSes and compilers.
Linux |
Windows |
Mac |
||||||
gcc |
llvm |
MSVC |
Clang |
MinGW |
Cygwin |
Clang |
GCC |
|
x86_64 |
✔ |
✔ |
✔ |
✔ |
✔ |
❓ |
✔ |
❓ |
RISC-V 64 |
✔ |
❓ |
N/A |
N/A |
N/A |
N/A |
N/A |
N/A |
AArch64 |
✔ |
✔ |
❌ |
❌ |
❌ |
❌ |
✔ |
❓ |
POWER |
✔ |
❓ |
N/A |
N/A |
N/A |
N/A |
N/A |
N/A |
S390X |
✔ |
❓ |
N/A |
N/A |
N/A |
N/A |
N/A |
N/A |
AArch32 |
✔ |
❓ |
N/A |
N/A |
N/A |
N/A |
N/A |
N/A |
✔ : Tested on CI, ❓ : Not tested, ❌ : Not supported
The library itself does not have any additional dependency.
In order to build SLEEF, you need CMake 3.18+, and C and C++ compilers of the same version. It is also recommended to have the following tools.
-
Ninja
-
Git
TLFloat is automatically downloaded if no suitable version is found on your system.
Some tests require:
-
libssl and libcrypto, that can be provided by installing openssl.
-
libm, libgmp and libmpfr
-
libfftw.
The build procedure is as follows.
-
Check out the source code from our GitHub repository
git clone https://github.com/shibatch/sleef
-
Make a separate directory to create an out-of-source build
cd sleef && mkdir build
-
Run cmake to configure the project
cmake -S . -B build
By default this will generate shared libraries. In order to generate
static libraries, pass option -DBUILD_SHARED_LIBS=OFF
.
For more verbose output add option -DSLEEF_SHOW_CONFIG=ON
.
-
Run make to build the project
cmake --build build -j --clean-first
-
Run tests using ctests
ctest --test-dir build -j
For more detailed build instructions please refer to the dedicated section on CMake or to our web page.
For more detailed please refer to cross-compile SLEEF
The software is distributed under the Boost Software License, Version 1.0. See accompanying file LICENSE.txt or copy at http://www.boost.org/LICENSE_1_0.txt. Contributions to this project are accepted under the same license.
Copyright © 2010-2025 SLEEF Project, Naoki Shibata and contributors.