# Accuracy of Mathematical Functions in Single, Double, Double Extended, and Quadruple Precision

Brian Gladman, Vincenzo Innocente, John Mather, Paul Zimmermann

<figure><img src="image_1.png" /></figure>

## To cite this version:

Brian Gladman, Vincenzo Innocente, John Mather, Paul Zimmermann. Accuracy of Mathematical Functions in Single, Double, Double Extended, and Quadruple Precision. 2024. hal-03141101v6

HAL Id: hal-03141101

https://inria.hal.science/hal-03141101v6

Preprint submitted on 15 Feb 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Accuracy of Mathematical Functions in Single, Double, Double Extended, and Quadruple Precision

Brian Gladman, Vincenzo Innocente, John Mather, Paul Zimmermann

► To cite this version:

Brian Gladman, Vincenzo Innocente, John Mather, Paul Zimmermann. Accuracy of Mathematical Functions in Single, Double, Double Extended, and Quadruple Precision. 2025. hal-03141101v8

HAL Id: hal-03141101

https://inria.hal.science/hal-03141101v8

Preprint submitted on 17 Feb 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
Accuracy of Mathematical Functions in Single, Double, Double
Extended, and Quadruple Precision

Brian Gladman, Vincenzo Innocente*, John Mather†, Paul Zimmermann‡

February 15, 2024

Computer users, most of whom assume they are working with reliable routines, unwittingly accept results from functions where the accuracies vary significantly from one mathematical library to another, from one library function to another, and even over different argument intervals of the same function. [...] Users are not likely to demand an improved situation because most of them, having neither the time nor the inclination to test manufacturer-supplied software, do not know the problem exists. This paper contains the results of such tests of elementary functions from several computer companies. The data [...] demonstrate that the industry does not satisfy the needs of those who require accurate and efficient mathematical software.

These lines, written nearly four decades ago in 1984 by Black, Burton and Miller [6], are unfortunately still very true today.

The IEEE 754 standard, even in its latest 2019 revision [16], does not *require* correctly rounded mathematical functions, it only *recommends* them. In turn, current mathematical libraries do not provide correct rounding, which is the best possible result. Thus, users might get different results with different libraries, or different versions of the same library. This can have dramatic consequences: for example missed collisions in the Large Hadron Collider [5] or reproducibility issues in neuroimaging [12].

This document compares the accuracy of several mathematical libraries for the evaluation of mathematical functions, in single, double and quadruple precision (respectively **binary32**, **binary64**, and **binary128** in the IEEE 754 standard), and also in the extended double format. For single precision, an exhaustive search is possible for univariate functions, thus the given values are upper bounds. For larger precisions or bivariate functions, since an exhaustive search is not possible with academic resources, we use a black-box algorithm that tries to locate the values with the largest error; the given values are only lower bounds, but comparing them can give an idea of the relative accuracy of different libraries. An interesting fact is that, for several functions, different libraries yield the same largest known error, for the exact same input value, which probably means they use the same code base. Note that some libraries document the largest known errors [7, 13]. Also, in [19], the authors have proven rigorous upper bounds for some double-precision functions (exp, log,

<footnote>*CERN</footnote>

<footnote>†Side Effects Software Inc.</footnote>

<footnote>‡Université de Lorraine, CNRS, Inria, LORIA</footnote>
Accuracy of Mathematical Functions in Single, Double, Double
Extended, and Quadruple Precision

Brian Gladman, Vincenzo Innocente*, John Mather†, Paul Zimmermann‡

February 2025

Computer users, most of whom assume they are working with reliable routines, unwittingly accept results from functions where the accuracies vary significantly from one mathematical library to another, from one library function to another, and even over different argument intervals of the same function. [...] Users are not likely to demand an improved situation because most of them, having neither the time nor the inclination to test manufacturer-supplied software, do not know the problem exists. This paper contains the results of such tests of elementary functions from several computer companies. The data [...] demonstrate that the industry does not satisfy the needs of those who require accurate and efficient mathematical software.

These lines, written nearly four decades ago in 1984 by Black, Burton and Miller [8], are unfortunately still very true today.

The IEEE 754 standard, even in its latest 2019 revision [1], does not *require* correctly rounded
mathematical functions, it only *recommends* them. In turn, current mathematical libraries do
not provide correct rounding, which is the best possible result. Thus, users might get different
results with different libraries, or different versions of the same library. This can have dramatic
consequences: for example missed collisions in the Large Hadron Collider [7] or reproducibility
issues in neuroimaging [18].

This document compares the accuracy of several mathematical libraries for the evaluation of
mathematical functions, in single, double and quadruple precision (respectively binary32, binary64,
and binary128 in the IEEE 754 standard), and also in the extended double format. For single
precision, an exhaustive search is possible for univariate functions, thus the given values are upper
bounds. For larger precisions or bivariate functions, since an exhaustive search is not possible with
academic resources, we use a black-box algorithm that tries to locate the values with the largest
error; the given values are only lower bounds, but comparing them can give an idea of the relative
accuracy of different libraries. An interesting fact is that, for several functions, different libraries
yield the same largest known error, for the exact same input value, which probably means they
use the same code base. While GCC clearly says that the accuracy of mathematical functions is
unknown [17], some libraries document the largest known errors<fnref n="1" /> [11, 14, 28]. Also, in [22], the

<footnote>*CERN</footnote>

<footnote>†Side Effects Software Inc.</footnote>

<footnote>‡Université de Lorraine, CNRS, Inria, LORIA</footnote>

<footnote n="1">¹For the GNU libc, the values given in the “Known Maximum Errors in Math Functions” section are however not always accurate, since larger values can be found in GNU libc Bugzilla (and in this document).</footnote>
sin, tan) of the Intel Math Library, in some domains (however the code might have changed since
then).

Today, at least for single precision and most double precision functions, it is known how to get correct rounding (for all rounding modes, not only for rounding to nearest) at very low cost, and reference implementations exist that outperform current libraries [28, 15].

# 1 Introduction

In this document we compare the accuracy of the following mathematical libraries: GNU libc 2.39 [14], the Intel Math Library shipped with the Intel oneAPI DPC++ Compiler 2024.0.2 (IML) [17], AMD LibM 4.1 [1], RedHat Newlib 4.4.0 [24], OpenLibm 0.8.1 [26], Musl 1.2.4 [23], the Apple Math Library 14.0 available under Darwin 23.0.0 [2], the LLVM libc 17.0.6 [20], the Microsoft library from Visual Studio 2022 (MSVC) [21], the mathematical library from FreeBSD 14.0 [11], libamath from the Arm Performance Libraries 23.10 [3], the CUDA mathematical library 12.2.1 [8], and the ROCm mathematical library 5.7.0 [25]. We only consider rounding to nearest-even; with other rounding modes one might get disastrous results with some libraries [18], as reported already in 2002 by Vincent Lefèvre.<fnref n="1" /> We do not compare to the x87 instructions `fsin` and others, which are known to have bad accuracy [9].

For each function, assuming *y* is the value returned by the library, and *z* is the exact result (as with infinite precision), we denote by *e* the absolute difference between *y* and *z* in terms of units-in-last-place of *z*. The value *z* is approximated with the GNU MPFR library [10], using a larger precision. Our definition of ulp (unit-in-last-place) is the following: for $2^{e-1} \le |x| < 2^e$, and precision *p*, we define ulp(*x*) = $2^{e-p}$. i.e., the distance between two consecutive *p*-bit floating-point numbers in the binade [$2^{e-1}, 2^e$), see [22].

The results for GNU libc, AMD LibM, Newlib, OpenLibm, and Musl were obtained on an Intel Core i5-4590, with GCC 13.2.0 under Debian. Those for LLVM libc were obtained on an Intel(R) Xeon(R) Silver 4214; an AMD EPYC2 7352 was used for the Intel Math Library (IML in short), with the Intel compiler version 2024.0.2, using `-fp-model=strict` (including `mathimf.h` instead of `math.h`). Those for the Apple math library were obtained on a Mac M1 (arm64) under Darwin 23.0.0, with `clang 15.0.0`. The results with the Microsoft library were obtained using the Universal C Runtime Library (UCRT) distributed with Windows SDK version 10.0.22621 for Windows 11, and the code was run on a Dell Precision 5540 with an Intel Core i9 9880H running Windows 11 and on a Dell PowerEdge R7525 with two AMD EPYC2 7352 running Windows Server 2019. The FreeBSD results were obtained with a libvirt image running on a Intel Xeon Silver 4214. The results for libamath from the Arm Performance Libraries were obtained on an AWS Graviton3 c7g.metal instance running Ubuntu 22.04. The CUDA library was tested on a NVidia Grace-Hopper system running CUDA 12.2.1. The tests were also run on a GTX1060 GPU, hosted on an AMD Ryzen 7 1800X, obtaining identical results. The ROCm library was tested on an AMD Radeon Instinct MI50 running ROCm 5.7.0 hosted on a Intel Xeon Silver 4114. Tests were also run on a "Radeon Pro WX 9100", hosted on a AMD Ryzen 9 5900X, obtaining identical results.

Newlib was configured with default flags (in particular, without use of hardware FMA), and with the default configuration.<fnref n="2" />

<footnote n="1">¹https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=153022</footnote>

<footnote n="2">²For binary32, by default, the old SunPro functions are used; with `OBSOLETE_MATH_DEFAULT=0`, Newlib will use instead a new set of mathematical functions provided by Arm, that use binary64 for intermediate computations.</footnote>
authors have proven rigorous upper bounds for some double-precision functions (exp, log, sin, tan) of the Intel Math Library, in some domains (however the code might have changed since then).

Today, at least for single precision and most double precision functions, it is known how to get correct rounding (for all rounding modes, not only for rounding to nearest) at very low cost, and reference implementations exist that outperform current libraries (see references in [9]).

# 1 Introduction

In this document we compare the accuracy of the following mathematical libraries: GNU libc 2.41 [19], the Intel Math Library shipped with the Intel oneAPI DPC++ Compiler 2025.0.0 (IML) [20], AMD LibM 5.0 [3], Newlib 4.5.0 [31], OpenLibm 0.8.5 [29], Musl 1.2.5 [26], the Apple Math Library 15.1.1 available under Darwin 24.1.0 [4], the LLVM libc 19.1.7 [23], the Microsoft library from Visual Studio 2022 (MSVC) [24], the mathematical library from FreeBSD 14.2 [16], libamath from the Arm Performance Libraries 24.04 [5], the CUDA mathematical library 12.8 [27], and the ROCm mathematical library 6.2.4 [12]. We only consider rounding to nearest-even; with other rounding modes one did get disastrous results with some libraries in the past [21], as reported already in 2002 by Vincent Lefèvre.<fnref n="2" /> We do not compare to the x87 instructions `fsin` and others, which are known to have bad accuracy [13].

