<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/libc/test/src/math, branch users/nico/python-2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[libc] Move libc_errno.h to libc/src/__support and make LIBC_ERRNO_MODE_SYSTEM to be header-only. (#143187)</title>
<updated>2025-06-11T20:25:27+00:00</updated>
<author>
<name>lntue</name>
<email>lntue@google.com</email>
</author>
<published>2025-06-11T20:25:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d87eea35fac5a34a841c637db8908128409a184e'/>
<id>d87eea35fac5a34a841c637db8908128409a184e</id>
<content type='text'>
This is the first step in preparation for:
https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is the first step in preparation for:
https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450</pre>
</div>
</content>
</entry>
<entry>
<title>[libc][math][c23] Add atanf16() function (#141612)</title>
<updated>2025-06-01T11:36:16+00:00</updated>
<author>
<name>wldfngrs</name>
<email>wldfngrs@gmail.com</email>
</author>
<published>2025-06-01T11:36:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=573545c712357fc4498728d6cde971226c26c20f'/>
<id>573545c712357fc4498728d6cde971226c26c20f</id>
<content type='text'>
- Implementation of atan (tan inverse) function for 16-bit inputs.
- Exhaustive tests across the 16-bit input range</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Implementation of atan (tan inverse) function for 16-bit inputs.
- Exhaustive tests across the 16-bit input range</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Pass config flags to unit tests. (#142085)</title>
<updated>2025-05-30T14:00:14+00:00</updated>
<author>
<name>lntue</name>
<email>lntue@google.com</email>
</author>
<published>2025-05-30T14:00:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6d3b72aa6e98bccffbb3a02cbace314ccc7faa35'/>
<id>6d3b72aa6e98bccffbb3a02cbace314ccc7faa35</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Fix asin_test smoke test for DAZ modes due to mis-optimization on newer clang. (#141996)</title>
<updated>2025-05-29T17:59:15+00:00</updated>
<author>
<name>lntue</name>
<email>lntue@google.com</email>
</author>
<published>2025-05-29T17:59:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=637e92bf47de03ddc7b9ec08694f268a51ea7550'/>
<id>637e92bf47de03ddc7b9ec08694f268a51ea7550</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[libc][math] Implement double precision acos correctly rounded for all rounding modes. (#138308)</title>
<updated>2025-05-09T03:23:09+00:00</updated>
<author>
<name>lntue</name>
<email>lntue@google.com</email>
</author>
<published>2025-05-09T03:23:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=78cc822aa6f5af0eda55089d22ba915b6d8e0216'/>
<id>78cc822aa6f5af0eda55089d22ba915b6d8e0216</id>
<content type='text'>
We reduce computation of `acos` to `asin` as follow:

When `|x| &lt; 0.5`:
```math
acos(x) = \frac{\pi}{2} - asin(x).
```
For `0.5 &lt;= |x| &lt; 1`, let
```math
u = \frac{1 - \left| x \right|}{2},
```
then
```math
acos(x) = \begin{cases}
  2 \cdot asin \left( \sqrt{u} \right) &amp;, 0.5 \leq x &lt; 1 \\
  \pi - 2 \cdot asin \left( \sqrt{u} \right) &amp;, -1 &lt; x \leq 0.5 
\end{cases}
```</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We reduce computation of `acos` to `asin` as follow:

When `|x| &lt; 0.5`:
```math
acos(x) = \frac{\pi}{2} - asin(x).
```
For `0.5 &lt;= |x| &lt; 1`, let
```math
u = \frac{1 - \left| x \right|}{2},
```
then
```math
acos(x) = \begin{cases}
  2 \cdot asin \left( \sqrt{u} \right) &amp;, 0.5 \leq x &lt; 1 \\
  \pi - 2 \cdot asin \left( \sqrt{u} \right) &amp;, -1 &lt; x \leq 0.5 
\end{cases}
```</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Enable exp10m1f on RISC-V (#138768)</title>
<updated>2025-05-07T16:22:09+00:00</updated>
<author>
<name>Mikhail R. Gadelha</name>
<email>mikhail@igalia.com</email>
</author>
<published>2025-05-07T16:22:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=52e5889d0eeecec27beb4332c5d95d33bf3621d8'/>
<id>52e5889d0eeecec27beb4332c5d95d33bf3621d8</id>
<content type='text'>
Previously, the test failed due to isnan() and isinf() not being
defined.

This patch follows other tests in the same directory and calls isnan and
isinf from the FBits class.

---------

Co-authored-by: OverMighty &lt;its.overmighty@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, the test failed due to isnan() and isinf() not being
defined.

This patch follows other tests in the same directory and calls isnan and
isinf from the FBits class.

---------

Co-authored-by: OverMighty &lt;its.overmighty@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[libc][math] Implement double precision asin correctly rounded for all rounding modes. (#134401)</title>
<updated>2025-04-25T13:55:21+00:00</updated>
<author>
<name>lntue</name>
<email>lntue@google.com</email>
</author>
<published>2025-04-25T13:55:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ade502a8c46b8393e022b4eabcdd445af91a451c'/>
<id>ade502a8c46b8393e022b4eabcdd445af91a451c</id>
<content type='text'>
Main algorithm:

The Taylor series expansion of `asin(x)` is:
```math
\begin{align*}
  asin(x) &amp;= x + x^3 / 6 + 3x^5 / 40 + ... \\
       &amp;= x \cdot P(x^2) \\
       &amp;= x \cdot P(u) &amp;\text{, where } u = x^2.
\end{align*}
```
For the fast path, we perform range reduction mod 1/64 and use degree-7
(minimax + Taylor) polynomials to approximate `P(x^2)`.

When `|x| &gt;= 0.5`, we use the transformation:
```math
  u = \frac{1 + x}{2}
```
and apply half-angle formula to reduce `asin(x)` to:
```math
\begin{align*}
  asin(x) &amp;= sign(x) \cdot \left( \frac{\pi}{2} - 2 \cdot asin(\sqrt{u}) \right) \\
       &amp;= sign(x) \cdot \left( \frac{\pi}{2} - 2 \cdot \sqrt{u} \cdot P(u) \right).
\end{align*}
```
Since `0.5 &lt;= |x| &lt;= 1`, `|u| &lt;= 0.5`. So we can reuse the polynomial
evaluation of `P(u)` when `|x| &lt; 0.5`.

For the accurate path, we redo the computations in 128-bit precision
with degree-15 (minimax + Taylor) polynomials to approximate `P(u)`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Main algorithm:

The Taylor series expansion of `asin(x)` is:
```math
\begin{align*}
  asin(x) &amp;= x + x^3 / 6 + 3x^5 / 40 + ... \\
       &amp;= x \cdot P(x^2) \\
       &amp;= x \cdot P(u) &amp;\text{, where } u = x^2.
\end{align*}
```
For the fast path, we perform range reduction mod 1/64 and use degree-7
(minimax + Taylor) polynomials to approximate `P(x^2)`.

When `|x| &gt;= 0.5`, we use the transformation:
```math
  u = \frac{1 + x}{2}
```
and apply half-angle formula to reduce `asin(x)` to:
```math
\begin{align*}
  asin(x) &amp;= sign(x) \cdot \left( \frac{\pi}{2} - 2 \cdot asin(\sqrt{u}) \right) \\
       &amp;= sign(x) \cdot \left( \frac{\pi}{2} - 2 \cdot \sqrt{u} \cdot P(u) \right).
\end{align*}
```
Since `0.5 &lt;= |x| &lt;= 1`, `|u| &lt;= 0.5`. So we can reuse the polynomial
evaluation of `P(u)` when `|x| &lt; 0.5`.

For the accurate path, we redo the computations in 128-bit precision
with degree-15 (minimax + Taylor) polynomials to approximate `P(u)`.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc][math][c23] Add atanhf16 C23 math function. (#132612)</title>
<updated>2025-04-25T11:53:52+00:00</updated>
<author>
<name>Harrison Hao</name>
<email>57025411+harrisonGPU@users.noreply.github.com</email>
</author>
<published>2025-04-25T11:53:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=accee2b5538eedae297201d1a2d66ddefd4c0cc1'/>
<id>accee2b5538eedae297201d1a2d66ddefd4c0cc1</id>
<content type='text'>
Implementation of atanhf16 function for 16-bit inputs.

Closes: https://github.com/llvm/llvm-project/issues/132209</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implementation of atanhf16 function for 16-bit inputs.

Closes: https://github.com/llvm/llvm-project/issues/132209</pre>
</div>
</content>
</entry>
<entry>
<title>[libc][math][c23] Add acospif16() function (#134664)</title>
<updated>2025-04-24T22:03:24+00:00</updated>
<author>
<name>Anton</name>
<email>44649959+amemov@users.noreply.github.com</email>
</author>
<published>2025-04-24T22:03:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=851f7c74213e8497afb2b2a3b7facb9faedf9f5f'/>
<id>851f7c74213e8497afb2b2a3b7facb9faedf9f5f</id>
<content type='text'>
Addresses #132211  #132754
Part of #95250</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Addresses #132211  #132754
Part of #95250</pre>
</div>
</content>
</entry>
<entry>
<title>[libc][math] Improve performance test framework (#134501)</title>
<updated>2025-04-24T11:22:21+00:00</updated>
<author>
<name>Tejas Vipin</name>
<email>alissxlace@proton.me</email>
</author>
<published>2025-04-24T11:22:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=dde00f5e22e81ac88b37d1502d2383985a58329d'/>
<id>dde00f5e22e81ac88b37d1502d2383985a58329d</id>
<content type='text'>
- Merges `BinaryOpSingleOutputPerf.h` and
`SingleInputSingleOutputPerf.h` files into a unified `PerfTest.h` and
update all performance tests to use this.
- Improve the output printed to log file for tests.
- Removes unused `run_diff` method and redundant `run_perf` call in
`BINARY_INPUT_SINGLE_OUTPUT_PERF_EX` (previously
`BINARY_OP_SINGLE_OUTPUT_PERF_EX`)
- Change `BINARY_INPUT_SINGLE_OUTPUT_PERF_EX` and
`SINGLE_INPUT_SINGLE_OUTPUT_PERF` to not define `main`</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Merges `BinaryOpSingleOutputPerf.h` and
`SingleInputSingleOutputPerf.h` files into a unified `PerfTest.h` and
update all performance tests to use this.
- Improve the output printed to log file for tests.
- Removes unused `run_diff` method and redundant `run_perf` call in
`BINARY_INPUT_SINGLE_OUTPUT_PERF_EX` (previously
`BINARY_OP_SINGLE_OUTPUT_PERF_EX`)
- Change `BINARY_INPUT_SINGLE_OUTPUT_PERF_EX` and
`SINGLE_INPUT_SINGLE_OUTPUT_PERF` to not define `main`</pre>
</div>
</content>
</entry>
</feed>
