How To Install sleef on CentOS 8

sleef is Vectorized math library

Introduction

In this tutorial we learn how to install sleef on CentOS 8.

What is sleef

SLEEF stands for SIMD Library for Evaluating Elementary Functions. It implements vectorized versions of all C99 real floating point math functions. It can utilize SIMD instructions that are available on modern processors. SLEEF is designed to efficiently perform computation with SIMD instructions by reducing the use of conditional branches and scatter/gather memory access. The library contains implementations of all C99 real FP math functions in double precision and single precision. Different accuracy of the results can be chosen for a subset of the elementary functions; for this subset there are versions with up to 1 ULP error (which is the maximum error, not the average) and even faster versions with a few ULPs of error. For non-finite inputs and outputs, the functions return correct results as specified in the C99 standard.

We can use yum or dnf to install sleef on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install sleef.

Install sleef on CentOS 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install sleef using dnf by running the following command:

sudo dnf -y install sleef

Install sleef on CentOS 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install sleef using yum by running the following command:

sudo yum -y install sleef

How To Uninstall sleef on CentOS 8

To uninstall only the sleef package we can use the following command:

sudo dnf remove sleef

sleef Package Contents on CentOS 8

/usr/lib/.build-id
/usr/lib/.build-id/8b
/usr/lib/.build-id/8b/2c71fc5fb94bd793b6e98545bd13eeeeefdd5c
/usr/lib64/libsleef.so.3
/usr/lib64/libsleef.so.3.5.1
/usr/share/licenses/sleef
/usr/share/licenses/sleef/LICENSE.txt

References

Summary

In this tutorial we learn how to install sleef on CentOS 8 using yum and dnf.