For each function, assuming $y$ is the value returned by the library, and $z$ is the exact result (as with infinite precision), we denote by $e$ the absolute difference between $y$ and $z$ in terms of units-in-last-place of $z$ (i.e., when $z$ is in the subnormal range, in terms of multiples of the smallest positive subnormal). The value $z$ is approximated with the GNU MPFR library [15], using a larger precision. Our definition of `ulp` (unit-in-last-place) is the following: for $2^{e-1} \le |x| < 2^e$, and precision $p$, we define `ulp(x) = 2^{e-p}$. i.e., the distance between two consecutive $p$-bit floating-point numbers in the binade $[2^{e-1}, 2^e)$, see [25]. When one of $y$ and $z$ is `NaN` or $\pm\infty$, we use the following rules:

* if both $y$ and $z$ are `NaN`, we consider the error is 0;

* if only one of $y$ and $z$ is `NaN`, we consider the error is infinite;

* if both $y$ and $z$ are $\pm\infty$, we consider the error is 0 if they have the same sign, and infinite otherwise;

* if the library result is $\infty$, and the MPFR result is finite, we assume the library result is the next floating-point number after the largest finite number in the format (assuming unbounded exponent);

* if the library result is finite, and the MPFR result is $\infty$, we recompute the MPFR result using unbounded exponent, and compute the difference with this value.

The results for GNU libc, AMD LibM, Newlib, OpenLibm, and Musl were obtained on an Intel Core i5-4590 or i7-8700 with GCC 14.2.0 under Debian. Newlib was configured with default flags (in particular, without use of hardware FMA), and with the default configuration.<fnref n="3" /> Those for LLVM

<footnote n="2">²https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=153022</footnote>

<footnote n="3">³For binary32, by default, the old SunPro functions are used; with `OBSOLETE_MATH_DEFAULT=0`, Newlib will use instead a new set of mathematical functions provided by Arm, that use binary64 for intermediate computations.</footnote>
In all tables, values of *e* are given with 3 decimal digits, rounded up; thus for example *e* = 2.17 for a univariate single-precision function means that the relative error is bounded by 2.17 ulps for all **binary32** inputs, and in all other cases (larger formats or bivariate functions) it means the largest *known* error is bounded by 2.17 ulps, with at least one case giving an error of more than 2.16 ulps.

It should be noted that one might get different results for a given library on different hardware, for at least two reasons. Firstly some libraries have a runtime dispatcher which invokes different source code for different cpus, for example using the fused multiply-add, or extensions SSE, AVX, AVX2 or AVX512. This is the case of the GNU libc and of the Intel Math library. Secondly the very same binary might produce different results on different hardware due to the use of some assembly instructions that are implemented differently. This is for example the case with the rsqrt and rcp instructions that differ on Intel and AMD hardware, see §3.2.

# 2 Single Precision

## 2.1 Univariate Functions

The IEEE 754 single-precision format (**binary32**) has $2^{32} - 2^{24}$ values, not counting +Inf, -Inf, and NaN. For a function with a single input—i.e., excluding the **pow** function for example—it is thus possible to check all values by exhaustive search.

Table 1 summarizes the largest known ulp error for each function and each library. For univariate functions, the corresponding input can easily be found by exhaustive search, while Table 2 gives the corresponding inputs for bivariate functions.

In all tables, empty cells mean the corresponding function is not available.

We see that for all libraries, the sqrt function is correctly rounded for all binary32 inputs, as required by IEEE 754.<fnref n="3" /> The following functions are correctly rounded: rsqrtf in the Intel Math Library, cbrtf in OpenLibm, Musl, the Apple library and FreeBSD, coshf in MSVC, sinhf in AMD LibM, and all functions available in the LLVM library.

We get large errors for j0f, j1f, y0f, y1f, lgammaf and tgammaf for all libraries where these functions are available, except for GNU libc, IML, the Apple and the ARM libraries. We also get large errors for expm1f in AMD LibM, and for cospif, tanpif, powf in FreeBSD.

## 2.2 Bivariate Functions

For single precision bivariate functions, it is not possible to perform an exhaustive search with academic resources, since there are up to $2^{64}$ possible pairs of inputs. For example, for the power function $x^y$, there are about $2^{61}$ input pairs $x, y > 0$ that do not yield underflow nor overflow. We thus used the algorithm described in §3.1 to obtain the values of Table 2, which are *lower bounds* for the largest error.

**Notes about the Intel Math Library.** The rsqrt function, which is not yet standardized in C99, is called invsqrt in the Intel Math Library. In single precision, it is correctly rounded for all rounding modes.

<footnote n="3">³As noticed by Hugues de Lassus, correct rounding implies a maximal error of 0.5 ulp, but the converse is not necessarily true. However, we also checked the results agree with GNU MPFR.</footnote>
libc were obtained on an Intel(R) Xeon(R) Silver 4214; an AMD EPYC2 7352 was used for the Intel Math Library (IML in short), with the Intel compiler version 2025.0.0, using `-fp-model=strict`, including `mathimf.h` instead of `math.h` (see [10] for more details about the Intel compiler). Those for the Apple math library were obtained on a Mac M1 (arm64) with `clang 15.0.0`. The results with the Microsoft library were obtained using the Universal C Runtime Library (UCRT) distributed with Windows SDK version 10.0.22621 for Windows 11, and the code was run on a Dell Precision 5540 with an Intel Core i9 9880H running Windows 11 and on a Dell PowerEdge R7525 with two AMD EPYC2 7352 running Windows Server 2019. The FreeBSD results were obtained with a libvirt image running on a Intel Xeon Silver 4214. The results for libamath from the Arm Performance Libraries were obtained on an AWS Graviton3 c7g.metal instance running Ubuntu 22.04. The CUDA library was tested on a NVidia Grace-Hopper system running CUDA 12.8. The tests were also run on a GTX1060 GPU, hosted on an AMD Ryzen 7 1800X, obtaining identical results. The ROCm library was tested on an AMD Radeon Instinct MI50 running ROCm 6.2.4 hosted on a Intel Xeon Silver 4114. Tests were also run on a "Radeon Pro WX 9100", hosted on a AMD Ryzen 9 5900X, obtaining identical results.

In all tables, values of *e* are given with 3 decimal digits, rounded up; thus for example *e* = 2.17 for a univariate single-precision function means that the relative error is bounded by 2.17 ulps for all binary32 inputs, and in all other cases (larger formats or bivariate functions) it means the largest *known* error is bounded by 2.17 ulps, with at least one case giving an error of more than 2.16 ulps. Note that correct rounding implies an entry 0.5, but the converse is false: when the "round-to-even" rule applies, if the library returns the "odd" value, the error will still be 0.5 ulp.

It should be noted that one might get different results for a given library on different hardware, for at least two reasons. Firstly some libraries have a runtime dispatcher which invokes different source code for different cpus, for example using the fused multiply-add, or extensions SSE, AVX, AVX2 or AVX512. This is the case of the GNU libc and of the Intel Math library. Secondly the very same binary might produce different results on different hardware due to the use of some assembly instructions that are implemented differently. This is for example the case with the `rsqrt` and `rcp` instructions that differ on Intel and AMD hardware, see §3.2.

# 2 Single Precision

## 2.1 Univariate Functions

The IEEE 754 single-precision format (binary32) has $2^{32} - 2^{24}$ values, not counting +Inf, -Inf, and NaN. For a function with a single input, it is thus possible to check all values by exhaustive search.

Table 1 summarizes the largest known ulp error for each function and each library. For univariate functions, the corresponding input can easily be found by exhaustive search, while Table 2 gives the corresponding inputs for bivariate functions.

In all tables, empty cells mean the corresponding function is not available.

We see that for all libraries, the sqrt function is correctly rounded for all binary32 inputs, as required by IEEE 754.<fnref n="4" /> The following functions are correctly rounded: `rsqrtf` in the Intel Math Library, `cbrtf` in OpenLibm, Musl, the Apple library and FreeBSD, `coshf` in MSVC, `sinhf` and `tanhf` in AMD LibM (which uses the CORE-MATH implementation [32]), 21 functions from

<footnote n="4">⁴As noticed by Hugues de Lassus, correct rounding implies a maximal error of 0.5 ulp, but the converse is not necessarily true. However, we also checked the results agree with GNU MPFR.</footnote>
<table><caption>Table 1: Single precision: largest value of e (for univariate functions), and largest *known* value of e (for bivariate functions). Empty cells mean the corresponding function is not available.</caption><thead><tr><th>library version</th><th>GNU libc 2.39</th><th>IML 2024.0.2</th><th>AMD 4.1</th><th>Newlib 4.4.0</th><th>OpenLibm 0.8.1</th><th>Musl 1.2.4</th><th>Apple 14.0</th><th>LLVM 17.0.6</th><th>MSVC 2022</th><th>FreeBSD 14.0</th><th>ArmPL 23.10</th><th>CUDA 12.2.1</th><th>ROCm 5.7.0</th></tr></thead><tbody><tr><td>acos</td><td>0.899</td><td>0.528</td><td>0.897</td><td>0.899</td><td>0.918</td><td>0.918</td><td>0.634</td><td><strong>0.500</strong></td><td>0.669</td><td>0.918</td><td>1.32</td><td>1.34</td><td>1.47</td></tr><tr><td>acosh</td><td>2.01</td><td>0.501</td><td>0.504</td><td>2.01</td><td>2.01</td><td>2.01</td><td>0.502</td><td><strong>0.500</strong></td><td>2.89</td><td>2.01</td><td>2.79</td><td>2.18</td><td>0.564</td></tr><tr><td>asin</td><td>0.898</td><td>0.528</td><td>0.781</td><td>0.926</td><td>0.743</td><td>0.743</td><td>0.634</td><td><strong>0.500</strong></td><td>0.861</td><td>0.743</td><td>2.41</td><td>1.36</td><td>2.54</td></tr><tr><td>asinh</td><td>1.78</td><td>0.527</td><td>0.518</td><td>1.78</td><td>1.78</td><td>1.78</td><td>0.515</td><td><strong>0.500</strong></td><td>1.99</td><td>1.78</td><td>3.57</td><td>1.78</td><td>0.573</td></tr><tr><td>atan</td><td>0.853</td><td>0.541</td><td>0.501</td><td>0.853</td><td>0.853</td><td>0.853</td><td>0.722</td><td><strong>0.500</strong></td><td>0.501</td><td>0.853</td><td>2.88</td><td>1.21</td><td>2.10</td></tr><tr><td>atanh</td><td>1.73</td><td>0.507</td><td>0.547</td><td>1.73</td><td>1.73</td><td>1.73</td><td>0.511</td><td><strong>0.500</strong></td><td>2.35</td><td>1.73</td><td>3.09</td><td>3.16</td><td>0.574</td></tr><tr><td>cbrt</td><td>0.969</td><td>0.520</td><td>0.548</td><td>3.56</td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td></td><td>1.83</td><td><strong>0.500</strong></td><td>1.53</td><td>1.17</td><td>1.14</td></tr><tr><td>cos</td><td>0.561</td><td>0.548</td><td>0.729</td><td>2.91</td><td>0.501</td><td>0.501</td><td>0.862</td><td><strong>0.500</strong></td><td>0.530</td><td>0.501</td><td>0.561</td><td>1.52</td><td>1.61</td></tr><tr><td>cosh</td><td>1.89</td><td>0.506</td><td>1.03</td><td>2.51</td><td>1.36</td><td>1.03</td><td>0.589</td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td>1.36</td><td>1.89</td><td>2.34</td><td>0.567</td></tr><tr><td>erf</td><td>0.968</td><td>0.780</td><td>0.531</td><td>0.968</td><td>0.943</td><td>0.968</td><td>0.501</td><td><strong>0.500</strong></td><td>3.99</td><td>0.890</td><td>1.93</td><td>1.04</td><td>1.51</td></tr><tr><td>erfc</td><td>3.13</td><td>0.934</td><td></td><td>63.9</td><td>3.17</td><td>3.13</td><td><strong>0.750</strong></td><td></td><td>6.66</td><td>3.18</td><td>1.64</td><td>4.49</td><td>3.33</td></tr><tr><td>exp</td><td>0.502</td><td>0.506</td><td>0.501</td><td>0.911</td><td>0.911</td><td>0.502</td><td>0.576</td><td><strong>0.500</strong></td><td>0.501</td><td>0.911</td><td>0.502</td><td>1.94</td><td>1.00</td></tr><tr><td>exp10</td><td>0.502</td><td>0.507</td><td>1.00</td><td>1.06</td><td></td><td>3.88</td><td>0.580</td><td><strong>0.500</strong></td><td></td><td></td><td></td><td>2.07</td><td>1.00</td></tr><tr><td>exp2</td><td>0.502</td><td>0.519</td><td>0.501</td><td>1.02</td><td>0.501</td><td>0.502</td><td>0.570</td><td><strong>0.500</strong></td><td>2.14</td><td>0.501</td><td>0.502</td><td>2.39</td><td>0.871</td></tr><tr><td>expm1</td><td>0.813</td><td>0.544</td><td>Inf</td><td>0.813</td><td>0.813</td><td>0.813</td><td>0.687</td><td><strong>0.500</strong></td><td>3.02</td><td>0.813</td><td>1.51</td><td>1.45</td><td>1.45</td></tr><tr><td>j0</td><td>9.00</td><td><strong>0.678</strong></td><td></td><td>6.18e6</td><td>3.66e6</td><td>3.66e6</td><td></td><td></td><td></td><td>3.66e6</td><td></td><td>3.78e10</td><td>7.60e7</td></tr><tr><td>j1</td><td>9.00</td><td><strong>1.69</strong></td><td></td><td>1.68e7</td><td>2.25e6</td><td>2.25e6</td><td></td><td></td><td></td><td>2.25e6</td><td></td><td>7.48e9</td><td>7.53e7</td></tr><tr><td>lgamma</td><td>6.78</td><td>0.510</td><td></td><td>7.50e6</td><td>7.50e6</td><td>7.50e6</td><td><strong>0.501</strong></td><td></td><td>2.92e5</td><td>7.50e6</td><td></td><td>1.35e7</td><td>7.50e6</td></tr><tr><td>log</td><td>0.818</td><td>0.519</td><td>0.577</td><td>0.888</td><td>0.888</td><td>0.818</td><td>0.511</td><td><strong>0.500</strong></td><td>0.562</td><td>0.888</td><td>0.818</td><td>0.865</td><td>1.89</td></tr><tr><td>log10</td><td>2.07</td><td>0.516</td><td>1.40</td><td>2.10</td><td>0.832</td><td>0.832</td><td>0.502</td><td><strong>0.500</strong></td><td>0.626</td><td>0.832</td><td>0.82</td><td>2.09</td><td>1.71</td></tr><tr><td>log1p</td><td>1.30</td><td>0.525</td><td>0.501</td><td>1.30</td><td>0.839</td><td>0.835</td><td>0.513</td><td><strong>0.500</strong></td><td>1.44</td><td>0.839</td><td>2.02</td><td>0.887</td><td>0.579</td></tr><tr><td>log2</td><td>0.752</td><td>0.508</td><td>0.766</td><td>1.65</td><td>0.865</td><td>0.752</td><td>0.502</td><td><strong>0.500</strong></td><td>2.04</td><td>0.865</td><td>0.752</td><td>0.919</td><td>1.00</td></tr><tr><td>sin</td><td>0.561</td><td>0.546</td><td>0.530</td><td>1.37</td><td>0.501</td><td>0.501</td><td>0.846</td><td><strong>0.500</strong></td><td>0.530</td><td>0.501</td><td>0.561</td><td>1.50</td><td>1.61</td></tr><tr><td>sinh</td><td>1.89</td><td>0.538</td><td><strong>0.500</strong></td><td>2.51</td><td>1.83</td><td>1.83</td><td>0.601</td><td><strong>0.500</strong></td><td>0.501</td><td>1.83</td><td>2.26</td><td>2.94</td><td>0.922</td></tr><tr><td>sqrt</td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td></tr><tr><td>tan</td><td>1.48</td><td>0.520</td><td>0.509</td><td>3.48</td><td>0.800</td><td>0.800</td><td>0.746</td><td><strong>0.500</strong></td><td>0.502</td><td>0.800</td><td>3.30</td><td>3.10</td><td>2.33</td></tr><tr><td>tanh</td><td>2.19</td><td>0.514</td><td>1.56</td><td>2.19</td><td>2.19</td><td>2.19</td><td>0.817</td><td><strong>0.500</strong></td><td>1.27</td><td>2.19</td><td>2.59</td><td>1.82</td><td>1.41</td></tr><tr><td>tgamma</td><td>7.91</td><td>0.510</td><td></td><td>239</td><td><strong>0.501</strong></td><td><strong>0.501</strong></td><td><strong>0.501</strong></td><td></td><td>3.58e5</td><td><strong>0.501</strong></td><td></td><td>4.34</td><td>1.68e7</td></tr><tr><td>y0</td><td>8.98</td><td><strong>3.40</strong></td><td></td><td>4.84e6</td><td>4.84e6</td><td>4.84e6</td><td></td><td></td><td></td><td>4.84e6</td><td></td><td>2.36e10</td><td>7.53e7</td></tr><tr><td>y1</td><td>9.00</td><td><strong>2.07</strong></td><td></td><td>6.18e6</td><td>4.17e6</td><td>3.66e6</td><td></td><td></td><td></td><td>4.17e6</td><td></td><td>4.96e10</td><td>9.35e7</td></tr><tr><td>acospi</td><td></td><td><strong>0.504</strong></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>asinpi</td><td></td><td><strong>0.506</strong></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>atanpi</td><td></td><td><strong>0.545</strong></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>cospi</td><td></td><td><strong>0.501</strong></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td><strong>0.501</strong></td><td></td><td>0.966</td><td>0.966</td></tr><tr><td>sinpi</td><td></td><td><strong>0.501</strong></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>0.755</td><td></td><td>0.967</td><td>0.967</td></tr><tr><td>tanpi</td><td></td><td>1.00</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td><strong>0.800</strong></td><td></td><td></td><td></td></tr><tr><td>rsqrt</td><td></td><td><strong>0.500</strong></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>1.52</td><td>0.864</td></tr><tr><td>atan2</td><td>1.52</td><td><strong>0.550</strong></td><td>0.584</td><td>1.52</td><td>1.55</td><td>1.55</td><td>0.722</td><td></td><td>0.584</td><td>1.55</td><td>2.93</td><td>2.18</td><td>2.01</td></tr><tr><td>atan2pi</td><td></td><td><strong>0.841</strong></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>hypot</td><td>0.501</td><td>0.501</td><td>0.501</td><td>1.21</td><td>1.21</td><td>0.927</td><td>0.501</td><td><strong>0.500</strong></td><td>0.501</td><td>1.21</td><td></td><td>1.03</td><td>1.57</td></tr><tr><td>pow</td><td>0.817</td><td><strong>0.515</strong></td><td>1.56</td><td>169.</td><td>0.970</td><td>0.817</td><td><strong>0.515</strong></td><td></td><td>0.568</td><td>0.970</td><td>0.817</td><td>2.60</td><td>1.40</td></tr></tbody></table>
<table><caption>Table 1: Single precision: largest value of *e* (for univariate functions), and largest *known* value of *e* (for bivariate functions). Empty cells mean the corresponding function is not available.</caption><thead><tr><th>library version</th><th>GNU libc 2.41</th><th>IML 2025.0.0</th><th>AMD 5.0</th><th>Newlib 4.5.0</th><th>OpenLibm 0.8.5</th><th>Musl 1.2.5</th><th>Apple 15.1.1</th><th>LLVM 19.1.7</th><th>MSVC 2022</th><th>FreeBSD 14.2</th><th>ArmPL 24.04</th><th>CUDA 12.8</th><th>ROCm 6.2.4</th></tr></thead><tbody><tr><td>acos</td><td><strong>0.500</strong></td><td>0.528</td><td>0.897</td><td>0.899</td><td>0.918</td><td>0.918</td><td>0.634</td><td><strong>0.500</strong></td><td>0.669</td><td>0.895</td><td>1.32</td><td>1.34</td><td>1.47</td></tr><tr><td>acosh</td><td><strong>0.500</strong></td><td>0.501</td><td>0.504</td><td>2.01</td><td>2.01</td><td>2.01</td><td>0.502</td><td><strong>0.500</strong></td><td>2.89</td><td>2.01</td><td>2.79</td><td>2.18</td><td>0.564</td></tr><tr><td>asin</td><td><strong>0.500</strong></td><td>0.528</td><td>0.781</td><td>0.926</td><td>0.743</td><td>0.743</td><td>0.634</td><td><strong>0.500</strong></td><td>0.861</td><td>0.672</td><td>2.41</td><td>1.36</td><td>2.54</td></tr><tr><td>asinh</td><td><strong>0.500</strong></td><td>0.527</td><td>0.518</td><td>1.78</td><td>1.78</td><td>1.78</td><td>0.515</td><td><strong>0.500</strong></td><td>1.99</td><td>1.78</td><td>3.57</td><td>1.78</td><td>0.573</td></tr><tr><td>atan</td><td><strong>0.500</strong></td><td>0.541</td><td>0.501</td><td>0.853</td><td>0.853</td><td>0.853</td><td>0.722</td><td><strong>0.500</strong></td><td>0.501</td><td>0.853</td><td>2.88</td><td>1.21</td><td>2.10</td></tr><tr><td>atanh</td><td><strong>0.500</strong></td><td>0.507</td><td>0.547</td><td>1.73</td><td>1.73</td><td>1.73</td><td>0.511</td><td><strong>0.500</strong></td><td>2.35</td><td>1.73</td><td>3.09</td><td>3.16</td><td>0.574</td></tr><tr><td>cbrt</td><td><strong>0.500</strong></td><td>0.520</td><td>0.548</td><td>3.56</td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td>1.83</td><td><strong>0.500</strong></td><td>1.53</td><td>1.17</td><td>1.14</td></tr><tr><td>cos</td><td>0.561</td><td>0.548</td><td>0.729</td><td>2.91</td><td>0.501</td><td>0.501</td><td>0.846</td><td><strong>0.500</strong></td><td>0.530</td><td>0.501</td><td>0.561</td><td>1.52</td><td>1.61</td></tr><tr><td>cosh</td><td><strong>0.500</strong></td><td>0.506</td><td>1.03</td><td>2.51</td><td>1.36</td><td>1.03</td><td>0.579</td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td>1.36</td><td>1.89</td><td>2.34</td><td>0.567</td></tr><tr><td>erf</td><td><strong>0.500</strong></td><td>0.780</td><td>0.531</td><td>0.968</td><td>0.943</td><td>0.968</td><td>0.501</td><td><strong>0.500</strong></td><td>3.99</td><td>0.890</td><td>1.93</td><td>1.04</td><td>1.51</td></tr><tr><td>erfc</td><td><strong>0.500</strong></td><td>0.934</td><td></td><td>63.9</td><td>3.17</td><td>3.13</td><td>0.750</td><td></td><td>6.66</td><td>3.18</td><td>1.64</td><td>4.49</td><td>3.33</td></tr><tr><td>exp</td><td>0.502</td><td>0.506</td><td>0.501</td><td>0.911</td><td>0.911</td><td>0.502</td><td>0.514</td><td><strong>0.500</strong></td><td>0.501</td><td>0.911</td><td>0.502</td><td>1.94</td><td>1.00</td></tr><tr><td>exp10</td><td>0.502</td><td>0.507</td><td>0.501</td><td>1.00</td><td></td><td>3.88</td><td>0.514</td><td><strong>0.500</strong></td><td></td><td></td><td></td><td>2.07</td><td>1.00</td></tr><tr><td>exp2</td><td>0.502</td><td>0.519</td><td>0.501</td><td>1.00</td><td>0.501</td><td>0.502</td><td>0.514</td><td><strong>0.500</strong></td><td>2.14</td><td>0.501</td><td>0.502</td><td>2.39</td><td>0.871</td></tr><tr><td>expm1</td><td><strong>0.500</strong></td><td>0.544</td><td>Inf</td><td>0.813</td><td>0.813</td><td>0.813</td><td>0.687</td><td><strong>0.500</strong></td><td>3.02</td><td>0.813</td><td>1.51</td><td>1.45</td><td>1.45</td></tr><tr><td>j0</td><td>9.00</td><td><strong>0.678</strong></td><td></td><td>6.18e6</td><td>3.66e6</td><td>3.66e6</td><td></td><td></td><td></td><td>3.66e6</td><td></td><td>3.78e10</td><td>7.60e7</td></tr><tr><td>j1</td><td>9.00</td><td><strong>1.69</strong></td><td></td><td>1.68e7</td><td>2.25e6</td><td>2.25e6</td><td></td><td></td><td></td><td>2.25e6</td><td></td><td>7.48e9</td><td>7.53e7</td></tr><tr><td>lgamma</td><td><strong>0.500</strong></td><td>0.510</td><td></td><td>7.50e6</td><td>7.50e6</td><td>7.50e6</td><td>0.501</td><td></td><td>2.92e5</td><td>7.50e6</td><td></td><td>1.35e7</td><td>7.50e6</td></tr><tr><td>log</td><td>0.818</td><td>0.519</td><td>0.577</td><td>0.888</td><td>0.888</td><td>0.818</td><td>0.511</td><td><strong>0.500</strong></td><td>0.562</td><td>0.888</td><td>0.818</td><td>0.865</td><td>1.89</td></tr><tr><td>log10</td><td><strong>0.500</strong></td><td>0.516</td><td>1.40</td><td>2.10</td><td>0.832</td><td>0.832</td><td>0.502</td><td><strong>0.500</strong></td><td>0.626</td><td>0.832</td><td>0.82</td><td>2.09</td><td>1.71</td></tr><tr><td>log1p</td><td><strong>0.500</strong></td><td>0.525</td><td>0.501</td><td>1.30</td><td>0.839</td><td>0.835</td><td>0.513</td><td><strong>0.500</strong></td><td>1.44</td><td>0.839</td><td>2.02</td><td>0.887</td><td>0.579</td></tr><tr><td>log2</td><td>0.752</td><td>0.508</td><td>0.766</td><td>1.65</td><td>0.865</td><td>0.752</td><td>0.502</td><td><strong>0.500</strong></td><td>2.04</td><td>0.865</td><td>0.752</td><td>0.919</td><td>1.00</td></tr><tr><td>sin</td><td>0.561</td><td>0.546</td><td>0.530</td><td>1.37</td><td>0.501</td><td>0.501</td><td>0.846</td><td><strong>0.500</strong></td><td>0.530</td><td>0.501</td><td>0.561</td><td>1.50</td><td>1.61</td></tr><tr><td>sinh</td><td>0.501</td><td>0.538</td><td><strong>0.500</strong></td><td>2.51</td><td>1.83</td><td>1.83</td><td>0.579</td><td><strong>0.500</strong></td><td>0.501</td><td>1.83</td><td>2.26</td><td>2.94</td><td>0.922</td></tr><tr><td>sqrt</td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td></tr><tr><td>tan</td><td><strong>0.500</strong></td><td>0.520</td><td>0.509</td><td>3.48</td><td>0.800</td><td>0.800</td><td>0.746</td><td><strong>0.500</strong></td><td>0.502</td><td>0.800</td><td>3.30</td><td>3.10</td><td>2.33</td></tr><tr><td>tanh</td><td><strong>0.500</strong></td><td>0.514</td><td><strong>0.500</strong></td><td>2.19</td><td>2.19</td><td>2.19</td><td>0.817</td><td><strong>0.500</strong></td><td>1.27</td><td>2.19</td><td>2.59</td><td>1.82</td><td>1.41</td></tr><tr><td>tgamma</td><td><strong>0.500</strong></td><td>0.510</td><td></td><td>239</td><td>0.501</td><td>0.501</td><td>0.501</td><td></td><td>3.58e5</td><td>0.501</td><td></td><td>4.34</td><td>1.68e7</td></tr><tr><td>y0</td><td>8.98</td><td><strong>3.40</strong></td><td></td><td>4.84e6</td><td>4.84e6</td><td>4.84e6</td><td></td><td></td><td></td><td>4.84e6</td><td></td><td>2.36e10</td><td>7.53e7</td></tr><tr><td>y1</td><td>9.00</td><td><strong>2.07</strong></td><td></td><td>6.18e6</td><td>4.17e6</td><td>3.66e6</td><td></td><td></td><td></td><td>4.17e6</td><td></td><td>4.96e10</td><td>9.35e7</td></tr><tr><td>acospi</td><td>1.94</td><td><strong>0.504</strong></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>asinpi</td><td>1.86</td><td><strong>0.506</strong></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>atanpi</td><td>1.93</td><td><strong>0.545</strong></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>cospi</td><td>1.98</td><td><strong>0.501</strong></td><td>1.95</td><td></td><td></td><td></td><td></td><td><strong>0.500</strong></td><td></td><td><strong>0.501</strong></td><td>2.65</td><td>0.966</td><td>0.966</td></tr><tr><td>exp10m1</td><td><strong>0.500</strong></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>exp2m1</td><td><strong>0.500</strong></td><td></td><td></td><td></td><td></td><td></td><td></td><td><strong>0.500</strong></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>log10p1</td><td><strong>0.833</strong></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>log12p1</td><td><strong>0.500</strong></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>sinpi</td><td>1.98</td><td><strong>0.501</strong></td><td>1.96</td><td></td><td></td><td></td><td></td><td><strong>0.500</strong></td><td></td><td>0.755</td><td>2.49</td><td>0.967</td><td>0.967</td></tr><tr><td>tanpi</td><td>2.93</td><td>1.00</td><td>2.22</td><td></td><td></td><td></td><td></td><td></td><td></td><td><strong>0.800</strong></td><td></td><td></td><td></td></tr><tr><td>rsqrt</td><td></td><td><strong>0.500</strong></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>1.52</td><td>0.864</td></tr><tr><td>atan2</td><td><strong>0.500</strong></td><td>0.550</td><td>0.584</td><td>1.52</td><td>1.55</td><td>1.55</td><td>0.722</td><td><strong>0.500</strong></td><td>0.584</td><td>1.55</td><td>2.93</td><td>2.18</td><td>2.01</td></tr><tr><td>atan2pi</td><td>1.61</td><td><strong>0.841</strong></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>compound</td><td></td><td><strong>0.501</strong></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>hypot</td><td>0.501</td><td>Inf</td><td>0.501</td><td>1.21</td><td>1.21</td><td>0.927</td><td>0.501</td><td><strong>0.500</strong></td><td>0.501</td><td>1.21</td><td></td><td>1.03</td><td>1.57</td></tr><tr><td>pow</td><td>0.817</td><td>0.515</td><td>1.56</td><td>169.</td><td>0.970</td><td>0.817</td><td>0.514</td><td><strong>0.500</strong></td><td>0.568</td><td>0.970</td><td>0.817</td><td>2.60</td><td>1.40</td></tr></tbody></table>
<table><thead><tr><th></th><th colspan="3">GNU libc 2.39</th><th colspan="3">IML 2024.0.2</th></tr><tr><th></th><th>x</th><th>y</th><th>max e</th><th>x</th><th>y</th><th>max e</th></tr></thead><tbody><tr><td>atan2</td><td>-0x1.f9cf48p+49</td><td>0x1.f60598p+51</td><td>1.52</td><td>-0x1.58a7ecp-118</td><td>0x1.58a7bep-123</td><td>0.50</td></tr><tr><td>atan2pi</td><td></td><td></td><td></td><td>-0x1.461adep+23</td><td>-0x1.74fbc8p+22</td><td>0.841</td></tr><tr><td>hypot</td><td>-0x1.003222p-20</td><td>-0x1.6a2d58p-32</td><td>0.501</td><td>-0x1.003222p-20</td><td>-0x1.6a2d58p-32</td><td>0.501</td></tr><tr><td>pow</td><td>0x1.025736p+0</td><td>0x1.309f94p+13</td><td>0.817</td><td>0x1.fe7782p-1</td><td>-0x1.c361cap+14</td><td>0.515</td></tr></tbody></table>

<table><thead><tr><th></th><th colspan="3">AMD LibM 4.1</th><th colspan="3">RedHat Newlib 4.4.0</th></tr><tr><th></th><th>x</th><th>y</th><th>max e</th><th>x</th><th>y</th><th>max e</th></tr></thead><tbody><tr><td>atan2</td><td>0x1.ffe24p+59</td><td>0x1.000adcp+73</td><td>0.584</td><td>-0x1.f9cf48p+49</td><td>0x1.f60598p+51</td><td>1.52</td></tr><tr><td>hypot</td><td>-0x1.0554acp+44</td><td>-0x1.6dc9e6p+32</td><td>0.501</td><td>-0x1.6b05c4p-127</td><td>0x1.6b3146p-126</td><td>1.21</td></tr><tr><td>pow</td><td>0x1.10fff4p+0</td><td>0x1.58fd76p+10</td><td>1.56</td><td>0x1.d55902p-1</td><td>-0x1.fe037ep+9</td><td>169.</td></tr></tbody></table>

<table><thead><tr><th></th><th colspan="3">OpenLibm 0.8.1</th><th colspan="3">Musl 1.2.4</th></tr><tr><th></th><th>x</th><th>y</th><th>max e</th><th>x</th><th>y</th><th>max e</th></tr></thead><tbody><tr><td>atan2</td><td>0x1.a10104p+123</td><td>0x1.99f182p+125</td><td>1.55</td><td>0x1.a10104p+123</td><td>0x1.99f182p+125</td><td>1.55</td></tr><tr><td>hypot</td><td>-0x1.6b05c4p-127</td><td>0x1.6b3146p-126</td><td>1.21</td><td>0x1.26b188p-127</td><td>-0x1.a4f2fp-128</td><td>0.927</td></tr><tr><td>pow</td><td>0x1.343e4ep+0</td><td>0x1.af3c4p+8</td><td>0.970</td><td>1.025736p+0</td><td>1.309f94p+13</td><td>0.817</td></tr></tbody></table>

<table><thead><tr><th></th><th colspan="3">Apple 14.0</th><th colspan="3">LLVM 17.0.6</th></tr><tr><th></th><th>x</th><th>y</th><th>max e</th><th>x</th><th>y</th><th>max e</th></tr></thead><tbody><tr><td>atan2</td><td>-0x1.ce62cep-116</td><td>0x1.cbf9bp-113</td><td>0.722</td><td>0x1.5804ccp-40</td><td>-0x1.a3bp-52</td><td>0.500</td></tr><tr><td>hypot</td><td>-0x1.003222p-20</td><td>-0x1.6a2d58p-32</td><td>0.501</td><td></td><td></td><td></td></tr><tr><td>pow</td><td>0x1.034016p+0</td><td>0x1.b782b4p+12</td><td>0.515</td><td></td><td></td><td></td></tr></tbody></table>

<table><thead><tr><th></th><th colspan="3">MSVC 2022</th><th colspan="3">FreeBSD 14.0</th></tr><tr><th></th><th>x</th><th>y</th><th>max e</th><th>x</th><th>y</th><th>max e</th></tr></thead><tbody><tr><td>atan2</td><td>0x1.ffe24p+59</td><td>0x1.000adcp+73</td><td>0.584</td><td>0x1.a10104p+123</td><td>0x1.99f182p+125</td><td>1.55</td></tr><tr><td>hypot</td><td>-0x1.003222p-20</td><td>-0x1.6a2d58p-32</td><td>0.501</td><td>-0x1.6b05c4p-127</td><td>0x1.6b3146p-126</td><td>1.21</td></tr><tr><td>pow</td><td>0x1.107fe4p+0</td><td>0x1.631e6cp+10</td><td>0.568</td><td>0x1.343e4ep+0</td><td>0x1.af3c4p+8</td><td>0.970</td></tr></tbody></table>

<table><thead><tr><th></th><th colspan="3">ArmPL 23.10</th></tr><tr><th></th><th>x</th><th>y</th><th>max e</th></tr></thead><tbody><tr><td>atan2</td><td>0x1.9fc07p-9</td><td>0x1.96923cp-9</td><td>2.93</td></tr><tr><td>pow</td><td>0x1.025736p+0</td><td>0x1.309f94p+13</td><td>0.817</td></tr></tbody></table>

<table><caption>Table 2: Single precision bivariate functions.</caption><thead><tr><th></th><th colspan="3">CUDA 12.2.1</th><th colspan="3">ROCm 5.7.0</th></tr><tr><th></th><th>x</th><th>y</th><th>max e</th><th>x</th><th>y</th><th>max e</th></tr></thead><tbody><tr><td>atan2</td><td>0x1.0e5beap+6</td><td>0x1.016188p+6</td><td>2.18</td><td>0x1.5c8fdep+25</td><td>0x1.cbe722p+24</td><td>2.01</td></tr><tr><td>hypot</td><td>0x1.007594p+1</td><td>-0x1.003512p+1</td><td>1.03</td><td>-0x1.ad2d0ap+111</td><td>-0x1.7f456ap+118</td><td>1.57</td></tr><tr><td>pow</td><td>0x1.6794b6p+0</td><td>0x1.f9f1bap+7</td><td>2.60</td><td>0x1.25f64ep-5</td><td>0x1.a47bc2p+4</td><td>1.40</td></tr></tbody></table>
<table><thead><tr><th></th><th colspan="2">GNU libc 2.41</th><th colspan="2">IML 2025.0.0</th></tr><tr><th></th><th>x</th><th>y</th><th>x</th><th>y</th></tr></thead><tbody><tr><td>atan2</td><td>0x1.960176p-63</td><td>0x1.f88dp+80</td><td>-0x1.58a7ecp-118</td><td>0x1.58a7bep-123</td></tr><tr><td>atan2pi</td><td>-0x1.baca2ap-96</td><td>-0x1.a6c0c4p-82</td><td>-0x1.461adep+23</td><td>-0x1.74fbc8p+22</td></tr><tr><td>compound</td><td></td><td></td><td>0x1.46674cp+50</td><td>0x1.d5738ap-30</td></tr><tr><td>hypot</td><td>-0x1.003222p-20</td><td>-0x1.6a2d58p-32</td><td>-0x1.527182p+127</td><td>-0x1.803006p+127</td></tr><tr><td>pow</td><td>0x1.025736p+0</td><td>0x1.309f94p+13</td><td>0x1.fe7782p-1</td><td>-0x1.c361cap+14</td></tr></tbody></table>

<table><thead><tr><th></th><th colspan="2">AMD LibM 5.0</th><th colspan="2">Newlib 4.5.0</th></tr><tr><th></th><th>x</th><th>y</th><th>x</th><th>y</th></tr></thead><tbody><tr><td>atan2</td><td>0x1.ffe24p+59</td><td>0x1.000adcp+73</td><td>-0x1.f9cf48p+49</td><td>0x1.f60598p+51</td></tr><tr><td>hypot</td><td>-0x1.0554acp+44</td><td>-0x1.6dc9e6p+32</td><td>-0x1.6b05c4p-127</td><td>0x1.6b3146p-126</td></tr><tr><td>pow</td><td>0x1.10fff4p+0</td><td>0x1.58fd76p+10</td><td>0x1.d6411cp-102</td><td>0x1.793482p+0</td></tr></tbody></table>

<table><thead><tr><th></th><th colspan="2">OpenLibm 0.8.5</th><th colspan="2">Musl 1.2.5</th></tr><tr><th></th><th>x</th><th>y</th><th>x</th><th>y</th></tr></thead><tbody><tr><td>atan2</td><td>0x1.a10104p+123</td><td>0x1.99f182p+125</td><td>0x1.a10104p+123</td><td>0x1.99f182p+125</td></tr><tr><td>hypot</td><td>-0x1.6b05c4p-127</td><td>0x1.6b3146p-126</td><td>0x1.26b188p-127</td><td>-0x1.a4f2fp-128</td></tr><tr><td>pow</td><td>0x1.343e4ep+0</td><td>0x1.af3c4p+8</td><td>1.025736p+0</td><td>1.309f94p+13</td></tr></tbody></table>

<table><thead><tr><th></th><th colspan="2">Apple 15.1.1</th><th colspan="2">LLVM 19.1.7</th></tr><tr><th></th><th>x</th><th>y</th><th>x</th><th>y</th></tr></thead><tbody><tr><td>atan2</td><td>-0x1.ce62cep-116</td><td>0x1.cbf9bp-113</td><td>0x1.960176p-63</td><td>0x1.f88dp+80</td></tr><tr><td>hypot</td><td>-0x1.003222p-20</td><td>-0x1.6a2d58p-32</td><td>0x1.65e2cp+124</td><td>0x1.ac1p+112</td></tr><tr><td>pow</td><td>0x1.95e42cp-27</td><td>0x1.369972p-14</td><td>-0x1.8p-49</td><td>0x1.8p+1</td></tr></tbody></table>

<table><thead><tr><th></th><th colspan="2">MSVC 2022</th><th colspan="2">FreeBSD 14.2</th></tr><tr><th></th><th>x</th><th>y</th><th>x</th><th>y</th></tr></thead><tbody><tr><td>atan2</td><td>0x1.ffe24p+59</td><td>0x1.000adcp+73</td><td>0x1.a10104p+123</td><td>0x1.99f182p+125</td></tr><tr><td>hypot</td><td>-0x1.003222p-20</td><td>-0x1.6a2d58p-32</td><td>-0x1.6b05c4p-127</td><td>0x1.6b3146p-126</td></tr><tr><td>pow</td><td>0x1.107fe4p+0</td><td>0x1.631e6cp+10</td><td>0x1.343e4ep+0</td><td>0x1.af3c4p+8</td></tr></tbody></table>

<table><thead><tr><th></th><th colspan="2">ArmPL 24.04</th></tr><tr><th></th><th>x</th><th>y</th></tr></thead><tbody><tr><td>atan2</td><td>-0x1.9be82ap-101</td><td>0x1.92cfb2p-101</td></tr><tr><td>pow</td><td>0x1.025736p+0</td><td>0x1.309f94p+13</td></tr></tbody></table>

<table><caption>Table 2: Inputs for single precision bivariate functions giving the largest known error.</caption><thead><tr><th></th><th colspan="2">CUDA 12.8</th><th colspan="2">ROCm 6.2.4</th></tr><tr><th></th><th>x</th><th>y</th><th>x</th><th>y</th></tr></thead><tbody><tr><td>atan2</td><td>0x1.0e5beap+6</td><td>0x1.016188p+6</td><td>0x1.e9d044p-37</td><td>0x1.dfb95ep-35</td></tr><tr><td>hypot</td><td>0x1.007594p+1</td><td>-0x1.003512p+1</td><td>-0x1.ad2d0ap+111</td><td>-0x1.7f456ap+118</td></tr><tr><td>pow</td><td>0x1.6794b6p+0</td><td>0x1.f9f1bap+7</td><td>0x1.25f64ep-5</td><td>0x1.a47bc2p+4</td></tr></tbody></table>
**Notes about AMD LibM.** AMD LibM 4.1 provides a new binary32 function: `erff`. A regression noticed in AMD LibM 3.9 is still in 4.1: for $x = 0x1.62e8p+61$, `expm1f` yields `0x1.62e8p+61` instead of `+Inf`. The largest error for `exp10f` is 1.00 since for $x = -0x1.66d3eap+5$, it yields 0 instead of the smallest subnormal $2^{-149}$, where $10^x$ is slightly smaller than the smallest subnormal; this issue has been reported since release 3.5 (a similar issue was fixed in release 3.8 for `expf` and `exp2f`).

**Notes about Newlib.** For negative integers, Newlib `tgammaf` returns an infinite value, whereas other libraries return `NaN`. We use the `lgammaf_r` function, since we were unable to compile the `lgammaf` function (undefined reference to `_impure_ptr`).

**Notes about the Apple Math Library.** The `erff`, `lgammaf` and `tgammaf` functions seem to call the corresponding double function, which explains the very good accuracy and the very small number of incorrectly-rounded results. The single precision `exp10` function is available as `__exp10f`.

**Notes about the Microsoft mathematical library.** The Bessel functions are not available in single precision (they are only available in double precision).

**Notes about FreeBSD.** We use the generic x86_64 binary from the FreeBSD 14.0 distribution. Some slightly different results might be obtained if you recompile FreeBSD using fused-multiply-add.

# 3 Double Precision

For double precision it is not possible to perform an exhaustive search with academic resources. We thus use a black-box algorithm—described in §3.1—that tries to find large errors. Therefore, the values in the double-precision tables are only lower bounds of the largest error.

**REMARK:** We did not want to analyze the code of each library, since this approach would need more human work, and would require to start again from scratch for each new version of the library. We did not want either to design code specific to each function: for example for the double precision sine or cosine, one could test inputs near $2^{1024}$, to check the argument reduction is correctly done. We expect our search algorithm automatically detects such issues.

## 3.1 Search Algorithm

The idea of the algorithm is to subdivide recursively the set of values to search for. We describe it for a univariate double precision function, but it works for any IEEE format, as long as there is a corresponding integer type with the same bit-width, and it also works for bivariate functions.

Assume $f(x)$ is a univariate double precision function. The number of possible inputs of $f$ is less than $2^{64}$, thus each one can be mapped to a 64-bit integer. Assume we have a conversion function `to_double` from `uint64_t` to `double`. The algorithm takes as input a range $[a, b]$ of `uint64_t` values, and a threshold $t$. If $b - a < t$, it checks exhaustively all double precision values $x=\text{to_double}(i)$ for $a \le i < b$. This means for each $x$, we compute the ulp-error $e$ between the value $y \approx f(x)$ returned by the corresponding library, and the exact result $z$ (as with infinite precision), as described in §1, and record the largest error.
GNU libc (also using the CORE-MATH code), and all functions available in the LLVM library. However, with rounding towards zero, AMD's `tanhf` yields `0x1p+0` instead of `0x1.fffffep-1` for $x = 0x1.205968p+3$ (this issue was already in AMD LibM 4.2).

We get large errors for `j0f`, `j1f`, `y0f`, `y1f` and `lgammaf` for all libraries where these functions are available, except for GNU libc, IML, and the Apple library.

Nevertheless, for almost all single precision functions, it is now possible to choose a library which provides presumably correct rounding (exceptions are the Bessel functions, `acospi`, `asinpi`, `atanpi`, `log10p1`, `tanpi`, `atan2pi` and `compound`).

## 2.2 Bivariate Functions

For single precision bivariate functions, it is not possible to perform an exhaustive search with academic resources, since there are up to $2^{64}$ possible pairs of inputs. For example, for the power function $x^y$, there are about $2^{61}$ input pairs $x, y > 0$ that do not yield underflow nor overflow. We thus used the algorithm described in §3.1 to obtain the values for bivariate functions in Table 1, which are *lower bounds* for the largest error.

**Notes about GNU libc.** GNU libc 2.41 implements new C23 functions for all formats: `acospi`, `asinpi`, `atanpi`, `cospi`, `sinpi`, `tanpi` and `atan2pi`.

**Notes about the Intel Math Library.** For $x = -0x1.527182p+127$ and $y = -0x1.803006p+127$, the `hypotf` function yields `NaN` instead of `+Inf`. The `rsqrt` function, which is not yet standardized in C99, is called `invsqrt` in the Intel Math Library; in single precision, it is correctly rounded for all rounding modes.

**Notes about AMD LibM.** AMD LibM provides new functions: `cospi`, `sinpi`, `tanpi`. We noticed a regression: for $x = -0x1.154244p+4$, AMD LibM 5.0 `expm1f` yields `NaN` instead of `-0x1.fffffep-1`.

**Notes about Newlib.** For negative integers, Newlib `tgammaf` returns an infinite value, whereas other libraries return `NaN`. We use the `lgammaf_r` function, since we were unable to compile the `lgammaf` function (undefined reference to `_impure_ptr`).

**Notes about the Apple Math Library.** The `erff`, `lgammaf` and `tgammaf` functions seem to call the corresponding double function, which explains the very good accuracy and the very small number of incorrectly-rounded results. The single precision `exp10` function is available as `__exp10f`.

**Notes about LLVM-libc.** Although the maximum observed distance is 0.5 ulp for `powf` and rounding to nearest, some inputs are not correctly rounded for other rounding modes, for example for $x = 0x1.9a1p-20$ and $y = 0x1.ep+0$, LLVM 19.1.7 `powf` yields `0x1.b5e4d4p-37` for rounding towards zero instead of `0x1.b5e4d6p-37` ($x^y$ is exact).

**Notes about the Microsoft mathematical library.** The Bessel functions are not available in single precision (they are only available in double precision).
If $b - a \ge t$, we subdivide the interval $[a, b]$ into two (almost) equal intervals, in each one we generate $t$ random values and compute the corresponding errors. We then recurse in the interval where we found the largest error.

For example with $t = 10^6$, the initial interval has $2^{64}$ values, thus we compute $f(x)$ on $2t$ random inputs $x$ ($t$ in each sub-range of $2^{63}$ values), and so on... The recursion stops when the width of the current interval is less than the total number of evaluations done so far in the recursion tree, thus an exhaustive search will at most double the search time.

In practice we use a variant of this algorithm suggested by Eric Schneider: instead of recursing only in the sub-interval giving the largest error on the random sample, we keep at each level of the search tree a list of say 20 intervals with the largest sample errors. Then we subdivide each of these intervals, which yields 40 smaller intervals (or 80 for bivariate functions), and keep again the 20 most promising ones.

We tried three variants of this algorithm, depending on how we choose the “best” sub-interval. The first strategy—described above—keeps the sub-interval with the largest ulp-error. A second strategy keeps the sub-interval with the maximal *average* ulp-error (considering only inputs which yield a meaningful ulp-error, discarding those giving NaN, zero or $\pm\infty$). A third strategy keeps the sub-interval with the largest expected ulp-error; for this, we estimate the mean and standard deviation of the ulp-error on each sub-interval, from which we deduce an estimate of the largest ulp-error for the number of points in the sub-interval [27]. In practice we found the first strategy to be more effective, with the second and third strategies finding sometimes larger errors. Thus when the search program is run on a machine with $n$ cores, we assign one core to the second and third strategies, and $n-2$ cores to the first one.

The program also keeps track of the worst cases found for each library, and tries these input values for the other libraries. This helps determining the libraries using the same code base. The search programs (`check_sample.c` for univariate functions, and `check_sample2.c` for bivariate functions), the exhaustive search program for `binary32` univariate functions (`check_exhaustive.c`) and the source code of this article (containing in comment the $x$-values yielding the largest errors for `binary32`) are available from https://gitlab.inria.fr/zimmerma/mathAccuracy.

We have also used the worst cases found by Vincent Lefèvre, publicly available at https://www.vinc17.net/research/testlibm/.

## 3.2 Results

We used a threshold of at least $t = 10^6$ for all libraries, often on processors with at least 32 cores, and the search program was run multiple times, cycling over all libraries, to detect common large errors.

Table 3 summarizes the largest known errors found using the above algorithm, for example the 0.531 entry for `acos` and IML means that for all inputs tried by the above algorithm, the error for the arc-cosine function with the Intel Math Library was bounded by 0.531 ulp. On each line, bold-face entries correspond to the best largest known error. Detailed tables (Tables 4, 5, 6, 7, 8, 9 and 10) give the input values (in hexadecimal) yielding the corresponding ulp-error $e$, which enables the reader to reproduce our results.

In double precision, the Intel Math Library gives the best results in most cases. However, it was observed that the Intel Math Library gives better results on AMD hardware than on Intel hardware for `acos`, `asin`, `asinh` and `atan2`; a possible explanation is that these functions use the `rsqrt` instruction, which is known to be more accurate on AMD hardware [4]. The square root
**Notes about FreeBSD.** We use the generic x86_64 binary from the FreeBSD distribution. Some slightly different results might be obtained if you recompile FreeBSD using fused-multiply-add.

# 3 Double Precision

For double precision it is not possible to perform an exhaustive search with academic resources. We thus use a black-box algorithm—described in §3.1—that tries to find large errors. Therefore, the values in the double-precision tables are only lower bounds of the largest error.

**REMARK:** We did not want to analyze the code of each library, since this approach would need more human work, and would require to start again from scratch for each new version of the library. We did not want either to design code specific to each function: for example for the double precision sine or cosine, one could test inputs near $2^{1024}$, to check the argument reduction is correctly done. We expect our search algorithm automatically detects such issues.

## 3.1 Search Algorithm

The idea of the algorithm is to subdivide recursively the set of values to search for. We describe it for a univariate double precision function, but it works for any IEEE format, as long as there is a corresponding integer type with the same bit-width, and it also works for bivariate functions.

Assume $f(x)$ is a univariate double precision function. The number of possible inputs of $f$ is less than $2^{64}$, thus each one can be mapped to a 64-bit integer. Assume we have a conversion function `to_double` from `uint64_t` to `double`. The algorithm takes as input a range $[a, b]$ of `uint64_t` values, and a threshold $t$. If $b - a < t$, it checks exhaustively all double precision values $x=	ext{to_double}(i)$ for $a \le i < b$. This means for each $x$, we compute the ulp-error $e$ between the value $y \approx f(x)$ returned by the corresponding library, and the exact result $z$ (as with infinite precision), as described in §1, and record the largest error.

If $b - a \ge t$, we subdivide the interval $[a, b]$ into two (almost) equal intervals, in each one we generate $t$ random values and compute the corresponding errors. We then recurse in the interval where we found the largest error.

For example with $t = 10^6$, the initial interval has $2^{64}$ values, thus we compute $f(x)$ on $2t$ random inputs $x$ ($t$ in each sub-range of $2^{63}$ values), and so on... The recursion stops when the width of the current interval is less than the total number of evaluations done so far in the recursion tree, thus an exhaustive search will at most double the search time.

In practice we use a variant of this algorithm suggested by Eric Schneider: instead of recursing only in the sub-interval giving the largest error on the random sample, we keep at each level of the search tree a list of say 20 intervals with the largest sample errors. Then we subdivide each of these intervals, which yields 40 smaller intervals (or 80 for bivariate functions), and keep again the 20 most promising ones.

We tried three variants of this algorithm, depending on how we choose the “best” sub-interval. The first strategy—described above—keeps the sub-interval with the largest ulp-error. A second strategy keeps the sub-interval with the maximal *average* ulp-error (considering only inputs which yield a meaningful ulp-error, discarding those giving `NaN`, zero or $\pm\infty$). A third strategy keeps the sub-interval with the largest expected ulp-error; for this, we estimate the mean and standard deviation of the ulp-error on each sub-interval, from which we deduce an estimate of the largest ulp-error for the number of points in the sub-interval [30]. In practice we found the first strategy
function seems to be correctly rounded for all libraries, as required by IEEE 754. The `log`, `log10`, `log1p`, `log2` and `hypot` functions from LLVM also seem to be correctly rounded (but for $x = 1$ and rounding towards $-\infty$, `log10` yields $-0$ in LLVM 17.0.6 instead of $+0$, after applying a patch that fixes the `fesetround` rounding direction macros). Large errors occur for the AMD `cbrt`, `expm1`, `atan2` and `hypot` functions, for the `j0`, `j1`, `y0` and `y1` functions for all libraries that provide them except the Intel Math Library, for the `lgamma` function from all libraries but the GNU, Intel and ARM libraries, for the `tgamma` function from Newlib, OpenLibm, the Apple library, MSVC and FreeBSD, for the power function from OpenLibm, MSVC and FreeBSD, for the `cos`, `sin`, and `tan` functions from LLVM libc.

**Notes about AMD LibM.** AMD LibM 4.1 provides a new binary64 function: `erf`. Some regressions noticed in AMD LibM 3.9 are still there in version 4.1 (some others were fixed): for $x = 0x1.ffffbfff7cfe9ep+9$, `expm1` yields $x$ instead of $+\inf$; for subnormal numbers, `atan2` gives huge errors; finally for $x = -0x0.FFFFFFFFFFFFFFFF-1022$ and $y = 0x0.0000000000001p-1022$, the `hypot` function yields $0x0.0000000000001p-1022$ instead of $0x0.FFFFFFFFFFFFFFFF-1022$. Also, a new regression was noticed in 4.1: for subnormal numbers, `cbrt` gives huge errors, for example for $x = -0x0.01FFFFFFFFFFFFFFFF-1022$, it yields $-0x1.9d23e0bb9777ap-323$ instead of the expected value $-0x1.FFFFFFFFFFFFFFFF-344$.

**Notes about Newlib.** For negative integers, Newlib `tgamma` returns an infinite value, whereas other libraries return `NaN`. The C standard says that a domain error or pole error may occur for a negative integer, but due to some non-standard dealing of Newlib with `errno`, we were unable to check whether it is the case. We however excluded negative integers for Newlib `tgamma` in our tests.

**Notes about LLVM-libc.** For $x = -0x1.13a5ccd87c9bbp+1008$, the `cos` and `sin` functions return $x$ instead of $0x1.a1fa1068d0b59p-1$ and $-0x1.27b3964185d8dp-1$ respectively, and `tan` yields `NaN` instead of $-0x1.6a3815320e5cfp-1$.

**Notes about the Microsoft mathematical library.** The `_y1` function yields `NaN` for $x = +0$ instead of $-\inf$, which explains the `Inf` value in Table 3.

### 3.3 Other Functions

For other functions from the C standard like `ldexp`, correct rounding might at first glance seem easier to implement. However, as reported by Fred Tydeman, cutting the smallest subnormal number in half does not always return zero. We noticed that for rounding upwards, for $x = 0xp-1074$, both Newlib 4.4.0 (already reported for 4.3.0) and LLVM 17.0.6 (already reported for 16.0.6) return 0 for `ldexp(x, -1)` instead of $x$. For both libraries, there is a similar issue for `ldexpf`.

## 4 Double Extended Precision

This format corresponds to the C type `long double` on x86_64 processors. Some libraries do not provide double extended precision, or do not provide mathematical functions for this format. The results are summarized in Table 11, and detailed in Tables 12-14. We see that in this format, the
to be more effective, with the second and third strategies finding sometimes larger errors. Thus
when the search program is run on a machine with *n* cores, we assign one core to the second and
third strategies, and *n* − 2 cores to the first one.

The program also keeps track of the worst cases found for each library, and tries these input val-
ues for the other libraries. This helps determining the libraries using the same code base. The search
programs (check_sample.c for univariate functions, and check_sample2.c for bivariate func-
tions), the exhaustive search program for binary32 univariate functions (check_exhaustive.c)
and the source code of this article (containing in comment the x-values yielding the largest errors
for binary32) are available from https://gitlab.inria.fr/zimmerma/math accuracy.

We have also used the worst cases found by Vincent Lefèvre, publicly available at https:
//www.vinc17.net/research/testlibm/.

3.2 Results

We used a threshold of at least $t = 10^6$ for all libraries, often on processors with at least 32 cores, and the search program was run multiple times, cycling over all libraries, to detect common large errors.

Table 3 summarizes the largest known errors found using the above algorithm, for example the
0.531 entry for **acos** and IML means that for all inputs tried by the above algorithm, the error
for the arc-cosine function with the Intel Math Library was bounded by 0.531 ulp. On each line,
bold-face entries correspond to the best largest known error. Detailed tables (Tables 4-11) give the
input values (in hexadecimal) yielding the corresponding ulp-error *e*, which enables the reader to
reproduce our results.

In double precision, the Intel Math Library gives the best results in most cases. However, it was
observed that the Intel Math Library gives better results on AMD hardware than on Intel hardware
for `acosh`, `asin`, `asinh` and `atan2`; a possible explanation is that these functions use the `rsqrt`
instruction, which is known to be more accurate on AMD hardware [6]. The square root function
seems to be correctly rounded for all libraries, as required by IEEE 754. All LLVM functions except
`cbrt` seem to be correctly rounded. Large errors occur for the AMD `cbrt` function, for the `j0`, `j1`, `y0` and `y1` functions for all libraries that provide them except the Intel Math Library, for the `lgamma`
function from all libraries but the GNU and Intel libraries, for the `tgamma` function from Newlib,
OpenLibm, the Apple library, MSVC and FreeBSD, for the power function from OpenLibm, MSVC
and FreeBSD, and for `compound` from IML.

**Notes about AMD LibM.** An issue noticed in 4.1 (maybe it was there earlier) is still in 5.0: for subnormal numbers, `cbrt` gives huge errors, for example for $x = -0x0.01ffffffffp-1022$, it yields `-0x1.9d23e0bb9777ap-323` instead of the expected value `-0x1.fffffffabp-344`.

**Notes about Newlib.** For negative integers, Newlib `tgamma` returns an infinite value, whereas other libraries return `NaN`. The C standard says that a domain error or pole error may occur for a negative integer, but due to some non-standard dealing of Newlib with `errno`, we were unable to check whether it is the case. We however excluded negative integers for Newlib `tgamma` in our tests.

**Notes about the Microsoft mathematical library.** The `_y1` function yields `NaN` for $x = +0$
instead of `-Inf`, which explains the `Inf` value in Table 3.
<table><caption>Table 3: Double precision: Largest known error.</caption><thead><tr><th>library version</th><th>GNU libc 2.39</th><th>IML 2024.0.2</th><th>AMD 4.1</th><th>Newlib 4.4.0</th><th>OpenLibm 0.8.1</th><th>Musl 1.2.4</th><th>Apple 14.0</th><th>LLVM 17.0.6</th><th>MSVC 2022</th><th>FreeBSD 14.0</th><th>ArmPL 23.10</th><th>CUDA 12.2.1</th><th>ROCm 5.7.0</th></tr></thead><tbody><tr><td>acos</td><td><strong>0.523</strong></td><td>0.531</td><td>1.36</td><td>0.930</td><td>0.930</td><td>0.930</td><td>1.06</td><td></td><td>0.934</td><td>0.930</td><td>1.52</td><td>1.53</td><td>0.772</td></tr><tr><td>acosh</td><td>2.25</td><td><strong>0.509</strong></td><td>1.32</td><td>2.25</td><td>2.25</td><td>2.25</td><td>2.25</td><td></td><td>3.22</td><td>2.25</td><td>2.66</td><td>2.52</td><td>0.661</td></tr><tr><td>asin</td><td><strong>0.516</strong></td><td>0.531</td><td>1.06</td><td>0.981</td><td>0.981</td><td>0.981</td><td>0.709</td><td></td><td>1.05</td><td>0.981</td><td>2.69</td><td>1.99</td><td>0.710</td></tr><tr><td>asinh</td><td>1.92</td><td><strong>0.504</strong></td><td>1.65</td><td>1.92</td><td>1.92</td><td>1.92</td><td>1.58</td><td></td><td>2.05</td><td>1.92</td><td>2.04</td><td>2.57</td><td>0.661</td></tr><tr><td>atan</td><td><strong>0.523</strong></td><td>0.528</td><td>1.02</td><td>0.861</td><td>0.861</td><td>0.861</td><td>0.876</td><td></td><td>0.863</td><td>0.861</td><td>2.24</td><td>1.77</td><td>1.73</td></tr><tr><td>atanh</td><td>1.78</td><td><strong>0.507</strong></td><td>1.04</td><td>1.81</td><td>1.81</td><td>1.80</td><td>2.01</td><td></td><td>2.50</td><td>1.81</td><td>3.00</td><td>2.50</td><td>0.664</td></tr><tr><td>cbrt</td><td>3.67</td><td>0.523</td><td>1.53e22</td><td>0.670</td><td>0.668</td><td>0.668</td><td>0.729</td><td></td><td>1.86</td><td>0.668</td><td>1.79</td><td><strong>0.501</strong></td><td><strong>0.501</strong></td></tr><tr><td>cos</td><td><strong>0.516</strong></td><td>0.518</td><td>0.919</td><td>0.887</td><td>0.834</td><td>0.834</td><td>0.948</td><td>Inf</td><td>0.897</td><td>0.834</td><td></td><td>1.52</td><td>0.797</td></tr><tr><td>cosh</td><td>1.93</td><td><strong>0.516</strong></td><td>1.85</td><td>2.67</td><td>1.47</td><td>1.04</td><td>0.523</td><td></td><td>1.91</td><td>1.47</td><td>1.93</td><td>1.40</td><td>0.563</td></tr><tr><td>erf</td><td>1.43</td><td><strong>0.773</strong></td><td>1.00</td><td>1.02</td><td>1.02</td><td>1.02</td><td>6.41</td><td></td><td>4.62</td><td>1.02</td><td>2.29</td><td>1.50</td><td>1.12</td></tr><tr><td>erfc</td><td>5.19</td><td><strong>0.826</strong></td><td></td><td>4.08</td><td>4.08</td><td>3.72</td><td>10.7</td><td></td><td>8.46</td><td>4.08</td><td>1.71</td><td>4.51</td><td>4.08</td></tr><tr><td>exp</td><td><strong>0.511</strong></td><td>0.530</td><td>1.01</td><td>0.949</td><td>0.949</td><td><strong>0.511</strong></td><td>0.521</td><td></td><td>1.50</td><td>0.949</td><td><strong>0.511</strong></td><td>0.928</td><td>0.929</td></tr><tr><td>exp10</td><td><strong>0.513</strong></td><td>0.538</td><td>1.02</td><td>0.896</td><td></td><td>4.14</td><td>0.521</td><td></td><td></td><td></td><td></td><td>1.11</td><td>1.11</td></tr><tr><td>exp2</td><td>0.511</td><td>0.535</td><td>1.05</td><td>0.896</td><td>0.751</td><td>0.511</td><td>0.521</td><td></td><td>2.23</td><td>0.751</td><td><strong>0.509</strong></td><td>0.948</td><td>0.947</td></tr><tr><td>expm1</td><td>0.911</td><td><strong>0.512</strong></td><td>Inf</td><td>0.909</td><td>0.909</td><td>0.909</td><td>0.706</td><td></td><td>3.06</td><td>0.909</td><td>2.18</td><td>1.18</td><td>1.91</td></tr><tr><td>j0</td><td>4.51e14</td><td><strong>0.600</strong></td><td></td><td>9.01e15</td><td>4.51e14</td><td>4.51e14</td><td>3.83e14</td><td></td><td>1.88e26</td><td>4.51e14</td><td></td><td>3.08e20</td><td>1.25e13</td></tr><tr><td>j1</td><td>4.47e14</td><td><strong>0.615</strong></td><td></td><td>9.01e15</td><td>1.10e15</td><td>1.10e15</td><td>1.10e15</td><td></td><td>3.85e26</td><td>1.10e15</td><td></td><td>1.73e21</td><td>4.80e13</td></tr><tr><td>lgamma</td><td>11.1</td><td><strong>0.515</strong></td><td></td><td>4.45e15</td><td>4.45e15</td><td>4.45e15</td><td>2.33e16</td><td></td><td>5.10e13</td><td>4.45e15</td><td></td><td>5.11e15</td><td>4.45e15</td></tr><tr><td>log</td><td>0.520</td><td>0.518</td><td>0.562</td><td>0.946</td><td>0.946</td><td>0.520</td><td>0.508</td><td><strong>0.500</strong></td><td>0.577</td><td>0.946</td><td>0.520</td><td>0.564</td><td>0.663</td></tr><tr><td>log10</td><td>1.62</td><td>0.532</td><td>1.09</td><td>2.08</td><td>0.814</td><td>0.814</td><td>0.514</td><td><strong>0.500</strong></td><td>0.633</td><td>0.814</td><td>1.62</td><td>1.43</td><td>0.785</td></tr><tr><td>log1p</td><td>0.899</td><td>0.521</td><td>0.636</td><td>0.896</td><td>0.896</td><td>0.900</td><td>0.667</td><td><strong>0.500</strong></td><td>1.44</td><td>0.896</td><td>1.74</td><td>1.50</td><td>1.00</td></tr><tr><td>log2</td><td>0.548</td><td>0.505</td><td>1.72</td><td>2.06</td><td>0.921</td><td>0.555</td><td>0.515</td><td><strong>0.500</strong></td><td>0.812</td><td>0.921</td><td>0.554</td><td>1.31</td><td>0.734</td></tr><tr><td>sin</td><td><strong>0.516</strong></td><td>0.518</td><td>0.895</td><td>0.888</td><td>0.831</td><td>0.831</td><td>0.944</td><td>Inf</td><td>0.799</td><td>0.831</td><td></td><td>1.52</td><td>0.800</td></tr><tr><td>sinh</td><td>1.93</td><td><strong>0.521</strong></td><td>1.49</td><td>2.67</td><td>1.88</td><td>1.88</td><td>0.539</td><td></td><td>1.51</td><td>1.88</td><td>2.58</td><td>1.51</td><td>0.868</td></tr><tr><td>sqrt</td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td></tr><tr><td>tan</td><td>0.619</td><td><strong>0.550</strong></td><td>1.38</td><td>1.02</td><td>1.02</td><td>1.02</td><td>3.53</td><td>Inf</td><td>1.32</td><td>1.02</td><td></td><td>2.09</td><td>1.30</td></tr><tr><td>tanh</td><td>2.21</td><td><strong>0.556</strong></td><td>1.40</td><td>2.22</td><td>2.22</td><td>2.22</td><td>0.613</td><td></td><td>1.44</td><td>2.22</td><td>2.76</td><td>1.48</td><td>0.866</td></tr><tr><td>tgamma</td><td>8.68</td><td><strong>0.519</strong></td><td></td><td>2.27e3</td><td>1.03e3</td><td>16.0</td><td>1.03e3</td><td></td><td>9.01e15</td><td>1.03e3</td><td></td><td>10.1</td><td>13.7</td></tr><tr><td>y0</td><td>5.93e15</td><td><strong>1.14</strong></td><td></td><td>1.42e15</td><td>1.42e15</td><td>1.42e15</td><td>1.42e15</td><td></td><td>3.30e25</td><td>1.42e15</td><td></td><td>1.18e21</td><td>1.95e13</td></tr><tr><td>y1</td><td>5.56e15</td><td><strong>1.25</strong></td><td></td><td>5.56e15</td><td>5.56e15</td><td>5.56e15</td><td>5.56e15</td><td></td><td>Inf</td><td>5.56e15</td><td></td><td>1.17e21</td><td>6.14e13</td></tr><tr><td>acospi</td><td></td><td><strong>0.541</strong></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>asinpi</td><td></td><td><strong>0.521</strong></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>atanpi</td><td></td><td><strong>0.936</strong></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>cospi</td><td></td><td><strong>0.503</strong></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>0.807</td><td></td><td>1.52</td><td>0.894</td></tr><tr><td>sinpi</td><td></td><td><strong>0.532</strong></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>0.811</td><td></td><td>1.52</td><td>0.890</td></tr><tr><td>tanpi</td><td></td><td>1.00</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td><strong>0.966</strong></td><td></td><td></td><td></td></tr><tr><td>rsqrt</td><td></td><td><strong>0.501</strong></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>0.510</td><td>1.00</td></tr><tr><td>atan2</td><td><strong>0.524</strong></td><td>0.548</td><td>5.55e11</td><td>1.55</td><td>1.55</td><td>1.55</td><td>0.747</td><td></td><td>0.750</td><td>1.55</td><td>2.23</td><td>1.76</td><td>1.82</td></tr><tr><td>atan2pi</td><td></td><td><strong>1.02</strong></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>hypot</td><td>0.792</td><td>0.751</td><td>4.51e15</td><td>1.21</td><td>1.21</td><td>1.04</td><td>1.21</td><td><strong>0.500</strong></td><td>1.22</td><td>1.21</td><td></td><td>1.89</td><td>1.21</td></tr><tr><td>pow</td><td><strong>0.523</strong></td><td>1.73</td><td>0.762</td><td>0.892</td><td>636.</td><td>0.525</td><td>0.757</td><td></td><td>91.3</td><td>636.</td><td><strong>0.523</strong></td><td>1.84</td><td>1.40</td></tr></tbody></table>
<table><caption>Table 3: Double precision: Largest known error.</caption><thead><tr><th>library version</th><th>GNU libc 2.41</th><th>IML 2025.0.0</th><th>AMD 5.0</th><th>Newlib 4.5.0</th><th>OpenLibm 0.8.5</th><th>Musl 1.2.5</th><th>Apple 15.1.1</th><th>LLVM 19.1.7</th><th>MSVC 2022</th><th>FreeBSD 14.2</th><th>ArmPL 24.04</th><th>CUDA 12.8</th><th>ROCm 6.2.4</th></tr></thead><tbody><tr><td>acos</td><td><strong>0.523</strong></td><td>0.531</td><td>1.36</td><td>0.930</td><td>0.930</td><td>0.930</td><td>1.06</td><td></td><td>0.934</td><td>0.930</td><td>1.52</td><td>1.53</td><td>0.772</td></tr><tr><td>acosh</td><td>2.25</td><td><strong>0.509</strong></td><td>1.32</td><td>2.25</td><td>2.25</td><td>2.25</td><td>2.25</td><td></td><td>3.22</td><td>2.25</td><td>2.66</td><td>2.52</td><td>0.662</td></tr><tr><td>asin</td><td><strong>0.516</strong></td><td>0.531</td><td>1.06</td><td>0.981</td><td>0.981</td><td>0.981</td><td>0.709</td><td></td><td>1.05</td><td>0.981</td><td>2.69</td><td>1.99</td><td>0.710</td></tr><tr><td>asinh</td><td>1.92</td><td><strong>0.507</strong></td><td>1.65</td><td>1.92</td><td>1.92</td><td>1.92</td><td>1.58</td><td></td><td>2.05</td><td>1.92</td><td>2.04</td><td>2.57</td><td>0.661</td></tr><tr><td>atan</td><td><strong>0.523</strong></td><td>0.528</td><td>0.863</td><td>0.861</td><td>0.861</td><td>0.861</td><td>0.876</td><td></td><td>0.863</td><td>0.861</td><td>2.24</td><td>1.77</td><td>1.73</td></tr><tr><td>atanh</td><td>1.78</td><td><strong>0.507</strong></td><td>1.04</td><td>1.81</td><td>1.81</td><td>1.80</td><td>2.01</td><td></td><td>2.50</td><td>1.81</td><td>3.00</td><td>2.50</td><td>0.664</td></tr><tr><td>cbrt</td><td>3.67</td><td>0.523</td><td>1.53e22</td><td>0.670</td><td>0.668</td><td>0.668</td><td>0.729</td><td>4.51e15</td><td>1.86</td><td>0.668</td><td>1.79</td><td><strong>0.501</strong></td><td><strong>0.501</strong></td></tr><tr><td>cos</td><td><strong>0.516</strong></td><td>0.518</td><td>0.919</td><td>0.887</td><td>0.834</td><td>0.834</td><td>0.948</td><td><strong>0.500</strong></td><td>0.897</td><td>0.834</td><td></td><td>1.52</td><td>0.798</td></tr><tr><td>cosh</td><td>1.93</td><td><strong>0.516</strong></td><td>1.85</td><td>2.67</td><td>1.47</td><td>1.04</td><td>0.523</td><td></td><td>1.91</td><td>1.47</td><td>1.93</td><td>1.40</td><td>0.563</td></tr><tr><td>erf</td><td>1.43</td><td><strong>0.773</strong></td><td>1.00</td><td>1.02</td><td>1.02</td><td>1.02</td><td>6.41</td><td></td><td>4.62</td><td>1.02</td><td>2.29</td><td>1.50</td><td>1.12</td></tr><tr><td>erfc</td><td>5.19</td><td><strong>0.827</strong></td><td></td><td>4.08</td><td>4.08</td><td>3.72</td><td>10.7</td><td></td><td>8.46</td><td>4.08</td><td>1.71</td><td>4.51</td><td>4.08</td></tr><tr><td>exp</td><td>0.511</td><td>0.530</td><td>1.01</td><td>0.949</td><td>0.949</td><td>0.511</td><td>0.521</td><td><strong>0.500</strong></td><td>1.50</td><td>0.949</td><td>0.511</td><td>0.928</td><td>0.929</td></tr><tr><td>exp10</td><td>0.513</td><td>0.538</td><td>1.02</td><td>0.896</td><td></td><td>4.14</td><td>0.521</td><td><strong>0.500</strong></td><td></td><td></td><td>0.510</td><td>1.11</td><td>1.11</td></tr><tr><td>exp2</td><td>0.511</td><td>0.535</td><td>1.05</td><td>0.896</td><td>0.751</td><td>0.511</td><td>0.521</td><td><strong>0.500</strong></td><td>2.23</td><td>0.751</td><td>0.509</td><td>0.948</td><td>0.947</td></tr><tr><td>expm1</td><td>0.911</td><td>0.512</td><td>0.670</td><td>0.909</td><td>0.909</td><td>0.909</td><td>0.706</td><td><strong>0.500</strong></td><td>3.06</td><td>0.909</td><td>2.18</td><td>1.18</td><td>1.91</td></tr><tr><td>j0</td><td>4.51e14</td><td><strong>0.600</strong></td><td></td><td>9.01e15</td><td>4.51e14</td><td>4.51e14</td><td>3.83e14</td><td></td><td>1.88e26</td><td>4.51e14</td><td></td><td>3.08e20</td><td>1.25e13</td></tr><tr><td>j1</td><td>4.47e14</td><td><strong>0.615</strong></td><td></td><td>9.01e15</td><td>1.10e15</td><td>1.10e15</td><td>1.10e15</td><td></td><td>3.85e26</td><td>1.10e15</td><td></td><td>1.73e21</td><td>4.80e13</td></tr><tr><td>lgamma</td><td>11.1</td><td><strong>0.515</strong></td><td></td><td>4.45e15</td><td>4.45e15</td><td>4.45e15</td><td>2.33e16</td><td></td><td>5.10e13</td><td>4.45e15</td><td></td><td>5.11e15</td><td>4.45e15</td></tr><tr><td>log</td><td>0.520</td><td>0.518</td><td>0.610</td><td>0.946</td><td>0.946</td><td>0.520</td><td>0.508</td><td><strong>0.500</strong></td><td>0.577</td><td>0.946</td><td>0.520</td><td>0.564</td><td>0.663</td></tr><tr><td>log10</td><td>1.62</td><td>0.532</td><td>1.09</td><td>2.08</td><td>0.814</td><td>0.814</td><td>0.514</td><td><strong>0.500</strong></td><td>0.633</td><td>0.814</td><td>1.62</td><td>1.43</td><td>0.785</td></tr><tr><td>log1p</td><td>0.899</td><td>0.521</td><td>0.636</td><td>0.896</td><td>0.896</td><td>0.900</td><td>0.667</td><td><strong>0.500</strong></td><td>1.44</td><td>0.896</td><td>1.74</td><td>1.50</td><td>1.00</td></tr><tr><td>log2</td><td>0.548</td><td><strong>0.500</strong></td><td>1.72</td><td>2.06</td><td>0.921</td><td>0.555</td><td>0.515</td><td><strong>0.500</strong></td><td>0.812</td><td>0.921</td><td>0.554</td><td>1.31</td><td>0.734</td></tr><tr><td>sin</td><td><strong>0.516</strong></td><td>0.518</td><td>0.895</td><td>0.888</td><td>0.831</td><td>0.831</td><td>0.944</td><td><strong>0.500</strong></td><td>0.799</td><td>0.831</td><td></td><td>1.52</td><td>0.800</td></tr><tr><td>sinh</td><td>1.93</td><td><strong>0.521</strong></td><td>1.49</td><td>2.67</td><td>1.88</td><td>1.88</td><td>0.539</td><td></td><td>1.51</td><td>1.88</td><td>2.59</td><td>1.51</td><td>0.868</td></tr><tr><td>sqrt</td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td></tr><tr><td>tan</td><td>0.619</td><td><strong>0.550</strong></td><td>1.38</td><td>1.02</td><td>1.02</td><td>1.02</td><td>3.53</td><td><strong>0.500</strong></td><td>1.32</td><td>1.02</td><td></td><td>2.09</td><td>1.30</td></tr><tr><td>tanh</td><td>2.21</td><td><strong>0.556</strong></td><td>1.40</td><td>2.22</td><td>2.22</td><td>2.22</td><td>0.613</td><td></td><td>1.44</td><td>2.22</td><td>2.76</td><td>1.48</td><td>0.866</td></tr><tr><td>tgamma</td><td>8.68</td><td><strong>0.519</strong></td><td></td><td>2.27e3</td><td>1.03e3</td><td>16.0</td><td>1.03e3</td><td></td><td>9.01e15</td><td>1.03e3</td><td></td><td>10.1</td><td>13.7</td></tr><tr><td>y0</td><td>5.93e15</td><td><strong>1.14</strong></td><td></td><td>1.42e15</td><td>1.42e15</td><td>1.42e15</td><td>1.42e15</td><td></td><td>3.30e25</td><td>1.42e15</td><td></td><td>1.18e21</td><td>1.95e13</td></tr><tr><td>y1</td><td>5.56e15</td><td><strong>1.25</strong></td><td></td><td>5.56e15</td><td>5.56e15</td><td>5.56e15</td><td>5.56e15</td><td></td><td>Inf</td><td>5.56e15</td><td></td><td>1.17e21</td><td>6.14e13</td></tr><tr><td>acospi</td><td>1.51</td><td><strong>0.541</strong></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>asinpi</td><td>1.50</td><td><strong>0.521</strong></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>atanpi</td><td>1.51</td><td><strong>0.942</strong></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>cospi</td><td>1.86</td><td><strong>0.503</strong></td><td>2.47</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>exp10m1</td><td><strong>3.54</strong></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>exp2m1</td><td><strong>1.93</strong></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>log10p1</td><td><strong>1.95</strong></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>log2p1</td><td><strong>1.88</strong></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>sinpi</td><td>1.86</td><td><strong>0.532</strong></td><td>2.56</td><td></td><td></td><td></td><td></td><td></td><td></td><td>0.811</td><td>3.16</td><td>1.52</td><td>0.892</td></tr><tr><td>tanpi</td><td>2.85</td><td>1.00</td><td>2.56</td><td></td><td></td><td></td><td></td><td></td><td></td><td><strong>0.969</strong></td><td></td><td></td><td></td></tr><tr><td>rsqrt</td><td></td><td><strong>0.501</strong></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>0.510</td><td>1.00</td></tr><tr><td>atan2</td><td><strong>0.524</strong></td><td>0.548</td><td>1.51</td><td>1.55</td><td>1.55</td><td>1.55</td><td>0.747</td><td></td><td>0.750</td><td>1.55</td><td>2.23</td><td>1.76</td><td>1.82</td></tr><tr><td>atan2pi</td><td>1.49</td><td><strong>1.02</strong></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>compound</td><td></td><td><strong>1.13e15</strong></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>hypot</td><td>0.792</td><td>0.751</td><td>1.03</td><td>1.21</td><td>1.21</td><td>1.04</td><td>1.21</td><td><strong>0.500</strong></td><td>1.22</td><td>1.21</td><td></td><td>1.89</td><td>1.21</td></tr><tr><td>pow</td><td><strong>0.523</strong></td><td>1.73</td><td>1.00</td><td>0.892</td><td>636.</td><td>0.525</td><td>0.757</td><td></td><td>91.3</td><td>636.</td><td><strong>0.523</strong></td><td>1.84</td><td>1.40</td></tr></tbody></table>
<table><caption>Table 4: Double precision: GNU libc and Intel Math Library.</caption><thead><tr><th rowspan="2">function</th><th colspan="2">GNU libc 2.39</th><th colspan="2">IML 2024.0.2</th></tr><tr><th>x</th><th>max e</th><th>x</th><th>max e</th></tr></thead><tbody><tr><td>acos</td><td>0x1.dffffb3488a4p-1</td><td>0.523</td><td>0x1.6c05eb219ec46p-1</td><td>0.531</td></tr><tr><td>acosh</td><td>0x1.0001ff6afc4bap+0</td><td>2.25</td><td>0x1.0192a33615d8cp+0</td><td>0.509</td></tr><tr><td>asin</td><td>-0x1.0000045b2c904p-3</td><td>0.516</td><td>0x1.6c042a6378102p-1</td><td>0.531</td></tr><tr><td>asinh</td><td>-0x1.02657ff36d5f3p-2</td><td>1.92</td><td>0x1.000f4765984b6p-4</td><td>0.504</td></tr><tr><td>atan</td><td>0x1.f9004c4fef9eap-4</td><td>0.523</td><td>-0x1.ffff8020d3d1dp-7</td><td>0.528</td></tr><tr><td>atanh</td><td>-0x1.ebb5133a9d9a4p-4</td><td>1.78</td><td>-0x1.e2cfb2667f17ep-9</td><td>0.507</td></tr><tr><td>cbrt</td><td>0x1.7a337e1ba1ec2p-257</td><td>3.67</td><td>-0x1.f7af4893d1d51p-616</td><td>0.523</td></tr><tr><td>cos</td><td>-0x1.7120161c92674p+0</td><td>0.516</td><td>-0x1.d19ebc5567dcdp+311</td><td>0.518</td></tr><tr><td>cosh</td><td>-0x1.633c654fee2bap+9</td><td>1.93</td><td>-0x1.5a364e6b98134p+9</td><td>0.516</td></tr><tr><td>erf</td><td>0x1.c332bde7ca515p-5</td><td>1.43</td><td>0x1.c5bba21264fa9p-9</td><td>0.773</td></tr><tr><td>erfc</td><td>0x1.3ff2d63705b29p+0</td><td>5.19</td><td>0x1.a8cf6bca23f9cp+4</td><td>0.826</td></tr><tr><td>exp</td><td>-0x1.49f33ad2c1c58p+9</td><td>0.511</td><td>0x1.fce66609f7428p+5</td><td>0.530</td></tr><tr><td>exp10</td><td>-0x1.57449153f316ep-7</td><td>0.513</td><td>-0x1.5cd9d94d49a85p+1</td><td>0.538</td></tr><tr><td>exp2</td><td>-0x1.1a4ce073ea908p-5</td><td>0.511</td><td>0x1.f3ff85f33423p-1</td><td>0.535</td></tr><tr><td>expm1</td><td>0x1.63be411e096ep-2</td><td>0.911</td><td>-0x1.62fe464c64f65p-8</td><td>0.512</td></tr><tr><td>j0</td><td>0x1.33d152e971b4p+1</td><td>4.51e14</td><td>0x1.aff859518c846p+7</td><td>0.600</td></tr><tr><td>j1</td><td>-0x1.ea75575af6f09p+1</td><td>4.47e14</td><td>-0x1.67b5541c7d8b7p+7</td><td>0.615</td></tr><tr><td>lgamma</td><td>-0x1.f613ab0969f81p+1</td><td>11.1</td><td>-0x1.3f62c60e23b31p+2</td><td>0.515</td></tr><tr><td>log</td><td>0x1.1211bef8f68e9p+0</td><td>0.520</td><td>0x1.008000db2e8bep+0</td><td>0.518</td></tr><tr><td>log10</td><td>0x1.de02157073b31p-1</td><td>1.62</td><td>0x1.feda7b62c1033p-1</td><td>0.532</td></tr><tr><td>log1p</td><td>-0x1.2bf183e0344b2p-2</td><td>0.899</td><td>0x1.000aee2a2757fp-9</td><td>0.521</td></tr><tr><td>log2</td><td>0x1.1406d79e1b574p+0</td><td>0.548</td><td>0x1.fe01ab6b835b8p-1</td><td>0.505</td></tr><tr><td>sin</td><td>-0x1.f8b791cafcdefp+4</td><td>0.516</td><td>-0x1.0e16eb809a35dp+944</td><td>0.518</td></tr><tr><td>sinh</td><td>-0x1.633c654fee2bap+9</td><td>1.93</td><td>-0x1.adc135eb544c1p-2</td><td>0.521</td></tr><tr><td>sqrt</td><td>0x1.fffffffffffp-1</td><td>0.500</td><td>0x1.fffffffffffp-1</td><td>0.500</td></tr><tr><td>tan</td><td>-0x1.317cd745dd37cp+9</td><td>0.619</td><td>0x1.49adfd996a81dp+18</td><td>0.550</td></tr><tr><td>tanh</td><td>0x1.e0d4673daf76bp-3</td><td>2.21</td><td>0x1.002629fd74484p+0</td><td>0.556</td></tr><tr><td>tgamma</td><td>-0x1.c18caec00f7bp+2</td><td>8.68</td><td>-0x1.3e0001ad3bee3p+6</td><td>0.519</td></tr><tr><td>y0</td><td>0x1.c982eb8d417eap-1</td><td>5.93e15</td><td>0x1.4cdee58a47edd-31</td><td>1.14</td></tr><tr><td>y1</td><td>0x1.193bed4dff243p+1</td><td>5.56e15</td><td>0x1.c513c569fe78ep+0</td><td>1.25</td></tr><tr><td>acospi</td><td></td><td></td><td>0x1.6a18f7dda5343p-1</td><td>0.541</td></tr><tr><td>asinpi</td><td></td><td></td><td>0x1.921fabd2a2b25p-750</td><td>0.521</td></tr><tr><td>atanpi</td><td></td><td></td><td>0x1.a6ba44a8e47acp-2</td><td>0.936</td></tr><tr><td>cospi</td><td></td><td></td><td>-0x1.f0274f4cbd9abp-8</td><td>0.503</td></tr><tr><td>sinpi</td><td></td><td></td><td>-0x0.07eca1f16602dp-1022</td><td>0.532</td></tr><tr><td>tanpi</td><td></td><td></td><td>0x1.49b79692667bp+46</td><td>1.00</td></tr><tr><td>rsqrt</td><td></td><td></td><td>0x1.00018f5913816p-458</td><td>0.501</td></tr><tr><td>atan2</td><td>0x1.ed6060626eeefp-429<br>0x1.f42ebb62994dcp-426</td><td>0.524</td><td>0x1.b77ade79a36d5p-326<br>0x1 ff6a37b72b52bp-319</td><td>0.548</td></tr><tr><td>atan2pi</td><td></td><td></td><td>-0x1.026462f302171p-391<br>0x1.39b157b1210a4p-390</td><td>1.02</td></tr><tr><td>hypot</td><td>0x0.603e52daf0bfdp-1022<br>-0x0.a622d0a9a433bp-1022</td><td>0.792</td><td>0x0.19deaac345ffap-1022<br>0x0.92c8727c389b6p-1022</td><td>0.751</td></tr><tr><td>pow</td><td>0x1.010e2e7ee71aep+0<br>0x1.44bf0047427f6p+17</td><td>0.523</td><td>0x1.ffff9c61ce4p-1<br>0x1.c4e304ed4c734p+31</td><td>1.73</td></tr></tbody></table>
<table><caption>Table 4: Double precision: inputs giving the largest known error in GNU libc and the Intel Math Library (univariate functions).</caption><thead><tr><th>function</th><th>GNU libc 2.41<br>x</th><th>IML 2025.0.0<br>x</th></tr></thead><tbody><tr><td>acos</td><td>0x1.dffffb3488a4p-1</td><td>0x1.6c05eb219ec46p-1</td></tr><tr><td>acosh</td><td>0x1.0001ff6afc4bap+0</td><td>0x1.01825ca7da7e5p+0</td></tr><tr><td>asin</td><td>-0x1.0000045b2c904p-3</td><td>0x1.6c042a6378102p-1</td></tr><tr><td>asinh</td><td>-0x1.02657ff36d5f3p-2</td><td>-0x1.000276d9cf31ap-4</td></tr><tr><td>atan</td><td>0x1.f9004c4fef9eap-4</td><td>-0x1.ffff8020d3d1dp-7</td></tr><tr><td>atanh</td><td>-0x1.ebb5133a9d9a4p-4</td><td>-0x1.e2cfb2667f17ep-9</td></tr><tr><td>cbrt</td><td>0x1.7a337e1ba1ec2p-257</td><td>-0x1.f7af4893d1d51p-616</td></tr><tr><td>cos</td><td>-0x1.7120161c92674p+0</td><td>-0x1.d19ebc5567dcdp+311</td></tr><tr><td>cosh</td><td>-0x1.633c654fee2bap+9</td><td>-0x1.5a364e6b98134p+9</td></tr><tr><td>erf</td><td>0x1.c332bde7ca515p-5</td><td>-0x1.c5bcc48b2d463p-21</td></tr><tr><td>erfc</td><td>0x1.3ff2d63705b29p+0</td><td>0x1.a8cf81fa2a28fp+4</td></tr><tr><td>exp</td><td>-0x1.49f33ad2c1c58p+9</td><td>0x1.fce66609f7428p+5</td></tr><tr><td>exp10</td><td>-0x1.57449153f316ep-7</td><td>-0x1.5cd9d94d49a85p+1</td></tr><tr><td>exp2</td><td>-0x1.1a4ce073ea908p-5</td><td>-0x1.8002f29666b99p-6</td></tr><tr><td>expm1</td><td>0x1.63be411e096ep-2</td><td>-0x1.62fe464c64f65p-8</td></tr><tr><td>j0</td><td>0x1.33d152e971b4p+1</td><td>0x1.aff859518c846p+7</td></tr><tr><td>j1</td><td>-0x1.ea75575af6f09p+1</td><td>-0x1.67b5541c7d8b7p+7</td></tr><tr><td>lgamma</td><td>-0x1.f613ab0969f81p+1</td><td>-0x1.3f62c60e23b31p+2</td></tr><tr><td>log</td><td>0x1.1211bef8f68e9p+0</td><td>0x1.008000db2e8bep+0</td></tr><tr><td>log10</td><td>0x1.de02157073b31p-1</td><td>0x1.feda7b62c1033p-1</td></tr><tr><td>log1p</td><td>-0x1.2bf183e0344b2p-2</td><td>0x1.000aee2a2757fp-9</td></tr><tr><td>log2</td><td>0x1.1406d79e1b574p+0</td><td>0x1.b4ebe40c95a01p+0</td></tr><tr><td>sin</td><td>-0x1.f8b791cafcdefp+4</td><td>-0x1.0e16eb809a35dp+944</td></tr><tr><td>sinh</td><td>-0x1.633c654fee2bap+9</td><td>-0x1.adc135eb544c1p-2</td></tr><tr><td>sqrt</td><td>0x1.FFFFFFFFFFFFFFFF-1</td><td>0x1.FFFFFFFFFFFFFFFF-1</td></tr><tr><td>tan</td><td>-0x1.317cd745dd37cp+9</td><td>0x1.49adfd996a81dp+18</td></tr><tr><td>tanh</td><td>0x1.e126eee514cbcp-3</td><td>0x1.002629fd74484p+0</td></tr><tr><td>tgamma</td><td>-0x1.c18caecc00f7bp+2</td><td>-0x1.3e0001ad3bee3p+6</td></tr><tr><td>y0</td><td>0x1.c982eb8d417eap-1</td><td>0x1.4cdee58a47edd-31</td></tr><tr><td>y1</td><td>0x1.193bed4dff243p+1</td><td>0x1.c513c569fe78ep+0</td></tr><tr><td>acospi</td><td>0x1.da0ea62dd7231p-1</td><td>0x1.6a18f7dda5343p-1</td></tr><tr><td>asinpi</td><td>-0x1.8805060cb885cp-3</td><td>0x1.921fabd2a2b25p-750</td></tr><tr><td>atanpi</td><td>0x1.9601b055fdf97p-3</td><td>0x1.a7fb417ac774ap-2</td></tr><tr><td>cospi</td><td>-0x1.1a0a2fa299b92p+6</td><td>-0x1.f01d619f61e5bp-8</td></tr><tr><td>exp10m1</td><td>0x1.e880c5bafbd41p-2</td><td></td></tr><tr><td>exp2m1</td><td>0x1.d047583a6c6dp-1</td><td></td></tr><tr><td>log10p1</td><td>-0x1.4c2971893052fp-1</td><td></td></tr><tr><td>log2p1</td><td>0x1.a7b725780ff2cp-2</td><td></td></tr><tr><td>sinpi</td><td>-0x1.45f3e53e1d707p-7</td><td>0x0.07f16ec91c164p-1022</td></tr><tr><td>tanpi</td><td>-0x1.fae7d0ef22d4ep-2</td><td>0x1.49b79692667bp+46</td></tr><tr><td>rsqrt</td><td></td><td>0x1.00018f5913816p-458</td></tr></tbody></table>
<table><caption>Table 5: Double precision: inputs giving the largest known error in GNU libc and the Intel Math Library (bivariate functions).</caption><thead><tr><th></th><th>GNU libc 2.41</th><th>IML 2025.0.0</th></tr><tr><th>function</th><th>x, y</th><th>x, y</th></tr></thead><tbody><tr><td>atan2</td><td>0x1.ed6060626ecfp-429</td><td>0x1.b77ade79a36d5p-326</td></tr><tr><td>atan2pi</td><td>0x1.f42ebb62994dcp-426<br>-0x1.fe856e7997f8p+381</td><td>0x1 ff6a37b72b52bp-319<br>-0x1.026462f302171p-391</td></tr><tr><td>compound</td><td>0x1.90ece816f9a7cp+343</td><td>0x1.39b157b1210a4p-390<br>-0x1.0000000000001p-1</td></tr><tr><td>hypot</td><td>0x0.603e52daf0bfdp-1022<br>-0x0.a622d0a9a433bp-1022</td><td>0x0.19deaac345ffap-1022<br>0x0.92c8727c389b6p-1022</td></tr><tr><td>pow</td><td>0x1.010e2e7ee71aep+0<br>0x1.44bf0047427f6p+17</td><td>0x1.fffff9c61ce4p-1<br>0x1.c4e304ed4c734p+31</td></tr></tbody></table>

## 3.3 Other Functions

For other functions from the C standard like `ldexp`, correct rounding might at first glance seem easier to implement. However, as reported by Fred Tydeman, cutting the smallest subnormal number in half does not always return zero. We noticed that for rounding upwards, for `x = 0x1p-1074`, Newlib 4.5.0 (already reported for 4.3.0) returns 0 for `ldexp(x,-1)` instead of `x`. There is a similar issue for `ldexpf` and `ldexpl`.

# 4 Double Extended Precision

This format corresponds to the C type `long double` on x86_64 processors. Some libraries do not provide double extended precision, or do not provide mathematical functions for this format. The results are summarized in Table 12, and detailed in Tables 13-16. We see that in this format, the Intel Math library is better than all other libraries for all functions it provides, both univariate and bivariate, except for the `hypot` function.

**Notes about GNU libc.** We noticed that for extended double precision, the GNU libc can give different results on x86_64 hardware, whether it is Intel or AMD hardware. For example for `x = 0xb.1722e675ab2f4c1p-5`, expm1l yields `0xd.413ec8a7dda564ap-5` on AMD cpu, and `0xd.413ec8a7dda5648p-5` on Intel cpu.

**Notes about the Intel Math Library.** The `j0l`, `j1l`, `y0l`, and `y1l` functions call the corresponding quadruple precision function, which explains why the largest error is near 0.5 ulp in our experiments (for the `j1l`, `y0l` and `y1l` functions, we found inputs that are not correctly rounded thanks to the BaCSeL software tool).

**Notes about Newlib.** Newlib only provides long double functions for platforms where `long double` is the same as `double` (which is not the case of the x86_64 processor) with two exceptions:
<table><thead><tr><th>function</th><th>AMD LibM 5.0<br>x</th><th>Newlib 4.5.0<br>x</th></tr></thead><tbody><tr><td>acos</td><td>0x1.35b03e336a82bp-1</td><td>-0x1.0068b067c6feep-1</td></tr><tr><td>acosh</td><td>0x1.209fae707a0edp+0</td><td>0x1.0001ff6afc4bap+0</td></tr><tr><td>asin</td><td>-0x1.00d44cccfa99p-1</td><td>-0x1.004d1c5a9400bp-1</td></tr><tr><td>asinh</td><td>0x1.005ae8d126f7ep+0</td><td>-0x1.02657ff36d5f3p-2</td></tr><tr><td>atan</td><td>-0x1.60370d15396b7p-1</td><td>0x1.62ff6a1682c25p-1</td></tr><tr><td>atanh</td><td>-0x1.d8fb311a52173p-2</td><td>-0x1.f97fabc0650c4p-4</td></tr><tr><td>cbrt</td><td>0x0.7ffffffffp-1022</td><td>-0x1.00ddafe7d9deep-885</td></tr><tr><td>cos</td><td>0x1.91e60af551108p-1</td><td>-0x1.4ae182c1ab422p+21</td></tr><tr><td>cosh</td><td>0x1 ff76fb3f476d5p+0</td><td>0x1.633cc2ae1c934p+9</td></tr><tr><td>erf</td><td>0x1.11642f2eab9edp+0</td><td>-0x1.c57541b55c8ebp-16</td></tr><tr><td>erfc</td><td></td><td>0x1.5182d8799b84bp+0</td></tr><tr><td>exp</td><td>0x1.b97dc8345c55p+5</td><td>0x1.2e8f20cf3cbe7p+8</td></tr><tr><td>exp10</td><td>-0x1.285d82b75258fp+2</td><td>0x1.ce7ef793d4b0ap-2</td></tr><tr><td>exp2</td><td>0x1.ffffbff4152bafp+9</td><td>-0x1 ff95ecb4e6331p-2</td></tr><tr><td>expm1</td><td>0x1.9a57c1ec06a74p-2</td><td>0x1.62ff47a01658fp-2</td></tr><tr><td>j0</td><td></td><td>0x1.45f3067a0f4b2p+847</td></tr><tr><td>j1</td><td></td><td>0x1.45f3066f80258p+325</td></tr><tr><td>lgamma</td><td></td><td>-0x1.3a7fc9600f86cp+1</td></tr><tr><td>log</td><td>0x1.10803885617a6p+0</td><td>0x1.48ae5a67204f5p+0</td></tr><tr><td>log10</td><td>0x1.10fdf4211fd45p+0</td><td>0x1.55535a0140a21p+0</td></tr><tr><td>log1p</td><td>0x1.e0013fd35cbbp-4</td><td>-0x1.2bf1de6b04a8ap-2</td></tr><tr><td>log2</td><td>0x1.0b541b6746bd1p+0</td><td>0x1.68d778f076021p+0</td></tr><tr><td>sin</td><td>-0x1.85e624577c23ep-1</td><td>-0x1.842d8ec8f752fp+21</td></tr><tr><td>sinh</td><td>0x1.1feb2a79f307p+3</td><td>-0x1.633cae1335f26p+9</td></tr><tr><td>sqrt</td><td>0x1. fffffffffp-1</td><td>0x1. fffffffffp-1</td></tr><tr><td>tan</td><td>0x1.371a47b7e4eb2p+11</td><td>0x1.3f9605aaeb51bp+21</td></tr><tr><td>tanh</td><td>-0x1.fde5bd2769a01p-1</td><td>-0x1.e134557098e37p-3</td></tr><tr><td>tgamma</td><td></td><td>-0x1.535175475cc8dp+7</td></tr><tr><td>y0</td><td></td><td>0x1.c982eb8d417eap-1</td></tr><tr><td>y1</td><td></td><td>0x1.193bed4dff243p+1</td></tr><tr><td>cospi</td><td>-0x1. fffffffffp-28</td><td></td></tr><tr><td>sinpi</td><td>-0x1. fffffed20ca4dep-14</td><td></td></tr><tr><td>tanpi</td><td>0x1.ffffce32e4a7cp-15</td><td></td></tr></tbody></table>

<table><caption>Table 6: Double precision: inputs giving the largest known error in AMD LibM and Newlib.</caption><thead><tr><th>function</th><th>x, y</th><th>x, y</th></tr></thead><tbody><tr><td>atan2</td><td>-0x1.ec2003fe89e36p-433<br>0x1.ec173ed5fd8f5p-427</td><td>-0x1.358bb5eb25bdcp+813<br>0x1.2f86b82481a0ap+815</td></tr><tr><td>hypot</td><td>0x1.ea74e4b1da32bp+1002<br>-0x1.0a9efc37c242cp+1003</td><td>0x1.6a0a41410b1abp-1004<br>-0x0.a24afe71b539fp-1022</td></tr><tr><td>pow</td><td>0x1.3bbe002a257a7p-771<br>0x1.64bf51fe77808p+0</td><td>0x1.b44c681a51345p-822<br>0x1.3e262867f583fp-11</td></tr></tbody></table>
<table><caption>Table 7: Double precision: Apple and LLVM.</caption><thead><tr><th rowspan="2">function</th><th colspan="2">Apple 14.0</th><th colspan="2">LLVM 17.0.6</th></tr><tr><th>x</th><th>max e</th><th></th><th></th></tr></thead><tbody><tr><td>acos</td><td>-0x1.8d313198a2e03p-53</td><td>1.06</td><td></td><td></td></tr><tr><td>acosh</td><td>0x1.00007fb3703ddp+0</td><td>2.25</td><td></td><td></td></tr><tr><td>asin</td><td>0x1.eae75e3d82b6fp-2</td><td>0.709</td><td></td><td></td></tr><tr><td>asinh</td><td>-0x1.fdefd03df4cd7p-3</td><td>1.58</td><td></td><td></td></tr><tr><td>atan</td><td>0x1.01e0be37af68fp+1</td><td>0.876</td><td></td><td></td></tr><tr><td>atanh</td><td>0x1.ffa834a270fp-10</td><td>2.01</td><td></td><td></td></tr><tr><td>cbrt</td><td>0x1.fed1fe9f1122dp+11</td><td>0.729</td><td></td><td></td></tr><tr><td>cos</td><td>0x1.2f29eb4e99fa2p+7</td><td>0.948</td><td>-0x1.13a5ccd87c9bbp+1008</td><td>Inf</td></tr><tr><td>cosh</td><td>-0x1.62dabd4848dc4p-2</td><td>0.523</td><td></td><td></td></tr><tr><td>erf</td><td>-0x1.e057e7a0e494cp-2</td><td>6.41</td><td></td><td></td></tr><tr><td>erfc</td><td>0x1.bba14dc3507ccp+1</td><td>10.7</td><td></td><td></td></tr><tr><td>exp</td><td>-0x1.4133f4fd79c1cp-13</td><td>0.521</td><td></td><td></td></tr><tr><td>exp10</td><td>-0x1.c37443e446523p-16</td><td>0.521</td><td></td><td></td></tr><tr><td>exp2</td><td>-0x1.b3d9b47ad1b2fp-13</td><td>0.521</td><td></td><td></td></tr><tr><td>expm1</td><td>0x1.e7f93188565ecp-5</td><td>0.706</td><td></td><td></td></tr><tr><td>j0</td><td>0x1.6148f5b2c2e45p+2</td><td>3.83e14</td><td></td><td></td></tr><tr><td>j1</td><td>-0x1.ea75575af6f09p+1</td><td>1.10e15</td><td></td><td></td></tr><tr><td>lgamma</td><td>-0x1.bffcbf76b86fp+2</td><td>2.33e16</td><td></td><td></td></tr><tr><td>log</td><td>0x1.490af72a25a81p-1</td><td>0.508</td><td>0x1.5b6e7e4e96f86p+2</td><td>0.500</td></tr><tr><td>log10</td><td>0x1.2501ee5628b08p-1</td><td>0.514</td><td>0x1.e12d66744ff81p+429</td><td>0.500</td></tr><tr><td>log1p</td><td>-0x1.fffff3fffffdp-28</td><td>0.667</td><td>0x1p-53</td><td>0.500</td></tr><tr><td>log2</td><td>0x1.6b015f8d9a784p-1</td><td>0.515</td><td>0x1.b4ebe40c95a01p+0</td><td>0.500</td></tr><tr><td>sin</td><td>-0x1.07e4c92b5349dp+4</td><td>0.944</td><td>-0x1.13a5ccd87c9bbp+1008</td><td>Inf</td></tr><tr><td>sinh</td><td>0x1.d7131e11fc6b3p-2</td><td>0.539</td><td></td><td></td></tr><tr><td>sqrt</td><td>0x1.fffffffffffp-1</td><td>0.500</td><td>0x1.fffffffffffp-1</td><td>0.500</td></tr><tr><td>tan</td><td>-0x1.a81d98fc58537p+6</td><td>3.53</td><td>-0x1.13a5ccd87c9bbp+1008</td><td>Inf</td></tr><tr><td>tanh</td><td>0x1.00cf9f273d84p+1</td><td>0.613</td><td></td><td></td></tr><tr><td>tgamma</td><td>-0x1.5456e56919a19p+7</td><td>1.03e3</td><td></td><td></td></tr><tr><td>y0</td><td>0x1.c982eb8d417eap-1</td><td>1.42e15</td><td></td><td></td></tr><tr><td>y1</td><td>0x1.193bed4dff243p+1</td><td>5.56e15</td><td></td><td></td></tr><tr><td>atan2</td><td>-0x1.6a539153430d8p-416</td><td>0.747</td><td></td><td></td></tr><tr><td>hypot</td><td>0x1.6a0a41410b1abp-1004</td><td>1.21</td><td>0x1.a308e1455f447p+0</td><td>0.500</td></tr><tr><td>pow</td><td>-0x1.4495fce36a73ep-1023</td><td></td><td>0x1.9d931a83ef879p+0</td><td></td></tr><tr><td></td><td>0x1.111616f835fb1p-72</td><td>0.757</td><td></td><td></td></tr><tr><td></td><td>0x1.c6cfa07925d49p+3</td><td></td><td></td><td></td></tr></tbody></table>
<table><caption>Table 8: Double precision: Microsoft and FreeBSD Math Libraries.</caption><thead><tr><th rowspan="2">function</th><th colspan="2">MSVC 2022</th><th colspan="2">FreeBSD 14.0</th></tr><tr><th>x</th><th>max e</th><th>x</th><th>max e</th></tr></thead><tbody><tr><td>acos</td><td>-0x1.010fd0ad6aa41p-1</td><td>0.934</td><td>-0x1.0068b067c6feep-1</td><td>0.930</td></tr><tr><td>acosh</td><td>0x1.0007fd4307b75p+0</td><td>3.22</td><td>0x1.0001ff6afc4bap+0</td><td>2.25</td></tr><tr><td>asin</td><td>-0x1.0239000439deep-1</td><td>1.05</td><td>-0x1.004d1c5a9400bp-1</td><td>0.981</td></tr><tr><td>asinh</td><td>-0x1.00212bb59c31ep-4</td><td>2.05</td><td>-0x1.02657ff36d5f3p-2</td><td>1.92</td></tr><tr><td>atan</td><td>-0x1.60370d15396b7p-1</td><td>0.863</td><td>0x1.62ff6a1682c25p-1</td><td>0.861</td></tr><tr><td>atanh</td><td>-0x1 ffbe8dd88527fp-9</td><td>2.50</td><td>-0x1.f97fabc0650c4p-4</td><td>1.81</td></tr><tr><td>cbrt</td><td>-0x1.55cd285f321f6p-64</td><td>1.86</td><td>-0x1.13a5ccd87c9bbp+1008</td><td>0.668</td></tr><tr><td>cos</td><td>-0x1.9200634d4471fp-1</td><td>0.897</td><td>-0x1.34e729fd08086p+21</td><td>0.834</td></tr><tr><td>cosh</td><td>-0x1.1ff088806d82ep+3</td><td>1.91</td><td>-0x1.6310ab92794a8p+9</td><td>1.47</td></tr><tr><td>erf</td><td>0x1.755dca4d8b458p+0</td><td>4.62</td><td>-0x1.c57541b55c8ebp-16</td><td>1.02</td></tr><tr><td>erfc</td><td>0x1.f6094003e85d6p+1</td><td>8.46</td><td>0x1.5182d8799b84bp+0</td><td>4.08</td></tr><tr><td>exp</td><td>-0x1.74046dfefd9d1p+9</td><td>1.50</td><td>0x1.2e8f20cf3cbe7p+8</td><td>0.949</td></tr><tr><td>exp10</td><td></td><td></td><td></td><td></td></tr><tr><td>exp2</td><td>-0x1.72286b6f94510p-2</td><td>2.23</td><td>-0x1 ff1eb5acee46bp+9</td><td>0.751</td></tr><tr><td>expm1</td><td>-0x1.62d7c116d2e32p-1</td><td>3.06</td><td>0x1.62ff47a01658fp-2</td><td>0.909</td></tr><tr><td>j0</td><td>0x1.bbbd6a9201265p+657</td><td>1.88e26</td><td>0x1.33d152e971b4p+1</td><td>4.51e14</td></tr><tr><td>j1</td><td>0x1.a635d8219ad13p+157</td><td>3.85e26</td><td>-0x1.ea75575af6f09p+1</td><td>1.10e15</td></tr><tr><td>lgamma</td><td>-0x1.bffe071eea741p+2</td><td>5.10e13</td><td>-0x1.3a7fc9600f86cp+1</td><td>4.45e15</td></tr><tr><td>log</td><td>0x1.0ffc349469a2fp+0</td><td>0.577</td><td>0x1.48ae5a67204f5p+0</td><td>0.946</td></tr><tr><td>log10</td><td>0x1.e005e1e891807p-1</td><td>0.633</td><td>0x1.553e1cb579ee9p+0</td><td>0.814</td></tr><tr><td>log1p</td><td>-0x1.8000000000000p-53</td><td>1.44</td><td>-0x1.2bf1de6b04a8ap-2</td><td>0.896</td></tr><tr><td>log2</td><td>0x1.160732376ad7fp+0</td><td>0.812</td><td>0x1.67eaf07ce24d1p+0</td><td>0.921</td></tr><tr><td>sin</td><td>-0x1.11b624b546894p+9</td><td>0.799</td><td>0x1.4d84db080b9fdp+21</td><td>0.831</td></tr><tr><td>sinh</td><td>-0x1.aff899f6fcad6p+4</td><td>1.51</td><td>-0x1.63324af2fb5b7p-1</td><td>1.88</td></tr><tr><td>sqrt</td><td>0x1. ffffffff ffp-1</td><td>0.500</td><td>0x1. ffffffff ffp-1</td><td>0.500</td></tr><tr><td>tan</td><td>-0x1.4d7c8b8320237p+11</td><td>1.32</td><td>0x1.3f9605aaeb51bp+21</td><td>1.02</td></tr><tr><td>tanh</td><td>-0x1. fb52ec8460d82p-1</td><td>1.44</td><td>-0x1.e134557098e37p-3</td><td>2.22</td></tr><tr><td>tgamma</td><td>-0x1.5c000000003c15p+7</td><td>9.01e15</td><td>-0x1.547cf4c565e95p+7</td><td>1.03e3</td></tr><tr><td>y0</td><td>0x1.c1d741dc52512p+744</td><td>3.30e25</td><td>0x1.c982eb8d417eap-1</td><td>1.42e15</td></tr><tr><td>y1</td><td>+0</td><td>Inf</td><td>0x1.193bed4dff243p+1</td><td>5.56e15</td></tr><tr><td>cospi</td><td></td><td></td><td>-0x1.fac17dd80508ap-3</td><td>0.807</td></tr><tr><td>sinpi</td><td></td><td></td><td>0x1.0806840ac80ap+3</td><td>0.811</td></tr><tr><td>tanpi</td><td></td><td></td><td>0x1.92a4f0fe872bp-1</td><td>0.966</td></tr><tr><td>atan2</td><td>-0x1.f1037a6756bfep-881</td><td>0.750</td><td>-0x1.358bb5eb25bdcp+813</td><td>1.55</td></tr><tr><td></td><td>0x1.959f99be632e6p+142</td><td></td><td>0x1.2f86b82481a0ap+815</td><td></td></tr><tr><td>hypot</td><td>-0x1.6a5a0ce661358p+890</td><td>1.22</td><td>0x1.6a0a41410b1abp-1004</td><td>1.21</td></tr><tr><td></td><td>-0x1.0151c108425b1p+890</td><td></td><td>-0x1.4495fce36a73ep-1023</td><td></td></tr><tr><td></td><td>0x1. ffffffff c61ce40p-1</td><td>91.3</td><td>0x1.000002c5e2e99p+0</td><td></td></tr><tr><td>pow</td><td>0x1.c4e304ed4c734p+31</td><td></td><td>0x1.c9eee35374af6p+31</td><td>636.</td></tr></tbody></table>
<table><thead><tr><th>function</th><th>Apple 15.1.1<br>x</th><th>LLVM 19.1.7<br>x</th></tr></thead><tbody><tr><td>acos</td><td>-0x1.8d313198a2e03p-53</td><td></td></tr><tr><td>acos</td><td>0x1.00007fb3703ddp+0</td><td></td></tr><tr><td>asin</td><td>0x1.eae75e3d82b6fp-2</td><td></td></tr><tr><td>asinh</td><td>-0x1.fdefd03df4cd7p-3</td><td></td></tr><tr><td>atan</td><td>0x1.01e0be37af68fp+1</td><td></td></tr><tr><td>atanh</td><td>0x1.1fd834a270fp-10</td><td></td></tr><tr><td>cbrt</td><td>0x1.fed1fe9f1122dp+11</td><td></td></tr><tr><td>cos</td><td>0x1.2f29eb4e99fa2p+7</td><td>-0x1.13a5ccd87c9bbp+1008</td></tr><tr><td>cosh</td><td>-0x1.62dabd4848dc4p-2</td><td></td></tr><tr><td>erf</td><td>-0x1.e057e7a0e494cp-2</td><td></td></tr><tr><td>erfc</td><td>0x1.bba14dc3507ccp+1</td><td></td></tr><tr><td>exp</td><td>-0x1.4133f4fd79c1cp-13</td><td>0x1p-53</td></tr><tr><td>exp10</td><td>-0x1.c37443e446523p-16</td><td>0x1.bcb7b1526e50dp-55</td></tr><tr><td>exp2</td><td>-0x1.b3d9b47ad1b2fp-13</td><td>0x1.71547652b82fep-53</td></tr><tr><td>expm1</td><td>0x1.e7f93188565ecp-5</td><td>0x1p-52</td></tr><tr><td>j0</td><td>0x1.6148f5b2c2e45p+2</td><td></td></tr><tr><td>j1</td><td>-0x1.ea75575af6f09p+1</td><td></td></tr><tr><td>lgamma</td><td>-0x1.bffcbf76b86fp+2</td><td></td></tr><tr><td>log</td><td>0x1.490af72a25a81p-1</td><td>0x1.5b6e7e4e96f86p+2</td></tr><tr><td>log10</td><td>0x1.2501ee5628b08p-1</td><td>0x1.e12d66744ff81p+429</td></tr><tr><td>log1p</td><td>-0x1.ffffff3ffffffdp-28</td><td>0x1p-53</td></tr><tr><td>log2</td><td>0x1.6b015f8d9a784p-1</td><td>0x1.b4ebe40c95a01p+0</td></tr><tr><td>sin</td><td>-0x1.07e4c92b5349dp+4</td><td>-0x1.13a5ccd87c9bbp+1008</td></tr><tr><td>sinh</td><td>0x1.d7131e11fc6b3p-2</td><td></td></tr><tr><td>sqrt</td><td>0x1.ffffffffffffff-1</td><td>0x1.fffffffбит-1</td></tr><tr><td>tan</td><td>-0x1.a81d98fc58537p+6</td><td>-0x1.13a5ccd87c9bbp+1008</td></tr><tr><td>tanh</td><td>0x1.00cf9f273d84p+1</td><td></td></tr><tr><td>tgamma</td><td>-0x1.5456e56919a19p+7</td><td></td></tr><tr><td>y0</td><td>0x1.c982eb8d417eap-1</td><td></td></tr><tr><td>y1</td><td>0x1.193bed4dff243p+1</td><td></td></tr></tbody></table>

<table><caption>Table 8: Double precision: inputs giving the largest known error in the Apple and LLVM Math Libraries.</caption><thead><tr><th>function</th><th>x, y</th><th>x, y</th></tr></thead><tbody><tr><td>atan2</td><td>-0x1.6a539153430d8p-416<br>0x1.d2b5b9dc716d8p-415</td><td></td></tr><tr><td>hypot</td><td>0x1.6a0a41410b1abp-1004<br>-0x1.4495fce36a73ep-1023</td><td>0x1.a308e1455f447p+0<br>0x1.9d931a83ef879p+0</td></tr><tr><td>pow</td><td>0x1.111616f835fb1p-72<br>0x1.c6cfa07925d49p+3</td><td></td></tr></tbody></table>
<table><caption>Table 9: Double precision: ArmPL.</caption><thead><tr><th rowspan="2">function</th><th colspan="2">ArmPL 23.10</th></tr><tr><th>x</th><th>max e</th></tr></thead><tbody><tr><td>acos</td><td>0x1.251869c3f7881p-1</td><td>1.52</td></tr><tr><td>acosh</td><td>0x1.071334daf83adp+0</td><td>2.66</td></tr><tr><td>asin</td><td>0x1.0479b37d95e5cp-1</td><td>2.69</td></tr><tr><td>asinh</td><td>-0x1.000eeed78380ap+0</td><td>2.04</td></tr><tr><td>atan</td><td>0x1.032b4811f3dc5p+0</td><td>2.24</td></tr><tr><td>atanh</td><td>-0x1.e7c1f36602014p-4</td><td>3.00</td></tr><tr><td>cbrt</td><td>0x1.ffffb101d89c1dp-332</td><td>1.79</td></tr><tr><td>cosh</td><td>-0x1.628af341989dap+9</td><td>1.93</td></tr><tr><td>erf</td><td>-0x1.000064955abdcp-8</td><td>2.29</td></tr><tr><td>erfc</td><td>0x1.46cffdf330b13p+4</td><td>1.71</td></tr><tr><td>exp</td><td>-0x1.49f33ad2c1c58p+9</td><td>0.511</td></tr><tr><td>exp2</td><td>-0x1.f7087fb1cf9e8p+9</td><td>0.509</td></tr><tr><td>expm1</td><td>0x1.633f993a730c9p-2</td><td>2.18</td></tr><tr><td>log</td><td>0x1.1211bef8f68e9p+0</td><td>0.520</td></tr><tr><td>log10</td><td>0x1.de02157073b31p-1</td><td>1.62</td></tr><tr><td>log1p</td><td>-0x1.2e496d25897ecp-2</td><td>1.74</td></tr><tr><td>log2</td><td>0x1.0b53f741fb8c4p+0</td><td>0.554</td></tr><tr><td>sinh</td><td>0x1.9fcba01feb507p-2</td><td>2.58</td></tr><tr><td>tanh</td><td>-0x1.c41e527b70f43p-3</td><td>2.76</td></tr><tr><td>atan2</td><td>0x1.9173ea8221453p+842</td><td>2.23</td></tr><tr><td>pow</td><td>0x1.8c6f1b4b72f3ap+842</td><td>0.523</td></tr><tr><td></td><td>0x1.010e2e7ee71aep+0</td><td></td></tr><tr><td></td><td>0x1.44bf0047427f6p+17</td><td></td></tr></tbody></table>
<table><caption>Table 10: Double precision: CUDA and ROCm.</caption><thead><tr><th rowspan="2">function</th><th colspan="2">CUDA 12.2.1</th><th colspan="2">ROCm 5.7.0</th></tr><tr><th>x</th><th>max e</th><th>x</th><th>max e</th></tr></thead><tbody><tr><td>acos</td><td>0x1.266637a3d2bbcp-1</td><td>1.53</td><td>-0x1.36b1482765f6dp-1</td><td>0.772</td></tr><tr><td>acosh</td><td>0x1.1d7bc19163966p+0</td><td>2.52</td><td>0x1.0aaab62cc290dp+0</td><td>0.661</td></tr><tr><td>asin</td><td>-0x1.2ef2481799c7cp-1</td><td>1.99</td><td>0x1.df27e1c764802p-2</td><td>0.710</td></tr><tr><td>asinh</td><td>0x1.0ab3fc30267c2p-1</td><td>2.57</td><td>0x1.2aae7abf26ce3p-2</td><td>0.661</td></tr><tr><td>atan</td><td>0x1.52184b1b9bd9bp+0</td><td>1.77</td><td>-0x1.0684fa9fa7481p+0</td><td>1.73</td></tr><tr><td>atanh</td><td>-0x1.f586714622a66p-3</td><td>2.50</td><td>-0x1.2493fecd07e5p-3</td><td>0.664</td></tr><tr><td>cbrt</td><td>-0x1.588a24f9a953fp+535</td><td>0.501</td><td>0x1.1e0ef6faa076p+175</td><td>0.501</td></tr><tr><td>cos</td><td>0x1.25133ca3904dfp+20</td><td>1.52</td><td>0x1.2a33ae49ab15dp+1</td><td>0.797</td></tr><tr><td>cosh</td><td>0x1.e7ffe229fe99ep+1</td><td>1.40</td><td>-0x1.e7fa36b6eb43p+1</td><td>0.563</td></tr><tr><td>erf</td><td>0x1.340ff534d52bfp-2</td><td>1.50</td><td>-0x1.10c4c3d3b6cdbp+0</td><td>1.12</td></tr><tr><td>erfc</td><td>0x1.8659a03b35abcp-7</td><td>4.51</td><td>0x1.f1193828dcc1ep-19</td><td>4.08</td></tr><tr><td>exp</td><td>-0x1.625f1b359729ep+9</td><td>0.928</td><td>-0x1.625f1c27780c8p+9</td><td>0.929</td></tr><tr><td>exp10</td><td>-0x1.a7d980016dc5ap+0</td><td>1.11</td><td>0x1.5c1ece7fe4bep+0</td><td>1.11</td></tr><tr><td>exp2</td><td>-0x1 ff40169bd093bp+9</td><td>0.948</td><td>-0x1 ff3ffea62d3d7p+9</td><td>0.947</td></tr><tr><td>expm1</td><td>0x1.a0e95d59498e9p-2</td><td>1.18</td><td>0x1.632cfb1033275p-2</td><td>1.91</td></tr><tr><td>j0</td><td>-0x1.0e126bbcb3e65p+25</td><td>3.08e20</td><td>0x1.ddca13ef271d2p+3</td><td>1.25e13</td></tr><tr><td>j1</td><td>-0x1.635ab5a8baf45p+26</td><td>1.73e21</td><td>0x1.aa5baf310e5a2p+3</td><td>4.80e13</td></tr><tr><td>lgamma</td><td>-0x1.fa471547c2fe5p+1</td><td>5.11e15</td><td>-0x1.3a7fc9600f86cp+1</td><td>4.45e15</td></tr><tr><td>log</td><td>0x1.69e7aa6da2df5p-1</td><td>0.564</td><td>0x1.5556123e8a2bp-1</td><td>0.663</td></tr><tr><td>log10</td><td>0x1.803dea263187fp-1</td><td>1.43</td><td>0x1.55558196a2cbp+0</td><td>0.785</td></tr><tr><td>log1p</td><td>-0x1.fffffbaefe27p-2</td><td>1.50</td><td>-0x1.5efad5491a79bp-1022</td><td>1.00</td></tr><tr><td>log2</td><td>0x1.670c5aa6680abp+0</td><td>1.31</td><td>0x1.5556d5fbb94cbp+0</td><td>0.734</td></tr><tr><td>sin</td><td>-0x1.1c49ad613ff3bp+19</td><td>1.52</td><td>-0x1.f05e952d81b89p+5</td><td>0.800</td></tr><tr><td>sinh</td><td>0x1.be64384e3ac1ep+0</td><td>1.51</td><td>-0x1 ff9faf9b69235p-5</td><td>0.868</td></tr><tr><td>sqrt</td><td>0x1.fffffffffffp-1</td><td>0.500</td><td>0x1. ffffffff ffp-1</td><td>0.500</td></tr><tr><td>tan</td><td>0x1.da7a85a88bbecp+11</td><td>2.09</td><td>-0x1.66af736e8555p+18</td><td>1.30</td></tr><tr><td>tanh</td><td>-0x1.19398a9a24319p-1</td><td>1.48</td><td>0x1.00433533940cdp-4</td><td>0.866</td></tr><tr><td>tgamma</td><td>-0x1.2baa17692a3f2p+7</td><td>10.1</td><td>-0x1.201a11d80c13dp+2</td><td>13.7</td></tr><tr><td>y0</td><td>0x1.16bad92479879p+25</td><td>1.18e21</td><td>0x1.ab8e1c4a1e74ap+3</td><td>1.95e13</td></tr><tr><td>y1</td><td>0x1.2391e4c8faa6p+26</td><td>1.17e21</td><td>0x1.e9e480605283cp+4</td><td>6.14e13</td></tr><tr><td>cospi</td><td>-0x1.ae7b6f6da3747p-2</td><td>1.52</td><td>-0x1.7e00a005862afp+5</td><td>0.894</td></tr><tr><td>sinpi</td><td>-0x1.4778e04770c45p-4</td><td>1.52</td><td>-0x1.eff4d839e0c49p+2</td><td>0.890</td></tr><tr><td>rsqrt</td><td>0x1.f80d8004b3ae9p+479</td><td>0.510</td><td>0x1.0000000000002p+484</td><td>1.00</td></tr><tr><td>atan2</td><td>0x1.9cde4ff190e45p+931</td><td>1.76</td><td>0x1.401ec07d65549p+888</td><td>1.82</td></tr><tr><td>hypot</td><td>0x1.37d91467e558bp+931</td><td></td><td>0x1.3c3976605bb0cp+888</td><td></td></tr><tr><td>pow</td><td>-0x1.41fcfeeb2e246p+420</td><td>1.89</td><td>0x1.afa7134ad6d8p-403</td><td>1.21</td></tr><tr><td></td><td>-0x1.8d4d41eacdeccp+420</td><td></td><td>0x1.6a0ff6e086067p-384</td><td></td></tr><tr><td></td><td>0x1.6b2d4fdb85ba1p-1</td><td>1.84</td><td>0x1.17efb14831458p-421</td><td>1.40</td></tr><tr><td></td><td>-0x1.f0d1d713b0262p+10</td><td></td><td>0x1.f8c34d6504b2p-7</td><td></td></tr></tbody></table>
<table><caption>Table 10: Double precision: inputs giving the largest known error in the Arm Performance Library.</caption><thead><tr><th>function</th><th>ArmPL 24.04<br>x</th></tr></thead><tbody><tr><td>acos</td><td>0x1.251869c3f7881p-1</td></tr><tr><td>acosh</td><td>0x1.071334daf83adp+0</td></tr><tr><td>asin</td><td>0x1.0479b37d95e5cp-1</td></tr><tr><td>asinh</td><td>-0x1.000eeed78380ap+0</td></tr><tr><td>atan</td><td>0x1.032b4811f3dc5p+0</td></tr><tr><td>atanh</td><td>-0x1.e7c1f36602014p-4</td></tr><tr><td>cbrt</td><td>0x1.fffad1cec59fep-332</td></tr><tr><td>cosh</td><td>-0x1.628af341989dap+9</td></tr><tr><td>erf</td><td>0x1.0000187085e56p-8</td></tr><tr><td>erfc</td><td>0x1.46cffdf330b13p+4</td></tr><tr><td>exp</td><td>-0x1.49f33ad2c1c58p+9</td></tr><tr><td>exp10</td><td>-0x1.5acf96f42165bp-7</td></tr><tr><td>exp2</td><td>-0x1.f7087fb1cf9e8p+9</td></tr><tr><td>expm1</td><td>0x1.633f993a730c9p-2</td></tr><tr><td>log</td><td>0x1.1211bef8f68e9p+0</td></tr><tr><td>log10</td><td>0x1.de02157073b31p-1</td></tr><tr><td>log1p</td><td>-0x1.2e496d25897ecp-2</td></tr><tr><td>log2</td><td>0x1.0b53f741fb8c4p+0</td></tr><tr><td>sinh</td><td>0x1.9fa32b1149d35p-2</td></tr><tr><td>tanh</td><td>-0x1.c416448380debp-3</td></tr><tr><td>cospi</td><td>0x1.5a33cc258p-22</td></tr><tr><td>sinpi</td><td>0x1.ffffe4b85e77ap-2</td></tr></tbody></table><table><thead><tr><th>function</th><th>x, y</th></tr></thead><tbody><tr><td>atan2</td><td>0x1.d5de7a294d493p-935<br>0x1.d030d7b608be1p-935</td></tr><tr><td>pow</td><td>0x1.010e2e7ee71aep+0<br>0x1.44bf0047427f6p+17</td></tr></tbody></table>
Intel Math library is better than all other libraries for all functions, both univariate and bivariate, except for the `log2`, `tgamma` and `hypot` functions.

For the Intel Math Library, the `j0`, `j1`, `y0`, and `y1` functions call the corresponding quadruple precision function, which explains why the largest error is near 0.5 ulp in our experiments (for the `j1`, `y0` and `y1` functions, we found inputs that are not correctly rounded thanks to the BaCSeL software tool). For `x=-0x4.179563a9af206c1p+60l` which is a negative integer, `tgamma` from the Intel Math Library returns -0 instead of NaN.

Newlib only provides long double functions for platforms where `long double` is the same as `double` (which is not the case of the x86_64 processor) with two exceptions: `sqrt` and `hypot`. However, in Newlib 4.4.0, the `hypotl` function does not work properly: for `x ≥ 2<sup>8192</sup>`, the call `hypotl(x,0)` gives infinity.

In OpenLibm, the `powl` function does not seem to be thread-safe, and the `tgammal` function yields `+Inf` for `x=-0x6.db747ae147ae148p+8l` instead of `0x0.01dbd551da54538p-16385l`.

For `x=-0x6.e2368c0ed74e5698p+16l`, `Musl acoshl` yields `-0x4.b4d6a621e8e631f8p+0l` instead of NaN. For `x=0x2.68826a13ef3fde64p+16376l`, `Musl exp10l` yields NaN instead of `+∞`. These two issues were already in Musl 1.2.2 at least, but were only detected by our program in 1.2.4.

The Apple Darwin ABI for ARM processors maps the C long double type to double, thus there is no real "double extended" format. The same holds for the Microsoft math library.

The LLVM-libc library only implements the square root function in double-extended precision, and for this function we could not find any error larger than 0.5 ulp (for rounding to nearest). Since a single function is implemented, we don't mention LLVM-libc in Tables 11-14.

The FreeBSD extended double power function is not thread safe (like the OpenLibm one), and for `x=-0x6.e000000000000008p+8l` which is very near a negative integer, the FreeBSD `tgammal` function yields -0 instead of `-0x4.b40cdf839d0bbp-16392l`.

# 5 Quadruple Precision

Only the GNU libc and the Intel Math Library support quadruple precision, through the `_Float128` type in GNU libc, and `_Quad` in the Intel Math Library (using the option of the Intel C compiler `-Option,cpp,--extended_float_types`). The results are summarized in Table 15, and detailed in Table 16. Only the square root function is correctly rounded (or at least seems to be). The Intel Math Library gives better results than the GNU libc for all functions, except for `lgamma` and `tgamma`. Apart from these two functions, and from the Bessel functions `j0`, `j1`, `y0`, `y1`, the observed error for the Intel Math Library is at most 1.4 ulps. The GNU libc has large errors for `j0`, `j1`, `y0` and `y1`.

**Acknowledgements.** The authors thank Claude-Pierre Jeannerod, Vincent Lefèvre and Terje Mathisen who helped improving that article, Alexei Sibidanov who helped compiling Newlib, Eric Schneider, Nick Timmons, Hugues de Lassus and Fred J. Tydeman for interesting discussions. Joseph Myers suggested to included the double extended format. Experiments presented in this article were carried out using the Grid'5000 testbed, supported by a scientific interest group hosted by Inria and including CNRS, RENATER and several Universities as well as other organizations (see https://www.grid5000.fr). This work was also supported by the French "Ministère de l'Enseignement Supérieur et de la Recherche", by the "Conseil Régional de Lorraine", and by the
<table><thead><tr><th>function</th><th>CUDA 12.8<br>x</th><th>ROCm 6.2.4<br>x</th></tr></thead><tbody><tr><td>acos</td><td>0x1.266637a3d2bbcp-1</td><td>-0x1.36b1482765f6dp-1</td></tr><tr><td>acosh</td><td>0x1.1d7bc19163966p+0</td><td>0x1.0aaade11e199ap+0</td></tr><tr><td>asin</td><td>-0x1.2ef2481799c7cp-1</td><td>0x1.df27e1c764802p-2</td></tr><tr><td>asinh</td><td>0x1.0ab3fc30267c2p-1</td><td>0x1.2aae7abf26ce3p-2</td></tr><tr><td>atan</td><td>0x1.52184b1b9bd9bp+0</td><td>-0x1.0684fa9fa7481p+0</td></tr><tr><td>atanh</td><td>-0x1.f586714622a66p-3</td><td>-0x1.2493fecd07e5p-3</td></tr><tr><td>cbrt</td><td>-0x1.588a24f7a97d3p+535</td><td>0x1.1e0ef6faa076p+175</td></tr><tr><td>cos</td><td>0x1.25133ca3904dfp+20</td><td>0x1.2a33ae1a620b1p+1</td></tr><tr><td>cosh</td><td>0x1.e7ffe229fe99ep+1</td><td>-0x1.e7fa36b6eb43p+1</td></tr><tr><td>erf</td><td>0x1.340ff534d52bfp-2</td><td>-0x1.10c4c3d3b6cdbp+0</td></tr><tr><td>erfc</td><td>0x1.8659a03b35abcp-7</td><td>0x1.f27ea468cbe91p-19</td></tr><tr><td>exp</td><td>-0x1.625f1b359729ep+9</td><td>-0x1.625f1c27780c8p+9</td></tr><tr><td>exp10</td><td>-0x1.a7d980016dc5ap+0</td><td>0x1.5c1ece7fe4bep+0</td></tr><tr><td>exp2</td><td>-0x1 ff40169bd093bp+9</td><td>-0x1 ff3e3278714d8p+9</td></tr><tr><td>expm1</td><td>0x1.a0e95d59498e9p-2</td><td>0x1.632cfb1033275p-2</td></tr><tr><td>j0</td><td>-0x1.0e126bbcb3e65p+25</td><td>0x1.ddca13ef271d2p+3</td></tr><tr><td>j1</td><td>-0x1.635ab5a8baf45p+26</td><td>0x1.aa5baf310e5a2p+3</td></tr><tr><td>lgamma</td><td>-0x1.fa471547c2fe5p+1</td><td>-0x1.3a7fc9600f86cp+1</td></tr><tr><td>log</td><td>0x1.69e7aa6da2df5p-1</td><td>0x1.5556123e8a2bp-1</td></tr><tr><td>log10</td><td>0x1.803dea263187fp-1</td><td>0x1.55558196a2cbp+0</td></tr><tr><td>log1p</td><td>-0x1.fffffbaefe27p-2</td><td>-0x1.5efad5491a79bp-1022</td></tr><tr><td>log2</td><td>0x1.670c5aa6680abp+0</td><td>0x1.55562d11c546fp+0</td></tr><tr><td>sin</td><td>-0x1.1c49ad613ff3bp+19</td><td>-0x1.f05e952d81b89p+5</td></tr><tr><td>sinh</td><td>0x1.be64384e3ac1ep+0</td><td>-0x1 ff9faf9b69235p-5</td></tr><tr><td>sqrt</td><td>0x1.fffffffffffp-1</td><td>0x1. ffffffff ffp-1</td></tr><tr><td>tan</td><td>0x1.da7a85a88bbecp+11</td><td>-0x1.66af736e8555p+18</td></tr><tr><td>tanh</td><td>-0x1.19398a9a24319p-1</td><td>0x1.00433533940cdp-4</td></tr><tr><td>tgamma</td><td>-0x1.2baa17692a3f2p+7</td><td>-0x1.201a11d80c13dp+2</td></tr><tr><td>y0</td><td>0x1.16bad92479879p+25</td><td>0x1.ab8e1c4a1e74ap+3</td></tr><tr><td>y1</td><td>0x1.2391e4c8faa6p+26</td><td>0x1.e9e480605283cp+4</td></tr><tr><td>cospi</td><td>-0x1.ae7b6f6da3747p-2</td><td>-0x1. ffb154d307aa1p-3</td></tr><tr><td>sinpi</td><td>-0x1.4778e04770c45p-4</td><td>0x1.0092557af9571p-2</td></tr><tr><td>rsqrt</td><td>0x1.f81ab000eb7d9p+479</td><td>0x1.0000000000002p+484</td></tr></tbody></table>

<table><caption>Table 11: Double precision: inputs giving the largest known error in CUDA and ROCm.</caption><thead><tr><th>function</th><th>x, y</th><th>x, y</th></tr></thead><tbody><tr><td>atan2</td><td>0x1.9cde4ff190e45p+931<br>0x1.37d91467e558bp+931</td><td>0x1.401ec07d65549p+888<br>0x1.3c3976605bb0cp+888</td></tr><tr><td>hypot</td><td>-0x1.41fcfeeb2e246p+420<br>-0x1.8d4d41eacdeccp+420</td><td>0x1.afa7134ad6d8p-403<br>0x1.6a0ff6e086067p-384</td></tr><tr><td>pow</td><td>0x1.6b2d4fdb85ba1p-1<br>-0x1.f0d1d713b0262p+10</td><td>0x1.17efb14831458p-421<br>0x1.f8c34d6504b2p-7</td></tr></tbody></table>
<table><caption>Table 11: Double extended precision: Largest known error.</caption><thead><tr><th>library version</th><th>GNU libc 2.39</th><th>Intel Math Library IML 2024.0.2</th><th>OpenLibm 0.8.1</th><th>Musl 1.2.4</th><th>FreeBSD 14.0</th></tr></thead><tbody><tr><td>acos</td><td>1.75</td><td><strong>0.505</strong></td><td>0.938</td><td>1.75</td><td>0.938</td></tr><tr><td>acosh</td><td>2.99</td><td><strong>0.502</strong></td><td>3.14</td><td>Inf</td><td>2.24</td></tr><tr><td>asin</td><td>1.15</td><td><strong>0.506</strong></td><td>1.03</td><td>2.00</td><td>1.03</td></tr><tr><td>asinh</td><td>2.96</td><td><strong>0.506</strong></td><td>3.19</td><td>2.96</td><td>1.63</td></tr><tr><td>atan</td><td>0.640</td><td><strong>0.501</strong></td><td>1.10</td><td>0.640</td><td>1.10</td></tr><tr><td>atanh</td><td>2.88</td><td><strong>0.501</strong></td><td>85.4</td><td>3.19</td><td>1.52</td></tr><tr><td>cbrt</td><td>0.824</td><td><strong>0.503</strong></td><td>0.890</td><td>0.890</td><td>0.890</td></tr><tr><td>cos</td><td>1.51</td><td><strong>0.502</strong></td><td>0.799</td><td>0.799</td><td>0.799</td></tr><tr><td>cosh</td><td>3.40</td><td><strong>0.502</strong></td><td>4.86</td><td>3.73</td><td>0.936</td></tr><tr><td>erf</td><td>1.17</td><td><strong>0.518</strong></td><td>1.17</td><td>1.17</td><td>0.992</td></tr><tr><td>erfc</td><td>4.73</td><td><strong>0.527</strong></td><td>5.77</td><td>5.12</td><td>1.38e8</td></tr><tr><td>exp</td><td>1.27</td><td><strong>0.501</strong></td><td>2.00</td><td>1.54</td><td>0.752</td></tr><tr><td>exp10</td><td>1.50</td><td><strong>0.501</strong></td><td></td><td>Inf</td><td></td></tr><tr><td>exp2</td><td>0.788</td><td><strong>0.501</strong></td><td>2.18</td><td>0.788</td><td>0.753</td></tr><tr><td>expm1</td><td>3.08</td><td><strong>0.502</strong></td><td>1.94</td><td>9.71e3</td><td>0.517</td></tr><tr><td>j0</td><td>9.79e17</td><td><strong>0.501</strong></td><td></td><td></td><td></td></tr><tr><td>j1</td><td>3.38e18</td><td><strong>0.501</strong></td><td></td><td></td><td></td></tr><tr><td>lgamma</td><td>12.2</td><td><strong>0.549</strong></td><td>9.08e19</td><td>9.08e19</td><td>1.65e20</td></tr><tr><td>log</td><td>0.998</td><td><strong>0.501</strong></td><td>1.22</td><td>0.998</td><td>0.512</td></tr><tr><td>log10</td><td>1.36</td><td><strong>0.502</strong></td><td>1.22</td><td>1.36</td><td>0.511</td></tr><tr><td>log1p</td><td>2.49</td><td><strong>0.501</strong></td><td>2.60</td><td>2.49</td><td>0.516</td></tr><tr><td>log2</td><td>0.995</td><td><strong>0.502</strong></td><td>1.64</td><td>0.995</td><td>0.509</td></tr><tr><td>sin</td><td>1.51</td><td><strong>0.502</strong></td><td>0.798</td><td>0.798</td><td>0.798</td></tr><tr><td>sinh</td><td>3.40</td><td><strong>0.503</strong></td><td>4.85</td><td>9.71e3</td><td>0.802</td></tr><tr><td>sqrt</td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td></tr><tr><td>tan</td><td>1.76</td><td><strong>0.504</strong></td><td>1.02</td><td>1.02</td><td>1.02</td></tr><tr><td>tanh</td><td>3.22</td><td><strong>0.506</strong></td><td>2.56</td><td>2.95</td><td>0.639</td></tr><tr><td>tgamma</td><td><strong>9.77</strong></td><td>Inf</td><td>Inf</td><td>3.69e19</td><td>4.24e16</td></tr><tr><td>y0</td><td>1.38e18</td><td><strong>0.501</strong></td><td></td><td></td><td></td></tr><tr><td>y1</td><td>4.61e18</td><td><strong>0.501</strong></td><td></td><td></td><td></td></tr><tr><td>cospi</td><td></td><td></td><td></td><td></td><td><strong>0.795</strong></td></tr><tr><td>sinpi</td><td></td><td></td><td></td><td></td><td><strong>0.794</strong></td></tr><tr><td>tanpi</td><td></td><td></td><td></td><td></td><td><strong>1.50</strong></td></tr><tr><td>rsqrt</td><td></td><td><strong>0.501</strong></td><td></td><td></td><td></td></tr><tr><td>atan2</td><td>0.751</td><td><strong>0.501</strong></td><td>1.69</td><td>0.751</td><td>1.69</td></tr><tr><td>hypot</td><td><strong>0.584</strong></td><td>0.751</td><td>0.981</td><td>1.08</td><td>0.981</td></tr><tr><td>pow</td><td>0.914</td><td><strong>0.501</strong></td><td>533.</td><td>533.</td><td>533.</td></tr></tbody></table>
sqrt and hypot. However, in Newlib 4.5.0, the hypotl function does not work properly: for $x \ge 2^{8192}$, the call hypotl(x,0) gives infinity.

**Notes about OpenLibm.** The powl function does not seem to be thread-safe, the tgammal function yields +Inf for x=-0x6.db747ae147ae148p+8 instead of 0x0.01dbd551da54538p-16385, and expm1l yields NaN instead of 0xf.ffffcfce79e56d5p+16380 for x=0x2.c5c85fdf170c604cp+12.

**Notes about the Apple Math Library.** The Apple Darwin ABI for ARM processors maps the C long double type to double, thus there is no real "double extended" format. The same holds for the Microsoft math library.

**Notes about LLVM-libc.** The LLVM-libc library only implements the square root function in double-extended precision, and for this function we could not find any error larger than 0.5 ulp (for rounding to nearest). Since a single function is implemented, we don't mention LLVM-libc in Tables 12-16.

**Notes about FreeBSD.** For x=-0x6.e000000000000008p+8 which is very near a negative integer, the tgammal function yields -0 instead of -0x4.b40cdf839d0bbp-16392.

# 5 Quadruple Precision

Only the GNU libc and the Intel Math Library support quadruple precision, through the _Float128 type in GNU libc, and _Quad in the Intel Math Library (using the option of the Intel C compiler -Option,cpp,--extended_float_types). The results are summarized in Table 17, and detailed in Table 18. Only the square root function is correctly rounded (or at least seems to be). The Intel Math Library gives better results than the GNU libc for all functions it provides, except for lgamma and tgamma. Apart from these two functions, and from the Bessel functions j0, j1, y0, y1, the observed error for the Intel Math Library is at most 1.4 ulps. The GNU libc has large errors for j0, j1, y0, y1, and pow.

**Acknowledgements.** The authors thank Claude-Pierre Jeannerod, Vincent Lefèvre and Terje Mathisen who helped improving that article, Alexei Sibidanov who helped compiling Newlib, Eric Schneider, Nick Timmons, Hugues de Lassus, Fred J. Tydeman and Sélène Corbineau for interesting discussions. Joseph Myers suggested to included the double extended format. Experiments presented in this article were carried out using the Grid'5000 testbed, supported by a scientific interest group hosted by Inria and including CNRS, RENATER and several Universities as well as other organizations (see https://www.grid5000.fr). This work was also supported by the French "Ministère de l'Enseignement Supérieur et de la Recherche", by the "Conseil Régional de Lorraine", and by the European Union, through the "Cyber-Entreprises" project. Experiments on GPU were performed on hardware made available by CERN. Experiments with the Microsoft library were possible thanks to Brice Goglin and the TADaaM project-team from Inria.
<table><caption>Table 12: Double extended precision: GNU libc and Intel Math Library.</caption><thead><tr><th rowspan="2">function</th><th colspan="2">GNU libc 2.39</th><th colspan="2">IML 2024.0.2</th></tr><tr><th>x</th><th>max e</th><th>x</th><th>max e</th></tr></thead><tbody><tr><td>acos</td><td>0xf.fe002cabd608585p-41</td><td>1.75</td><td>0x8.af256cd27462348p-41</td><td>0.505</td></tr><tr><td>acosh</td><td>0x1.1ecdb5b8f0c5d79p+01</td><td>2.99</td><td>0x1.1f9c4feedfe4f2cp+01</td><td>0.502</td></tr><tr><td>asin</td><td>0x8.171fd358c4cb27bp-41</td><td>1.15</td><td>-0x8.018aef8787e5a6bp-41</td><td>0.506</td></tr><tr><td>asinh</td><td>-0x8.0bb656992eac437p-41</td><td>2.96</td><td>0x7 ff15da44c3651abp-41</td><td>0.506</td></tr><tr><td>atan</td><td>-0x1.0411ae010d4c5b1ep+01</td><td>0.640</td><td>-0x8.00f60592e42d79p+81</td><td>0.501</td></tr><tr><td>atanh</td><td>-0x3.337ceacc9025258p-41</td><td>2.88</td><td>0x3.e7be418257523408p-41</td><td>0.501</td></tr><tr><td>cbrt</td><td>-0xc.f4fd71a450e6a0bp-147321</td><td>0.824</td><td>-0x2.320375fd33ed311cp-133761</td><td>0.503</td></tr><tr><td>cos</td><td>-0x3.d067a048093bdf94p+91601</td><td>1.51</td><td>-0x4.b0df0d7d55044918p+81</td><td>0.502</td></tr><tr><td>cosh</td><td>0x2.c5d375f827733ac4p+121</td><td>3.40</td><td>-0x7.f6a09874512cf768p-41</td><td>0.502</td></tr><tr><td>erf</td><td>0xd.7fe64ab05cf75e8p-41</td><td>1.17</td><td>-0x1.c55160e785ee1cbap-41</td><td>0.518</td></tr><tr><td>erfc</td><td>0x1.59723d7ee47e3034p+01</td><td>4.73</td><td>0x3.03c7b9f943690558p-41</td><td>0.527</td></tr><tr><td>exp</td><td>0x5.8b9111182b4467ep-41</td><td>1.27</td><td>0x2.c590e6ab0d71c77p+121</td><td>0.501</td></tr><tr><td>exp10</td><td>0x1.2da9675e95849c3ep+121</td><td>1.50</td><td>-0x1.2ab76ac25255a1aap+121</td><td>0.501</td></tr><tr><td>exp2</td><td>-0x7.3f819acf048f1678p-41</td><td>0.788</td><td>-0x3.fe9a346527a75d98p-161</td><td>0.501</td></tr><tr><td>expm1</td><td>0x5.8b910bbe3c26818p-41</td><td>3.08</td><td>-0x1.0040016b56008656p-81</td><td>0.502</td></tr><tr><td>j0</td><td>-0x2.67a2a5d2e367f784p+01</td><td>9.79e17</td><td>-0x1.6a09e667f3bd238cp-321</td><td>0.501</td></tr><tr><td>j1</td><td>0x3.d4eaaeb5ede115p+01</td><td>3.38e18</td><td>0x8.001819d5fc886dap-41</td><td>0.501</td></tr><tr><td>lgamma</td><td>-0x3.ec9403f23a1f21cp+01</td><td>12.2</td><td>-0x4.07fe15510b6a28p+01</td><td>0.549</td></tr><tr><td>log</td><td>0x1.20dad075f537ae56p+01</td><td>0.998</td><td>0x1.1001246349edf00cp+01</td><td>0.501</td></tr><tr><td>log10</td><td>0x1.272b7c3bbb08ae12p+01</td><td>1.36</td><td>0x1.010141e1049fce68p+01</td><td>0.502</td></tr><tr><td>log1p</td><td>-0x6.451f6c3fd0d4a218p-41</td><td>2.49</td><td>-0xe.fefa23913fa3eb7p-81</td><td>0.501</td></tr><tr><td>log2</td><td>0x1.058f12b8b3ac44bep+01</td><td>0.995</td><td>0x1.01004bffff4316bep+01</td><td>0.502</td></tr><tr><td>sin</td><td>-0x6.e2368c0ed74e5698p+161</td><td>1.51</td><td>-0xc.141cf155623856bp+81</td><td>0.502</td></tr><tr><td>sinh</td><td>0x2.c5d375f827733ac4p+121</td><td>3.40</td><td>0x7.b0af44fc25df3efp-41</td><td>0.503</td></tr><tr><td>sqrt</td><td>0xf. ffffffff ffffffff p-41</td><td>0.500</td><td>0xf. ffffffff ffffffff p-41</td><td>0.500</td></tr><tr><td>tan</td><td>0x1.974cd2181086913p+81</td><td>1.76</td><td>0xc.845cb771b06f4c5p+01</td><td>0.504</td></tr><tr><td>tanh</td><td>0x3.b9979a543d0fbfa8p-41</td><td>3.22</td><td>0x7. fb808a1ef99076ep-41</td><td>0.506</td></tr><tr><td>tgamma</td><td>-0x1.70a55b2628a7cb68p+41</td><td>9.77</td><td>-0x4.179563a9af206c1p+601</td><td>Inf</td></tr><tr><td>y0</td><td>0xe.4c175c6a0bf51e8p-41</td><td>1.38e18</td><td>0x1.000213a50d97fd8ep+01</td><td>0.501</td></tr><tr><td>y1</td><td>0xb.bfc89c6a1903022p+01</td><td>4.61e18</td><td>0x4.002362c1b67ad6cp+01</td><td>0.501</td></tr><tr><td>rsqrt</td><td></td><td></td><td>0x1.61e30a1ac16221eap+126001</td><td>0.501</td></tr><tr><td>atan2</td><td>-0x7.9301460b8463cbp+153681</td><td>0.751</td><td>-0x5.c0c9cc5a59632f88p+163401</td><td>0.501</td></tr><tr><td></td><td>0xf.25cd5eb1280b4d1p+153721</td><td></td><td>0x5.db7810fba1ce4908p+163481</td><td></td></tr><tr><td>hypot</td><td>-0x2.97b86706043d619p+72401</td><td>0.584</td><td>-0x3.00bad8a56d87a0cp-163841</td><td>0.751</td></tr><tr><td></td><td>0x1.8256bdd12d2e163ep+72401</td><td></td><td>-0xe.6d794db04791398p-163881</td><td></td></tr><tr><td>pow</td><td>0x2.21dda4bcec55b158p-36161</td><td>0.914</td><td>0xc.b80572af668bb57p+1521</td><td>0.501</td></tr><tr><td></td><td>0x7.ef1ef5fbe3df50dp-161</td><td></td><td>-0x6.8a6d3d7b442f3c18p+41</td><td></td></tr></tbody></table>
<table><caption>Table 12: Double extended precision: Largest known error.</caption><thead><tr><th>library version</th><th>GNU libc 2.41</th><th>Intel Math Library IML 2025.0.0</th><th>OpenLibm 0.8.5</th><th>Musl 1.2.5</th><th>FreeBSD 14.2</th></tr></thead><tbody><tr><td>acos</td><td>1.75</td><td><strong>0.505</strong></td><td>0.938</td><td>1.75</td><td>0.938</td></tr><tr><td>acosh</td><td>2.99</td><td><strong>0.502</strong></td><td>3.14</td><td>2.99</td><td>2.24</td></tr><tr><td>asin</td><td>1.15</td><td><strong>0.506</strong></td><td>1.03</td><td>2.00</td><td>1.03</td></tr><tr><td>asinh</td><td>2.96</td><td><strong>0.506</strong></td><td>3.19</td><td>2.96</td><td>1.63</td></tr><tr><td>atan</td><td>0.640</td><td><strong>0.501</strong></td><td>1.10</td><td>0.640</td><td>1.10</td></tr><tr><td>atanh</td><td>2.88</td><td><strong>0.501</strong></td><td>85.4</td><td>3.19</td><td>1.52</td></tr><tr><td>cbrt</td><td>0.824</td><td><strong>0.503</strong></td><td>0.890</td><td>0.890</td><td>0.890</td></tr><tr><td>cos</td><td>1.51</td><td><strong>0.502</strong></td><td>0.799</td><td>0.799</td><td>0.799</td></tr><tr><td>cosh</td><td>3.40</td><td><strong>0.502</strong></td><td>4.86</td><td>3.73</td><td>0.936</td></tr><tr><td>erf</td><td>1.17</td><td><strong>0.518</strong></td><td>1.17</td><td>1.17</td><td>0.995</td></tr><tr><td>erfc</td><td>4.73</td><td><strong>0.527</strong></td><td>5.77</td><td>5.12</td><td>1.38e8</td></tr><tr><td>exp</td><td>1.27</td><td><strong>0.501</strong></td><td>2.00</td><td>1.54</td><td>0.752</td></tr><tr><td>exp10</td><td>1.50</td><td><strong>0.501</strong></td><td></td><td>40.1</td><td></td></tr><tr><td>exp2</td><td>0.788</td><td><strong>0.501</strong></td><td>2.18</td><td>0.788</td><td>0.753</td></tr><tr><td>expm1</td><td>3.08</td><td><strong>0.502</strong></td><td>Inf</td><td>9.71e3</td><td>0.517</td></tr><tr><td>j0</td><td>9.79e17</td><td><strong>0.501</strong></td><td></td><td></td><td></td></tr><tr><td>j1</td><td>3.38e18</td><td><strong>0.501</strong></td><td></td><td></td><td></td></tr><tr><td>lgamma</td><td>12.2</td><td><strong>0.549</strong></td><td>9.08e19</td><td>9.08e19</td><td>1.65e20</td></tr><tr><td>log</td><td>0.998</td><td><strong>0.501</strong></td><td>1.22</td><td>0.998</td><td>0.512</td></tr><tr><td>log10</td><td>1.36</td><td><strong>0.502</strong></td><td>1.22</td><td>1.36</td><td>0.511</td></tr><tr><td>log1p</td><td>2.49</td><td><strong>0.501</strong></td><td>2.60</td><td>2.49</td><td>0.516</td></tr><tr><td>log2</td><td>0.995</td><td><strong>0.502</strong></td><td>1.64</td><td>0.995</td><td>0.509</td></tr><tr><td>sin</td><td>1.51</td><td><strong>0.502</strong></td><td>0.799</td><td>0.799</td><td>0.799</td></tr><tr><td>sinh</td><td>3.40</td><td><strong>0.503</strong></td><td>4.85</td><td>9.71e3</td><td>0.803</td></tr><tr><td>sqrt</td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td><td><strong>0.500</strong></td></tr><tr><td>tan</td><td>1.76</td><td><strong>0.504</strong></td><td>1.02</td><td>1.02</td><td>1.02</td></tr><tr><td>tanh</td><td>3.22</td><td><strong>0.506</strong></td><td>2.56</td><td>2.95</td><td>0.640</td></tr><tr><td>tgamma</td><td>9.77</td><td><strong>0.550</strong></td><td>Inf</td><td>3.69e19</td><td>4.24e16</td></tr><tr><td>y0</td><td>1.38e18</td><td><strong>0.501</strong></td><td></td><td></td><td></td></tr><tr><td>y1</td><td>4.61e18</td><td><strong>0.501</strong></td><td></td><td></td><td></td></tr><tr><td>acospi</td><td><strong>2.86</strong></td><td></td><td></td><td></td><td></td></tr><tr><td>asinpi</td><td><strong>2.09</strong></td><td></td><td></td><td></td><td></td></tr><tr><td>atanpi</td><td><strong>1.56</strong></td><td></td><td></td><td></td><td></td></tr><tr><td>cospi</td><td>1.80</td><td></td><td></td><td></td><td><strong>0.797</strong></td></tr><tr><td>exp10m1</td><td><strong>3.57</strong></td><td><strong>3.57</strong></td><td></td><td></td><td></td></tr><tr><td>exp2m1</td><td><strong>3.20</strong></td><td><strong>3.20</strong></td><td></td><td></td><td></td></tr><tr><td>log10p1</td><td><strong>4.17</strong></td><td><strong>4.17</strong></td><td></td><td></td><td></td></tr><tr><td>log2p1</td><td><strong>3.95</strong></td><td><strong>3.95</strong></td><td></td><td></td><td></td></tr><tr><td>sinpi</td><td>1.80</td><td></td><td></td><td></td><td><strong>0.797</strong></td></tr><tr><td>tanpi</td><td>3.02</td><td></td><td></td><td></td><td><strong>1.50</strong></td></tr><tr><td>rsqrt</td><td></td><td><strong>0.501</strong></td><td></td><td></td><td></td></tr><tr><td>atan2</td><td>0.751</td><td><strong>0.501</strong></td><td>1.69</td><td>0.751</td><td>1.69</td></tr><tr><td>atan2pi</td><td><strong>1.60</strong></td><td></td><td></td><td></td><td></td></tr><tr><td>compound</td><td></td><td><strong>0.502</strong></td><td></td><td></td><td></td></tr><tr><td>hypot</td><td><strong>0.584</strong></td><td>0.751</td><td>0.981</td><td>1.08</td><td>0.981</td></tr><tr><td>pow</td><td>0.914</td><td><strong>0.501</strong></td><td>3.77e4</td><td>3.77e4</td><td>3.77e4</td></tr></tbody></table>
<table><caption>Table 13: Double extended precision: OpenLibm and Musl.</caption><thead><tr><th rowspan="2">function</th><th colspan="2">OpenLibm 0.8.1</th><th colspan="2">Musl 1.2.4</th></tr><tr><th>x</th><th>max e</th><th>x</th><th>max e</th></tr></thead><tbody><tr><td>acos</td><td>-0x8.040541d0054d89p-41</td><td>0.938</td><td>0xf.fe002cabd608585p-41</td><td>1.75</td></tr><tr><td>acosh</td><td>0x1.10384b24aec007fcp+01</td><td>3.14</td><td>-0x6.e2368c0ed74e5698p+161</td><td>Inf</td></tr><tr><td>asin</td><td>0x8.0519515d1e15a6bp-41</td><td>1.03</td><td>-0x3.fff0a397b8dea17cp-81</td><td>2.00</td></tr><tr><td>asinh</td><td>-0x5.c9866cb231f2c7c8p-41</td><td>3.19</td><td>-0x8.0bb656992eac437p-41</td><td>2.96</td></tr><tr><td>atan</td><td>0x6.fffde214a06fb5f8p-41</td><td>1.10</td><td>-0x1.0411ae010d4c5b1ep+01</td><td>0.640</td></tr><tr><td>atanh</td><td>-0xf.ffffffff6e78p-321</td><td>85.4</td><td>0x3.344a915e34e5e6b8p-41</td><td>3.19</td></tr><tr><td>cbrt</td><td>-0x3.fffffff5623708p+45881</td><td>0.890</td><td>-0x3.fffffff5623708p+45881</td><td>0.890</td></tr><tr><td>cos</td><td>0x3.e0dc8477d8e9d7acp+41</td><td>0.799</td><td>0x3.e0dc8477d8e9d7acp+41</td><td>0.799</td></tr><tr><td>cosh</td><td>0x2.c5d374f9436efd1p+121</td><td>4.86</td><td>0x2.c5d37484e4c162bp+121</td><td>3.73</td></tr><tr><td>erf</td><td>0xd.7fe64ab05cf75e8p-41</td><td>1.17</td><td>0xd.7fe64ab05cf75e8p-41</td><td>1.17</td></tr><tr><td>erfc</td><td>0x1.5cc0e1cc32a3dc98p+01</td><td>5.77</td><td>0x1.5c9262fa4210902p+01</td><td>5.12</td></tr><tr><td>exp</td><td>0x8.aa2253c0d601dedp+01</td><td>2.00</td><td>-0x2.c5a1073a0f38b61cp+121</td><td>1.54</td></tr><tr><td>exp10</td><td></td><td></td><td>0x2.68826a13ef3fde64p+163761</td><td>Inf</td></tr><tr><td>exp2</td><td>-0xf.ffffd9f32ee1e06p-121</td><td>2.18</td><td>-0x7.3f819acf048f1678p-41</td><td>0.788</td></tr><tr><td>expm1</td><td>0x6.63ceda63b727c8d8p-41</td><td>1.94</td><td>0x2.c5c85fdf170c604cp+121</td><td>9.71e3</td></tr><tr><td>j0</td><td></td><td></td><td></td><td></td></tr><tr><td>j1</td><td></td><td></td><td></td><td></td></tr><tr><td>lgamma</td><td>-0x2.74ff92c01f0d82acp+01</td><td>9.08e19</td><td>-0x2.74ff92c01f0d82acp+01</td><td>9.08e19</td></tr><tr><td>log</td><td>0xb.504a14384e9b137p-41</td><td>1.22</td><td>0x1.20dad075f537ae56p+01</td><td>0.998</td></tr><tr><td>log10</td><td>0xb.ffc4b4c47e00c3p-41</td><td>1.22</td><td>0x1.272b7c3bbb08ae12p+01</td><td>1.36</td></tr><tr><td>log1p</td><td>-0x4.c669bd1813ec8bd8p-41</td><td>2.60</td><td>-0x6.451f6c3fd0d4a218p-41</td><td>2.49</td></tr><tr><td>log2</td><td>0x1.6646b082fd1065cep+01</td><td>1.64</td><td>0x1.058f12b8b3ac44bep+01</td><td>0.995</td></tr><tr><td>sin</td><td>-0x2.a2a4aca336af4538p+81</td><td>0.798</td><td>-0x2.a2a4aca336af4538p+81</td><td>0.798</td></tr><tr><td>sinh</td><td>-0x2.c5d375cbe7e4a81cp+121</td><td>4.85</td><td>0x2.c5c85fdbc1ccc354p+121</td><td>9.71e3</td></tr><tr><td>sqrt</td><td>0xf.FFFFFFFFFFFFFFFp-41</td><td>0.500</td><td>0xf.FFFFFFFFFFFFFFFp-41</td><td>0.500</td></tr><tr><td>tan</td><td>-0x6.fae4526d46d11ad8p+81</td><td>1.02</td><td>-0x6.fae4526d46d11ad8p+81</td><td>1.02</td></tr><tr><td>tanh</td><td>0x3.8b2602d43bdf4c28p-41</td><td>2.56</td><td>0x4.024182351388d15p-41</td><td>2.95</td></tr><tr><td>tgamma</td><td>-0x6.db747ae147ae148p+81</td><td>Inf</td><td>-0x2.8d19fd20f3aa62cp+41</td><td>3.69e19</td></tr><tr><td>y0</td><td></td><td></td><td></td><td></td></tr><tr><td>y1</td><td></td><td></td><td></td><td></td></tr><tr><td>atan2</td><td>0x3.d34c9d81dcd29354p+55681</td><td>1.69</td><td>-0x7.9301460b8463cbp+153681</td><td>0.751</td></tr><tr><td></td><td>0xf.3afc4f6c9f5c4a2p+55681</td><td></td><td>0xf.25cd5eb1280b4d1p+153721</td><td></td></tr><tr><td>hypot</td><td>0x1.73f339f61eda21dp-163841</td><td>0.981</td><td>0x2.00007da75fd5903cp-89601</td><td>1.08</td></tr><tr><td></td><td>0x2.e45f9f9500877e2p-163841</td><td></td><td>0x2.d42207352184bff4p-89601</td><td></td></tr><tr><td>pow</td><td>0xc.f620c9ea4p+163801</td><td>533.</td><td>0xc.f620c9ea4p+163801</td><td>533.</td></tr><tr><td></td><td>-0x4.0ffffcp-481</td><td></td><td>-0x4.0ffffcp-481</td><td></td></tr></tbody></table>
<table><caption>Table 13: Double extended precision: inputs giving the largest known error in GNU libc and the Intel Math Library (univariate functions).</caption><thead><tr><th>function</th><th>GNU libc 2.41<br>x</th><th>IML 2025.0.0<br>x</th></tr></thead><tbody><tr><td>acos</td><td>0xf.fe002cabd608585p-4</td><td>0x8.af256cd27462348p-4</td></tr><tr><td>acosh</td><td>0x1.1ecdb5b8f0c5d79p+0</td><td>0x1.1f9c4feedfe4f2cp+0</td></tr><tr><td>asin</td><td>0x8.171fd358c4cb27bp-4</td><td>-0x8.018aef8787e5a6bp-4</td></tr><tr><td>asinh</td><td>-0x8.0bb656992eac437p-4</td><td>0x7 ff15da44c3651abp-4</td></tr><tr><td>atan</td><td>-0x1.0411ae010d4c5b1ep+0</td><td>-0x8.00f60592e42d79p+8</td></tr><tr><td>atanh</td><td>-0x3.337ceacc9025258p-4</td><td>0x3.e7be418257523408p-4</td></tr><tr><td>cbrt</td><td>-0xc.f4fd71a450e6a0bp-14732</td><td>-0x2.320375fd33ed311cp-13376</td></tr><tr><td>cos</td><td>-0x3.d067a048093bdf94p+9160</td><td>-0x4.b0df0d7d55044918p+8</td></tr><tr><td>cosh</td><td>0x2.c5d375f827733ac4p+12</td><td>-0x7.f6a09874512cf768p-4</td></tr><tr><td>erf</td><td>0xd.7fe64ab05cf75e8p-4</td><td>-0x1.c55160e785ee1cbap-4</td></tr><tr><td>erfc</td><td>0x1.59723d7ee47e3034p+0</td><td>0x3.03c7b9f943690558p-4</td></tr><tr><td>exp</td><td>0x5.8b9111182b4467ep-4</td><td>0x2.c590e6ab0d71c77p+12</td></tr><tr><td>exp10</td><td>0x1.2da9675e95849c3ep+12</td><td>-0x1.2ab76ac25255a1aap+12</td></tr><tr><td>exp2</td><td>-0x7.3f819acf048f1678p-4</td><td>-0x3.fe9a346527a75d98p-16</td></tr><tr><td>expm1</td><td>0x5.8b910bbe3c26818p-4</td><td>-0x1.0040016b56008656p-8</td></tr><tr><td>j0</td><td>-0x2.67a2a5d2e367f784p+0</td><td>-0x1.6a09e667f3bd238cp-32</td></tr><tr><td>j1</td><td>0x3.d4eaaeb5ede115p+0</td><td>0x8.001819d5fc886dap-4</td></tr><tr><td>lgamma</td><td>-0x3.ec9403f23a1f21cp+0</td><td>-0x4.07fe15510b6a28p+0</td></tr><tr><td>log</td><td>0x1.20dad075f537ae56p+0</td><td>0x1.1001246349edf00cp+0</td></tr><tr><td>log10</td><td>0x1.272b7c3bbb08ae12p+0</td><td>0x1.010141e1049fce68p+0</td></tr><tr><td>log1p</td><td>-0x6.451f6c3fd0d4a218p-4</td><td>-0xe.fefa23913fa3eb7p-8</td></tr><tr><td>log2</td><td>0x1.058f12b8b3ac44bep+0</td><td>0x1.01004bffffe4316bep+0</td></tr><tr><td>sin</td><td>-0x6.e2368c0ed74e5698p+16</td><td>-0xc.141cf155623856bp+8</td></tr><tr><td>sinh</td><td>0x2.c5d375f827733ac4p+12</td><td>0x7.b0af44fc25df3efp-4</td></tr><tr><td>sqrt</td><td>0xf.fffffffffffffff-4</td><td>0xf.fffffffffffffff-4</td></tr><tr><td>tan</td><td>0x1.974cd2181086913p+8</td><td>0xc.845cb771b06f4c5p+0</td></tr><tr><td>tanh</td><td>0x3.b9979a543d0fbfa8p-4</td><td>0x7.fb808a1ef99076ep-4</td></tr><tr><td>tgamma</td><td>-0x1.70a55b2628a7cb68p+4</td><td>-0x6.9c7abe03c485dbbp+8</td></tr><tr><td>y0</td><td>0xe.4c175c6a0bf51e8p-4</td><td>0x1.000213a50d97fd8ep+0</td></tr><tr><td>y1</td><td>0xb.bfc89c6a1903022p+0</td><td>0x4.002362c1b67ad6cp+0</td></tr><tr><td>acospi</td><td>0xf.fec85670a4b0761p-4</td><td></td></tr><tr><td>asinpi</td><td>0x8.14d7e32b5c44642p-4</td><td></td></tr><tr><td>atanpi</td><td>0x8.14d7e32b5c44642p-4</td><td></td></tr><tr><td>cospi</td><td>0x7.ae7df669ffba0068p-4</td><td></td></tr><tr><td>exp10m1</td><td>0x2.c7fd02fd98797bf4p-4</td><td></td></tr><tr><td>exp2m1</td><td>0x9.3c1d13fc7c58944p-4</td><td></td></tr><tr><td>log10p1</td><td>0x4.a486e7fa771f839p-4</td><td></td></tr><tr><td>log2p1</td><td>0x5.843d01be597f38fp-4</td><td></td></tr><tr><td>sinpi</td><td>0x2.8bea50886e293398p-8</td><td></td></tr><tr><td>tanpi</td><td>-0x3.a8c5dc49265fd13p+0</td><td></td></tr><tr><td>rsqrt</td><td></td><td>0x1.61e30a1ac16221eap+12600</td></tr></tbody></table>
<table><caption>Table 14: Double extended precision: FreeBSD.</caption><thead><tr><th rowspan="2">function</th><th colspan="2">FreeBSD 14.0</th></tr><tr><th>x</th><th>max e</th></tr></thead><tbody><tr><td>acos</td><td>-0x8.040541d0054d89p-41</td><td>0.938</td></tr><tr><td>acosh</td><td>0x1.0001fe534dea60eap+01</td><td>2.24</td></tr><tr><td>asin</td><td>0x8.0519515d1e15a6bp-41</td><td>1.03</td></tr><tr><td>asinh</td><td>-0x8.4171758283a3f86p-41</td><td>1.63</td></tr><tr><td>atan</td><td>0x6.fffde214a06fb5f8p-41</td><td>1.10</td></tr><tr><td>atanh</td><td>-0x7 ffcede558a200b48p-121</td><td>1.52</td></tr><tr><td>cbrt</td><td>-0x3.fffffffa5623708p+45881</td><td>0.890</td></tr><tr><td>cos</td><td>0x3.e0dc8477d8e9d7acp+41</td><td>0.799</td></tr><tr><td>cosh</td><td>0xf.c92281551dfc6fep-41</td><td>0.936</td></tr><tr><td>erf</td><td>-0xe.13d27cea72c3398p-201</td><td>0.992</td></tr><tr><td>erfc</td><td>0x3.ffffff7fffffc34p-361</td><td>1.38e8</td></tr><tr><td>exp</td><td>-0x2.c5b2c28ca01620dcp+121</td><td>0.752</td></tr><tr><td>exp10</td><td>-0x3.ffe0d01a14a2504cp+121</td><td>0.753</td></tr><tr><td>exp2</td><td>0x3.3ea50d4dde0d759cp-41</td><td>0.517</td></tr><tr><td>expm1</td><td></td><td></td></tr><tr><td>j0</td><td></td><td></td></tr><tr><td>j1</td><td></td><td></td></tr><tr><td>lgamma</td><td>-0x2.74ff92c01f0d82acp+01</td><td>1.65e20</td></tr><tr><td>log</td><td>0x1.01007581714f057ap+01</td><td>0.512</td></tr><tr><td>log10</td><td>0x1.0101e4bdfd473c22p+01</td><td>0.511</td></tr><tr><td>log1p</td><td>0x1.005edabc4007ae8p-81</td><td>0.516</td></tr><tr><td>log2</td><td>0x1.00b19f3d72d156e2p+01</td><td>0.509</td></tr><tr><td>sin</td><td>-0x2.a2a4aca336af4538p+81</td><td>0.798</td></tr><tr><td>sinh</td><td>-0xd.add26e9413b23e1p-41</td><td>0.802</td></tr><tr><td>sqrt</td><td>0xf.FFFFFFFFFFFFFFFF-41</td><td>0.500</td></tr><tr><td>tan</td><td>-0x6.fae452459a55a0c8p+81</td><td>1.02</td></tr><tr><td>tanh</td><td>0x1.804e83445ddfc9acp+01</td><td>0.639</td></tr><tr><td>tgamma</td><td>-0x6.e000000000000008p+81</td><td>4.24e16</td></tr><tr><td>y0</td><td></td><td></td></tr><tr><td>y1</td><td></td><td></td></tr><tr><td>cospi</td><td>-0x3.fe1c3545f0ec5c58p-41</td><td>0.795</td></tr><tr><td>sinpi</td><td>-0x7.bf32d91c294c0b3p+01</td><td>0.794</td></tr><tr><td>tanpi</td><td>-0x1.7ffffffd731f108p+01</td><td>1.50</td></tr><tr><td>atan2</td><td>0x3.d34c9d81dcd29354p+55681</td><td>1.69</td></tr><tr><td>hypot</td><td>0x1.73f339f61eda21dp-163841</td><td>0.981</td></tr><tr><td>pow</td><td>0xc.f620c9ea4p+163801</td><td>533.</td></tr><tr><td></td><td>-0x4.0ffffcp-481</td><td></td></tr></tbody></table>
<table><caption>Table 14: Double extended precision: inputs giving the largest known error in GNU libc and the Intel Math Library (bivariate functions).</caption><thead><tr><th></th><th>GNU libc 2.41</th><th>IML 2025.0.0</th></tr><tr><th>function</th><th>x, y</th><th>x, y</th></tr></thead><tbody><tr><td>atan2</td><td>-0x7.9301460b8463cbp+15368</td><td>-0x5.c0c9cc5a59632f88p+16340</td></tr><tr><td>atan2pi</td><td>0xf.25cd5eb1280b4d1p+15372</td><td>0x5.db7810fba1ce4908p+16348</td></tr><tr><td>compound</td><td>0x4.8010e21a5d13ad38p+212</td><td>0xa.613dc3f1daa2566p+5432</td></tr><tr><td>hypot</td><td>0x5.bb4879ec6325337p+10940</td><td>-0x4.fcf34863ee4e7a38p-20</td></tr><tr><td>pow</td><td>-0x2.97b86706043d619p+7240</td><td>-0x3.00bad8a56d87a0cp-16384</td></tr><tr><td></td><td>0x1.8256bdd12d2e163ep+7240</td><td>-0xe.6d794db04791398p-16388</td></tr><tr><td></td><td>0x2.21dda4bcec55b158p-3616</td><td>0xc.b80572af668bb57p+152</td></tr><tr><td></td><td>0x7.ef1ef5fbe3df50dp-16</td><td>-0x6.8a6d3d7b442f3c18p+4</td></tr></tbody></table>

## References

[1] IEEE Std 754-2019. 2019. *IEEE Standard for Floating-Point Arithmetic*. Institute of Electrical and Electronics Engineers, New York, NY, USA. 84 pages. https://doi.org/10.1109/IEEESTD.2019.8766229

[2] Ramesh C. Agarwal, James W. Cooley, Fred G. Gustavson, James B. Shearer, Gordon Slishman, and Bryant Tuckerman. 1986. New scalar and vector elementary functions for the IBM System/370. *IBM J. Res. Develop.* 30, 2 (1986), 126-144.

[3] AMD. 2024. AMD LibM version 5.0. https://developer.amd.com/amd-aocl/amd-math-library-libm/.

[4] Apple. 2025. Apple Math Library (MacOS 15.1.1, Apple M1).

[5] ARM. 2024. Arm Performance Libraries version 24.04. https://developer.arm.com/downloads/-/arm-performance-libraries.

[6] Jeff M. Arnold. 2016. A Study of the rsqrt and rcp Instructions on Intel and AMD Platforms. https://github.com/jeff-arnold/math_routines.git. 22 pages.

[7] David H. Bailey. 2020. Variable precision computing: Applications and challenges. Slides presented at the ICERM workshop on Variable Precision in Mathematical and Scientific Computing. https://www.davidhbailey.com/dhbtalks/dhb-icerm-2020.pdf.

[8] Cheryl M. Black, Robert P. Burton, and Thomas H. Miller. 1984. The Need for an Industry Standard of Accuracy for Elementary-Function Programs. *ACM Trans. Math. Software* 10, 4 (1984), 361-366.

[9] Nicolas Brisebarre, Guillaume Hanrot, Jean-Michel Muller, and Paul Zimmermann. 2024. Correctly-rounded evaluation of a function: why, how, and at what cost? (May 2024). https://hal.science/hal-04474530
<table><caption>Table 15: Quadruple precision: Largest known error.</caption><thead><tr><th>library<br>version</th><th>GNU libc<br>2.39</th><th>Intel Math Library<br>IML 2024.0.2</th></tr></thead><tbody><tr><td>acos</td><td>1.28</td><td><strong>0.502</strong></td></tr><tr><td>acosh</td><td>4.00</td><td><strong>0.501</strong></td></tr><tr><td>asin</td><td>1.20</td><td><strong>0.502</strong></td></tr><tr><td>asinh</td><td>3.95</td><td><strong>0.501</strong></td></tr><tr><td>atan</td><td>1.41</td><td><strong>0.501</strong></td></tr><tr><td>atanh</td><td>3.89</td><td><strong>0.501</strong></td></tr><tr><td>cbrt</td><td>0.736</td><td><strong>0.501</strong></td></tr><tr><td>cos</td><td>1.52</td><td><strong>0.501</strong></td></tr><tr><td>cosh</td><td>1.92</td><td><strong>0.501</strong></td></tr><tr><td>erf</td><td>1.42</td><td><strong>0.501</strong></td></tr><tr><td>erfc</td><td>4.38</td><td><strong>0.504</strong></td></tr><tr><td>exp</td><td>0.751</td><td><strong>0.501</strong></td></tr><tr><td>exp10</td><td>2.00</td><td><strong>0.501</strong></td></tr><tr><td>exp2</td><td>1.08</td><td><strong>0.501</strong></td></tr><tr><td>expm1</td><td>1.64</td><td><strong>0.501</strong></td></tr><tr><td>j0</td><td>4.10e32</td><td><strong>2.90e28</strong></td></tr><tr><td>j1</td><td>3.57e33</td><td><strong>3.33e31</strong></td></tr><tr><td>lgamma</td><td><strong>13.0</strong></td><td>2.79e30</td></tr><tr><td>log</td><td>1.05</td><td><strong>0.501</strong></td></tr><tr><td>log10</td><td>2.01</td><td><strong>0.501</strong></td></tr><tr><td>log1p</td><td>3.51</td><td><strong>0.501</strong></td></tr><tr><td>log2</td><td>3.31</td><td><strong>0.501</strong></td></tr><tr><td>sin</td><td>1.52</td><td><strong>0.501</strong></td></tr><tr><td>sinh</td><td>2.07</td><td><strong>0.501</strong></td></tr><tr><td>sqrt</td><td><strong>0.500</strong></td><td><strong>0.500</strong></td></tr><tr><td>tan</td><td>1.06</td><td><strong>0.502</strong></td></tr><tr><td>tanh</td><td>2.39</td><td><strong>0.501</strong></td></tr><tr><td>tgamma</td><td><strong>10.7</strong></td><td>8.20e3</td></tr><tr><td>y0</td><td>1.69e33</td><td><strong>4.79e27</strong></td></tr><tr><td>y1</td><td>3.47e33</td><td><strong>1.45e30</strong></td></tr><tr><td>rsqrt</td><td></td><td><strong>0.501</strong></td></tr><tr><td>atan2</td><td>1.89</td><td><strong>0.501</strong></td></tr><tr><td>hypot</td><td>0.792</td><td><strong>0.501</strong></td></tr><tr><td>pow</td><td>30.3</td><td><strong>1.40</strong></td></tr></tbody></table>
<table><thead><tr><th>function</th><th>OpenLibm 0.8.5<br>x</th><th>Musl 1.2.5<br>x</th></tr></thead><tbody><tr><td>acos</td><td>-0x8.040541d0054d89p-4</td><td>0xf.fe002cabd608585p-4</td></tr><tr><td>acosh</td><td>0x1.10384b24aec007fcp+0</td><td>0x1.1ecdb5b8f0c5d79p+0</td></tr><tr><td>asin</td><td>0x8.0519515d1e15a6bp-4</td><td>-0x3.fff0a397b8dea17cp-8</td></tr><tr><td>asinh</td><td>-0x5.c9866cb231f2c7c8p-4</td><td>-0x8.0bb656992eac437p-4</td></tr><tr><td>atan</td><td>0x6.fffde214a06fb5f8p-4</td><td>-0x1.0411ae010d4c5b1ep+0</td></tr><tr><td>atanh</td><td>-0xf.ffffffffffffe78p-32</td><td>0x3.344a915e34e5e6b8p-4</td></tr><tr><td>cbrt</td><td>-0x3.fffffffa5623708p+4588</td><td>-0x3.fffffffa5623708p+4588</td></tr><tr><td>cos</td><td>0x3.e0db6fa4b23541ap+4</td><td>0x3.e0db6fa4b23541ap+4</td></tr><tr><td>cosh</td><td>0x2.c5d374f9436efd1p+12</td><td>0x2.c5d37484e4c162bp+12</td></tr><tr><td>erf</td><td>0xd.7fe64ab05cf75e8p-4</td><td>0xd.7fe64ab05cf75e8p-4</td></tr><tr><td>erfc</td><td>0x1.5cc0e1cc32a3dc98p+0</td><td>0x1.5c9262fa4210902p+0</td></tr><tr><td>exp</td><td>0x8.aa2253c0d601dedp+0</td><td>-0x2.c5a1073a0f38b61cp+12</td></tr><tr><td>exp10</td><td></td><td>0xd.41cfeaa690e121b5p+8</td></tr><tr><td>exp2</td><td>-0xf.ffffd9f32ee1e06p-12</td><td>-0x7.3f819acf048f1678p-4</td></tr><tr><td>expm1</td><td>0x2.c5c85fdf170c604cp+12</td><td>0x2.c5c85fdf170c604cp+12</td></tr><tr><td>lgamma</td><td>-0x2.74ff92c01f0d82acp+0</td><td>-0x2.74ff92c01f0d82acp+0</td></tr><tr><td>log</td><td>0xb.504a14384e9b137p-4</td><td>0x1.20dad075f537ae56p+0</td></tr><tr><td>log10</td><td>0xb.ffc4b4c47e00c3p-4</td><td>0x1.272b7c3bbb08ae12p+0</td></tr><tr><td>log1p</td><td>-0x4.c669bd1813ec8bd8p-4</td><td>-0x6.451f6c3fd0d4a218p-4</td></tr><tr><td>log2</td><td>0x1.6646b082fd1065cep+0</td><td>0x1.058f12b8b3ac44bep+0</td></tr><tr><td>sin</td><td>-0x2.a2a4a117ff34b034p+8</td><td>-0x2.a2a4a117ff34b034p+81</td></tr><tr><td>sinh</td><td>-0x2.c5d375cbe7e4a81cp+12</td><td>0x2.c5c85fdbc1ccc354p+12</td></tr><tr><td>sqrt</td><td>0xf.ffffff Tun 4</td><td>0xf.ffffff Tun 4</td></tr><tr><td>tan</td><td>-0x6.fae45244b0bc104p+8</td><td>-0x6.fae45244b0bc104p+8</td></tr><tr><td>tanh</td><td>0x3.8b2602d43bdf4c28p-4</td><td>0x4.024182351388d15p-4</td></tr><tr><td>tgamma</td><td>-0x6.db747ae147ae148p+8</td><td>-0x2.8d19fd20f3aa62cp+4</td></tr></tbody></table>

<table><caption>Table 15: Double extended precision: inputs giving the largest known error in OpenLibm and Musl.</caption><thead><tr><th>function</th><th>x, y</th><th>x, y</th></tr></thead><tbody><tr><td>atan2</td><td>0x3.d34c9d81dcd29354p+5568<br>0xf.3afc4f6c9f5c4a2p+5568</td><td>-0x7.9301460b8463cbp+15368<br>0xf.25cd5eb1280b4d1p+15372</td></tr><tr><td>hypot</td><td>0x1.73f339f61eda21dp-16384<br>0x2.e45f9f9500877e2p-16384</td><td>0x2.00007da75fd5903cp-8960<br>0x2.d42207352184bff4p-8960</td></tr><tr><td>pow</td><td>0xf.a795000b7dae5b4p-4<br>-0x7.e4a42355b11a8098p+16</td><td>0xf.a795000b7dae5b4p-4<br>-0x7.e4a42355b11a8098p+16</td></tr></tbody></table>
<table><caption>Table 16: Double extended precision: inputs giving the largest known error in FreeBSD.</caption><thead><tr><th>function</th><th>FreeBSD 14.2<br>x</th></tr></thead><tbody><tr><td>acos</td><td>-0x8.040541d0054d89p-4</td></tr><tr><td>acosh</td><td>0x1.0001fe8811e16ee2p+0</td></tr><tr><td>asin</td><td>0x8.0519515d1e15a6bp-4</td></tr><tr><td>asinh</td><td>-0x8.4d30725ad98215ap-4</td></tr><tr><td>atan</td><td>0x6.fffde214a06fb5f8p-4</td></tr><tr><td>atanh</td><td>-0x7 ff5cbca0e5646c78p-12</td></tr><tr><td>cbrt</td><td>-0x3.fffff fa5623708p+4588</td></tr><tr><td>cos</td><td>0x3.e0db6fa4b23541ap+4</td></tr><tr><td>cosh</td><td>-0xf.c52a6a14a334e77p-4</td></tr><tr><td>erf</td><td>0x1.c5a9ec676d7e551ep-24</td></tr><tr><td>erfc</td><td>0x3.fffff f7fffffc34p-36</td></tr><tr><td>exp</td><td>-0x2.c5b2c28ca01620dcp+12</td></tr><tr><td>exp2</td><td>-0x3.ffe0d002661900a8p+12</td></tr><tr><td>expm1</td><td>0x3.80e4f0677c553158p-4</td></tr><tr><td>lgamma</td><td>-0x2.74ff92c01f0d82acp+0</td></tr><tr><td>log</td><td>0x1.01007581714f057ap+0</td></tr><tr><td>log10</td><td>0x1.0101ff27167c589ap+0</td></tr><tr><td>log1p</td><td>0x1.0071fc209b87c88p-8</td></tr><tr><td>log2</td><td>0x1.0101e3c5cde465ccp+0</td></tr><tr><td>sin</td><td>-0x2.a2a4a117ff34b034p+8</td></tr><tr><td>sinh</td><td>0xd.ae04a309c0411f3p-4</td></tr><tr><td>sqrt</td><td>0xf. ffffffff ffffffff-4</td></tr><tr><td>tan</td><td>-0x6.fae45244b0bc104p+8</td></tr><tr><td>tanh</td><td>0x1.80371de2d031a66ep+0</td></tr><tr><td>tgamma</td><td>-0x6.e000000000000008p+8</td></tr><tr><td>cospi</td><td>-0x3.f25066fd5ea7265p-4</td></tr><tr><td>sinpi</td><td>-0x4.019c9d05624aa028p-4</td></tr><tr><td>tanpi</td><td>-0x1.7fffffff d731f108p+0</td></tr></tbody></table><table><thead><tr><th>function</th><th>x, y</th></tr></thead><tbody><tr><td>atan2</td><td>0x3.d34c9d81dcd29354p+5568<br>0xf.3afc4f6c9f5c4a2p+5568</td></tr><tr><td>hypot</td><td>0x1.73f339f61eda21dp-16384<br>0x2.e45f9f9500877e2p-16384</td></tr><tr><td>pow</td><td>0xf.a795000b7dae5b4p-4<br>-0x7.e4a42355b11a8098p+16</td></tr></tbody></table>
European Union, through the "Cyber-Entreprises" project. Experiments on GPU were performed on hardware made available by CERN. Experiments with the Microsoft library were possible thanks to Brice Goglin and the TADaaM project-team from Inria.

## References

[1] AMD LibM version 4.1. https://developer.amd.com/amd-aocl/amd-math-library-libm/, 2023.

[2] Apple Math Library (MacOS 14.0, Apple M1).

[3] Arm Performance Libraries version 23.10. https://developer.arm.com/downloads/-/arm-performance-libraries, 2023.

[4] ARNOLD, J. M. A study of the rsqrt and rcp instructions on Intel and AMD platforms. https://github.com/jeff-arnold/math_routines.git, 2016. 22 pages.

[5] BAILEY, D. H. Variable precision computing: Applications and challenges. Slides presented at the ICERM workshop on Variable Precision in Mathematical and Scientific Computing, 2020. https://www.davidhbailey.com/dhbtalks/dhb-icerm-2020.pdf.

[6] BLACK, C. M., BURTON, R. P., AND MILLER, T. H. The need for an industry standard of accuracy for elementary-function programs. *ACM Trans. Math. Softw.* 10, 4 (1984), 361–366.

[7] CUDA C Programming Guide v12.2.1, Section H Mathematical Functions. https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#mathematical-functionsAppendix, 2023.

[8] CUDA Math Library. https://developer.nvidia.com/cuda-math-library, 2023.

[9] FERGUSON, W., CORNEA, M., ANDERSON, C., AND SCHNEIDER, E. The difference between x87 instructions fsin, fcos, fsincos, and fptan and mathematical functions sin, cos, sin-cos, and tan, 2015. https://software.intel.com/content/dam/develop/external/us/en/documents/x87trigonometricinstructionsvsmathfunctions.pdf.

[10] FOUSSE, L., HANROT, G., LEFÈVRE, V., PÉLISSIER, P., AND ZIMMERMANN, P. MPFR: A multiple-precision binary floating-point library with correct rounding. *ACM Trans. Math. Softw.* 33, 2 (2007), article 13.

[11] FreeBSD libc version 14.0. https://www.freebsd.org/releases/14.0R/announce/, 2023.

[12] GLATARD, T., LEWIS, L. B., DA SILVA, R. F., ADALAT, R., BECK, N., LEPAGE, C., RIOUX, P., ROUSSEAU, M., SHERIF, T., DEELMAN, E., KHALILI-MAHANI, N., AND EVANS, A. C. Reproducibility of neuroimaging analyses across operating systems. *Frontiers Neuroinformatics* 9 (2014), 12.

[13] GNU libc: Known maximum errors in math functions. http://www.gnu.org/software/libc/manual/html_node/Errors-in-Math-Functions.html, 2023.

[14] GNU libc version 2.39. https://www.gnu.org/software/libc/, 2024.
<table><caption>Table 17: Quadruple precision: Largest known error.</caption><thead><tr><th>library version</th><th>GNU libc 2.41</th><th>Intel Math Library IML 2025.0.0</th></tr></thead><tbody><tr><td>acos</td><td>1.28</td><td><strong>0.502</strong></td></tr><tr><td>acosh</td><td>4.00</td><td><strong>0.501</strong></td></tr><tr><td>asin</td><td>1.20</td><td><strong>0.502</strong></td></tr><tr><td>asinh</td><td>3.95</td><td><strong>0.501</strong></td></tr><tr><td>atan</td><td>1.41</td><td><strong>0.501</strong></td></tr><tr><td>atanh</td><td>3.89</td><td><strong>0.501</strong></td></tr><tr><td>cbrt</td><td>0.736</td><td><strong>0.501</strong></td></tr><tr><td>cos</td><td>1.52</td><td><strong>0.501</strong></td></tr><tr><td>cosh</td><td>1.92</td><td><strong>0.501</strong></td></tr><tr><td>erf</td><td>1.42</td><td><strong>0.501</strong></td></tr><tr><td>erfc</td><td>4.38</td><td><strong>0.504</strong></td></tr><tr><td>exp</td><td>0.751</td><td><strong>0.501</strong></td></tr><tr><td>exp10</td><td>2.00</td><td><strong>0.501</strong></td></tr><tr><td>exp2</td><td>1.08</td><td><strong>0.501</strong></td></tr><tr><td>expm1</td><td>1.64</td><td><strong>0.501</strong></td></tr><tr><td>j0</td><td>4.10e32</td><td><strong>2.90e28</strong></td></tr><tr><td>j1</td><td>3.57e33</td><td><strong>3.33e31</strong></td></tr><tr><td>lgamma</td><td><strong>13.0</strong></td><td>2.79e30</td></tr><tr><td>log</td><td>1.05</td><td><strong>0.501</strong></td></tr><tr><td>log10</td><td>2.01</td><td><strong>0.501</strong></td></tr><tr><td>log1p</td><td>3.51</td><td><strong>0.501</strong></td></tr><tr><td>log2</td><td>3.31</td><td><strong>0.501</strong></td></tr><tr><td>sin</td><td>1.52</td><td><strong>0.501</strong></td></tr><tr><td>sinh</td><td>2.07</td><td><strong>0.501</strong></td></tr><tr><td>sqrt</td><td><strong>0.500</strong></td><td><strong>0.500</strong></td></tr><tr><td>tan</td><td>1.06</td><td><strong>0.502</strong></td></tr><tr><td>tanh</td><td>2.39</td><td><strong>0.501</strong></td></tr><tr><td>tgamma</td><td><strong>10.7</strong></td><td>8.20e3</td></tr><tr><td>y0</td><td>1.69e33</td><td><strong>4.79e27</strong></td></tr><tr><td>y1</td><td>3.47e33</td><td><strong>1.45e30</strong></td></tr><tr><td>acospi</td><td><strong>1.70</strong></td><td></td></tr><tr><td>asinpi</td><td><strong>1.86</strong></td><td></td></tr><tr><td>atanpi</td><td><strong>2.32</strong></td><td></td></tr><tr><td>cospi</td><td><strong>1.79</strong></td><td></td></tr><tr><td>exp10m1</td><td><strong>3.25</strong></td><td></td></tr><tr><td>exp2m1</td><td><strong>2.23</strong></td><td></td></tr><tr><td>log10p1</td><td><strong>3.47</strong></td><td></td></tr><tr><td>log2p1</td><td><strong>3.35</strong></td><td></td></tr><tr><td>rsqrt</td><td></td><td><strong>0.501</strong></td></tr><tr><td>sinpi</td><td><strong>1.79</strong></td><td></td></tr><tr><td>tanpi</td><td><strong>3.03</strong></td><td></td></tr><tr><td>atan2</td><td>1.89</td><td><strong>0.501</strong></td></tr><tr><td>atan2pi</td><td><strong>2.81</strong></td><td></td></tr><tr><td>compound</td><td></td><td><strong>0.501</strong></td></tr><tr><td>hypot</td><td>0.792</td><td><strong>0.501</strong></td></tr><tr><td>pow</td><td>30.3</td><td><strong>1.40</strong></td></tr></tbody></table>
[15] HUBRECHT, T., JEANNEROD, C.-P., AND ZIMMERMANN, P. Towards a correctly-rounded and fast power function in binary64 arithmetic. In *ARITH 2023 - 30th IEEE Symposium on Computer Arithmetic* (2023). Long version available at https://inria.hal.science/hal-04159652.

[16] IEEE standard for floating-point arithmetic, 2019. 84 pages.

[17] Intel Math Library. Distributed with the Intel oneAPI DPC++ Compiler 2024.0.2, 2024.

[18] KONG, S., GAO, S., AND CLARKE, E. M. Floating-point bugs in embedded GNU C library. Tech. Rep. CMU-CS-13-130, Carnegie Mellon University, 2013. Available at http://reports-archive.adm.cs.cmu.edu/anon/2013/CMU-CS-13-130.pdf.

[19] LEE, W., SHARMA, R., AND AIKEN, A. On automatically proving the correctness of math.h implementations. In *Proceedings of the ACM on Programming Languages (POPL)* (2017), pp. 41:1–47:32. https://doi.org/10.1145/3158135.

[20] LLVM-libc C standard library 17.0.6. https://github.com/llvm/llvm-project/releases, 2023.

[21] Microsoft Visual Studio 2022, 2022.

[22] MULLER, J.-M. On the definition of ulp(x). Research Report RR-5504, LIP RR-2005-09, INRIA, LIP, Feb. 2005.

[23] Musl version 1.2.4. https://musl.libc.org/, 2023.

[24] Redhat Newlib version 4.4.0. https://sourceware.org/newlib/, 2023.

[25] ROCm Math Library. https://github.com/RadeonOpenCompute/ROCm, 2023.

[26] OpenLibm version 0.8.1. https://openlibm.org/, 2022.

[27] PETZOLD, M. A note on the first moment of extreme order statistics from the normal distribution. Tech. rep., Göteborg University. School of Business, Economics and Law, 2000. 6 pages, https://gupea.ub.gu.se/handle/2077/3092.

[28] SIBIDANOV, A., ZIMMERMANN, P., AND GLONDU, S. The CORE-MATH Project. In *ARITH 2022 - 29th IEEE Symposium on Computer Arithmetic* (virtual, France, Sept. 2022).
[10] Dr. Martyn J. Corden and David Kreitzer. 2010. Consistency of Floating-Point Results using the Intel(r) Compiler or Why doesn't my application always give the same answer? https://rc.dartmouth.edu/wp-content/uploads/2018/03/FP_Consistency_12.pdf.

[11] NVIDIA Corporation. 2025. CUDA C Programming Guide v12.8, Section H Mathematical Functions. https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#mathematical-functionsAppendix

[12] Advanced Micro Devices, Inc. 2025. AMD ROCm Software and Libraries. https://github.com/RadeonOpenCompute/ROCm. https://github.com/ROCm/llvm-project/blob/amd-staging/amd/device-libs/doc/OCML.md.

[13] Warren Ferguson, Marius Cornea, Cristina Anderson, and Eric Schneider. 2015. The Difference Between x87 Instructions FSIN, FCOS, FSINCOS, and FPTAN and Mathematical Functions sin, cos, sincos, and tan. https://software.intel.com/content/dam/develop/external/us/en/documents/x87trigonometricinstructionsvsmathfunctions.pdf.

[14] Free Software Foundation, Inc. 2024. GNU libc: Known Maximum Errors in Math Functions. http://www.gnu.org/software/libc/manual/html_node/Errors-in-Math-Functions.html

[15] Laurent Fousse, Guillaume Hanrot, Vincent Lefèvre, Patrick Pélissier, and Paul Zimmermann. 2007. MPFR: A Multiple-Precision Binary Floating-Point Library With Correct Rounding. ACM Trans. Math. Software 33, 2 (2007), article 13.

[16] FreeBSD. 2024. FreeBSD libc version 14.2. https://www.freebsd.org/releases/14.1R/announce.

[17] GCC. 2025. GCC Online Manual. https://gcc.gnu.org/onlinedocs/gcc/Floating-point-implementation.html.

[18] Tristan Glatard, Lindsay B. Lewis, Rafael Ferreira da Silva, Reza Adalat, Natacha Beck, Claude Lepage, Pierre Rioux, Marc-Etienne Rousseau, Tarek Sherif, Ewa Deelman, Najmeh Khalili-Mahani, and Alan C. Evans. 2014. Reproducibility of neuroimaging analyses across operating systems. Frontiers Neuroinformatics 9 (2014), 12. https://doi.org/10.3389/fninf.2015.00012

[19] GLIBC. 2025. GNU libc version 2.41. https://www.gnu.org/software/libc/.

[20] Intel. 2025. Intel Math Library. Distributed with the Intel oneAPI DPC++ Compiler 2025.0.0.

[21] Soonho Kong, Sicun Gao, and Edmund M. Clarke. 2013. Floating-point Bugs in Embedded GNU C Library. Technical Report CMU-CS-13-130. Carnegie Mellon University. Available at http://reports-archive.adm.cs.cmu.edu/anon/2013/CMU-CS-13-130.pdf.

[22] Wonyeol Lee, Rahul Sharma, and Alex Aiken. 2017. On automatically proving the correctness of math.h implementations. In Proceedings of the ACM on Programming Languages (POPL). 41:1–47:32. https://doi.org/10.1145/3158135.

[23] LLVM. 2025. LLVM-libc C Standard Library 19.1.7. https://github.com/llvm/llvm-project/releases.
[24] Microsoft. 2022. Microsoft Visual Studio 2022.

[25] Jean-Michel Muller. 2005. *On the definition of ulp(x)*. Research Report RR-5504, LIP RR-2005-09. INRIA, LIP. 16 pages. https://hal.inria.fr/inria-00070503

[26] MUSL. 2024. Musl version 1.2.5. https://musl.libc.org/.

[27] Nvidia. 2025. CUDA Math Library. https://developer.nvidia.com/cuda-math-library.

[28] OpenCL. 2024. OpenCL Relative Error as ULPs. https://registry.khronos.org/OpenCL/specs/2.2/html/OpenCL_C.html#relative-error-as-ulps.

[29] OpenLibm. 2025. OpenLibm version 0.8.5. https://openlibm.org/.

[30] Max Petzold. 2000. *A note on the first moment of extreme order statistics from the normal distribution*. Technical Report. Göteborg University. School of Business, Economics and Law. 6 pages, https://gupea.ub.gu.se/handle/2077/3092.

[31] RedHat. 2024. RedHat Newlib version 4.5.0. https://sourceware.org/newlib/.

[32] Alexei Sibidanov, Paul Zimmermann, and Stéphane Glondu. 2022. The CORE-MATH Project. In *ARITH 2022 - 29th IEEE Symposium on Computer Arithmetic*. virtual, France, 26-34. https://hal.inria.fr/hal-03721525