<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/libc/docs/headers/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][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][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][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] Implement a fast pass for atan2f128 with 1ULP error using DyadicFloat&lt;128&gt;. (#133150)</title>
<updated>2025-04-01T14:57:32+00:00</updated>
<author>
<name>lntue</name>
<email>lntue@google.com</email>
</author>
<published>2025-04-01T14:57:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8741412bdfc0a60719f116add7d828694ef48c02'/>
<id>8741412bdfc0a60719f116add7d828694ef48c02</id>
<content type='text'>
Part of https://github.com/llvm/llvm-project/issues/131642.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Part of https://github.com/llvm/llvm-project/issues/131642.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc][math][c23] Add hypotf16 function (#131991)</title>
<updated>2025-03-31T14:06:28+00:00</updated>
<author>
<name>Tejas Vipin</name>
<email>alissxlace@proton.me</email>
</author>
<published>2025-03-31T14:06:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8078665bca1e16e33a09aea0310102077d429ada'/>
<id>8078665bca1e16e33a09aea0310102077d429ada</id>
<content type='text'>
Implement hypot for Float16 along with tests.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implement hypot for Float16 along with tests.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc][math][c23] Add asinhf16 function (#131351)</title>
<updated>2025-03-29T12:54:52+00:00</updated>
<author>
<name>Tejas Vipin</name>
<email>alissxlace@proton.me</email>
</author>
<published>2025-03-29T12:54:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d22e35be1768ed619269e6d0843260b25b52cb34'/>
<id>d22e35be1768ed619269e6d0843260b25b52cb34</id>
<content type='text'>
Implement asinh for Float16 along with tests. Closes #131001</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implement asinh for Float16 along with tests. Closes #131001</pre>
</div>
</content>
</entry>
<entry>
<title>[libc][math][c23] Add fmaf16 C23 math function. (#130757)</title>
<updated>2025-03-23T02:48:56+00:00</updated>
<author>
<name>Harrison Hao</name>
<email>57025411+harrisonGPU@users.noreply.github.com</email>
</author>
<published>2025-03-23T02:48:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=445837a3630520e9292b84b6b8dc0f86d2eccbae'/>
<id>445837a3630520e9292b84b6b8dc0f86d2eccbae</id>
<content type='text'>
Implementation of fmaf16 function for 16-bit inputs.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implementation of fmaf16 function for 16-bit inputs.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc][math][c23] Add acoshf16 C23 math function. (#130588)</title>
<updated>2025-03-23T02:08:34+00:00</updated>
<author>
<name>Harrison Hao</name>
<email>57025411+harrisonGPU@users.noreply.github.com</email>
</author>
<published>2025-03-23T02:08:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ee3e17d67f6ce37a4a78d023a361c10d7398e15f'/>
<id>ee3e17d67f6ce37a4a78d023a361c10d7398e15f</id>
<content type='text'>
Implementation of acoshf16 function for 16-bit inputs.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implementation of acoshf16 function for 16-bit inputs.</pre>
</div>
</content>
</entry>
</feed>
