<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/libc/src/math/generic/exp2f.cpp, branch main</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] Refactor exp2f implementation to header-only in src/__support/math folder. (#161992)</title>
<updated>2025-10-06T18:23:44+00:00</updated>
<author>
<name>Muhammad Bassiouni</name>
<email>60100307+bassiounix@users.noreply.github.com</email>
</author>
<published>2025-10-06T18:23:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=596ff855d0cb7632eebc9fbc26a5db7695a7c589'/>
<id>596ff855d0cb7632eebc9fbc26a5db7695a7c589</id>
<content type='text'>
Part of #147386

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>
Part of #147386

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] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597)</title>
<updated>2024-07-12T16:28:41+00:00</updated>
<author>
<name>Petr Hosek</name>
<email>phosek@google.com</email>
</author>
<published>2024-07-12T16:28:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5ff3ff33ff930e4ec49da7910612d8a41eb068cb'/>
<id>5ff3ff33ff930e4ec49da7910612d8a41eb068cb</id>
<content type='text'>
This is a part of #97655.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a part of #97655.</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration" (#98593)</title>
<updated>2024-07-12T07:12:13+00:00</updated>
<author>
<name>Mehdi Amini</name>
<email>joker.eph@gmail.com</email>
</author>
<published>2024-07-12T07:12:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ce9035f5bd3aa09cbd899489cdbc7f6c18acf1e3'/>
<id>ce9035f5bd3aa09cbd899489cdbc7f6c18acf1e3</id>
<content type='text'>
Reverts llvm/llvm-project#98075

bots are broken</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reverts llvm/llvm-project#98075

bots are broken</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98075)</title>
<updated>2024-07-11T19:35:22+00:00</updated>
<author>
<name>Petr Hosek</name>
<email>phosek@google.com</email>
</author>
<published>2024-07-11T19:35:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3f30effe1bd81fa1b039218a9bfe79c3b03fafad'/>
<id>3f30effe1bd81fa1b039218a9bfe79c3b03fafad</id>
<content type='text'>
This is a part of #97655.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a part of #97655.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc][math] Implement powf function correctly rounded to all rounding modes. (#71188)</title>
<updated>2023-11-06T21:54:25+00:00</updated>
<author>
<name>lntue</name>
<email>35648136+lntue@users.noreply.github.com</email>
</author>
<published>2023-11-06T21:54:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=bc7a3bd864be696217c4d11eddf16bed7646b60f'/>
<id>bc7a3bd864be696217c4d11eddf16bed7646b60f</id>
<content type='text'>
We compute `pow(x, y)` using the formula
```
  pow(x, y) = x^y = 2^(y * log2(x))
```
We follow similar steps as in `log2f(x)` and `exp2f(x)`, by breaking
down into `hi + mid + lo` parts, in which `hi` parts are computed using
the exponent field directly, `mid` parts will use look-up tables, and
`lo` parts are approximated by polynomials.

We add some speedup for common use-cases:
```
  pow(2, y) = exp2(y)
  pow(10, y) = exp10(y)
  pow(x, 2) = x * x
  pow(x, 1/2) = sqrt(x)
  pow(x, -1/2) = rsqrt(x) - to be added
```</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We compute `pow(x, y)` using the formula
```
  pow(x, y) = x^y = 2^(y * log2(x))
```
We follow similar steps as in `log2f(x)` and `exp2f(x)`, by breaking
down into `hi + mid + lo` parts, in which `hi` parts are computed using
the exponent field directly, `mid` parts will use look-up tables, and
`lo` parts are approximated by polynomials.

We add some speedup for common use-cases:
```
  pow(2, y) = exp2(y)
  pow(10, y) = exp10(y)
  pow(x, 2) = x * x
  pow(x, 1/2) = sqrt(x)
  pow(x, -1/2) = rsqrt(x) - to be added
```</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Mass replace enclosing namespace (#67032)</title>
<updated>2023-09-26T09:45:04+00:00</updated>
<author>
<name>Guillaume Chatelet</name>
<email>gchatelet@google.com</email>
</author>
<published>2023-09-26T09:45:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b6bc9d72f65a5086f310f321e969d96e9a559e75'/>
<id>b6bc9d72f65a5086f310f321e969d96e9a559e75</id>
<content type='text'>
This is step 4 of
https://discourse.llvm.org/t/rfc-customizable-namespace-to-allow-testing-the-libc-when-the-system-libc-is-also-llvms-libc/73079</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is step 4 of
https://discourse.llvm.org/t/rfc-customizable-namespace-to-allow-testing-the-libc-when-the-system-libc-is-also-llvms-libc/73079</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Fix final conversion warnings</title>
<updated>2023-08-09T17:24:03+00:00</updated>
<author>
<name>Michael Jones</name>
<email>michaelrj@google.com</email>
</author>
<published>2023-08-08T22:13:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e328d193024e727d7294cd8bed4c549c25c62246'/>
<id>e328d193024e727d7294cd8bed4c549c25c62246</id>
<content type='text'>
This patch fixes the floating point conversion warnings found with
`-Wconversion` and `-Wno-sign-conversion`. These were the last warnings
I found, meaning that once this lands https://reviews.llvm.org/D156630
should be unblocked.

Reviewed By: mcgrathr, lntue

Differential Revision: https://reviews.llvm.org/D157449
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes the floating point conversion warnings found with
`-Wconversion` and `-Wno-sign-conversion`. These were the last warnings
I found, meaning that once this lands https://reviews.llvm.org/D156630
should be unblocked.

Reviewed By: mcgrathr, lntue

Differential Revision: https://reviews.llvm.org/D157449
</pre>
</div>
</content>
</entry>
<entry>
<title>[libc][math] Improve exp2f performance.</title>
<updated>2023-06-20T13:34:20+00:00</updated>
<author>
<name>Tue Ly</name>
<email>lntue@google.com</email>
</author>
<published>2023-06-16T13:22:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=46aa659a32e78481d90950eda9d464fc22eaad31'/>
<id>46aa659a32e78481d90950eda9d464fc22eaad31</id>
<content type='text'>
Re-organize special cases and add a special case when `|x| &lt; 2^-5`.

Reviewed By: michaelrj

Differential Revision: https://reviews.llvm.org/D153134
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Re-organize special cases and add a special case when `|x| &lt; 2^-5`.

Reviewed By: michaelrj

Differential Revision: https://reviews.llvm.org/D153134
</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Add platform independent floating point rounding mode checks.</title>
<updated>2023-06-12T13:36:41+00:00</updated>
<author>
<name>Tue Ly</name>
<email>lntue@google.com</email>
</author>
<published>2023-06-06T15:50:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a98243129530c852cbd42bffafc74ab635934d8a'/>
<id>a98243129530c852cbd42bffafc74ab635934d8a</id>
<content type='text'>
Many math functions need to check for floating point rounding modes to
return correct values.  Currently most of them use the internal implementation
of `fegetround`, which is platform-dependent and blocking math functions to be
enabled on platforms with unimplemented `fegetround`.  In this change, we add
platform independent rounding mode checks and switching math functions to use
them instead. https://github.com/llvm/llvm-project/issues/63016

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D152280
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Many math functions need to check for floating point rounding modes to
return correct values.  Currently most of them use the internal implementation
of `fegetround`, which is platform-dependent and blocking math functions to be
enabled on platforms with unimplemented `fegetround`.  In this change, we add
platform independent rounding mode checks and switching math functions to use
them instead. https://github.com/llvm/llvm-project/issues/63016

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D152280
</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Fix undefined behavior of left shifting signed integer in exp2f.cpp.</title>
<updated>2023-06-07T05:15:18+00:00</updated>
<author>
<name>Tue Ly</name>
<email>lntue@google.com</email>
</author>
<published>2023-06-07T04:32:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c0a751ae3da372fdedd8ace4deabd6862dbcc660'/>
<id>c0a751ae3da372fdedd8ace4deabd6862dbcc660</id>
<content type='text'>
Fix undefined behavior of left shifting signed integer in exp2f.cpp.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D152336
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix undefined behavior of left shifting signed integer in exp2f.cpp.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D152336
</pre>
</div>
</content>
</entry>
</feed>
