<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/libcxx/include/cmath, 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++] Simplify __promote (#136101)</title>
<updated>2025-05-08T20:48:57+00:00</updated>
<author>
<name>Nikolas Klauser</name>
<email>nikolasklauser@berlin.de</email>
</author>
<published>2025-05-08T20:48:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=948bffa951cf143da5f4caa461b25ce76fa137d0'/>
<id>948bffa951cf143da5f4caa461b25ce76fa137d0</id>
<content type='text'>
This avoids instantiating an extra class for every variant `__promote`
is used in.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This avoids instantiating an extra class for every variant `__promote`
is used in.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++][C++03] Use `__cxx03/` headers in C++03 mode (#109002)</title>
<updated>2024-12-21T12:01:48+00:00</updated>
<author>
<name>Nikolas Klauser</name>
<email>nikolasklauser@berlin.de</email>
</author>
<published>2024-12-21T12:01:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b9a2658a3e8bd13b0f9e7a8a440832a95b377216'/>
<id>b9a2658a3e8bd13b0f9e7a8a440832a95b377216</id>
<content type='text'>
This patch implements the forwarding to frozen C++03 headers as
discussed in
https://discourse.llvm.org/t/rfc-freezing-c-03-headers-in-libc. In the
RFC, we initially proposed selecting the right headers from the Clang
driver, however consensus seemed to steer towards handling this in the
library itself. This patch implements that direction.

At a high level, the changes basically amount to making each public
header look like this:

```
// inside &lt;vector&gt;
#ifdef _LIBCPP_CXX03_LANG
#  include &lt;__cxx03/vector&gt;
#else
  // normal &lt;vector&gt; content
#endif
```

In most cases, public headers are simple umbrella headers so there isn't
much code in the #else branch. In other cases, the #else branch contains
the actual implementation of the header.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch implements the forwarding to frozen C++03 headers as
discussed in
https://discourse.llvm.org/t/rfc-freezing-c-03-headers-in-libc. In the
RFC, we initially proposed selecting the right headers from the Clang
driver, however consensus seemed to steer towards handling this in the
library itself. This patch implements that direction.

At a high level, the changes basically amount to making each public
header look like this:

```
// inside &lt;vector&gt;
#ifdef _LIBCPP_CXX03_LANG
#  include &lt;__cxx03/vector&gt;
#else
  // normal &lt;vector&gt; content
#endif
```

In most cases, public headers are simple umbrella headers so there isn't
much code in the #else branch. In other cases, the #else branch contains
the actual implementation of the header.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++] Add #if 0 block to all the top-level headers (#119234)</title>
<updated>2024-12-10T15:02:12+00:00</updated>
<author>
<name>Nikolas Klauser</name>
<email>nikolasklauser@berlin.de</email>
</author>
<published>2024-12-10T15:02:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c166a9c713ec86b86f1f178a5133bc128fd0a610'/>
<id>c166a9c713ec86b86f1f178a5133bc128fd0a610</id>
<content type='text'>
Including The frozen C++03 headers results in a lot of formatting
changes in the main headers, so this splits these changes into a
separate commit instead.

This is part of
https://discourse.llvm.org/t/rfc-freezing-c-03-headers-in-libc.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Including The frozen C++03 headers results in a lot of formatting
changes in the main headers, so this splits these changes into a
separate commit instead.

This is part of
https://discourse.llvm.org/t/rfc-freezing-c-03-headers-in-libc.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++][NFC] Remove __constexpr_is{nan,finite} (#106205)</title>
<updated>2024-08-29T15:05:56+00:00</updated>
<author>
<name>Nikolas Klauser</name>
<email>nikolasklauser@berlin.de</email>
</author>
<published>2024-08-29T15:05:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a705e8cb5b071b3bf6d1d55629f18f6b7b9699ac'/>
<id>a705e8cb5b071b3bf6d1d55629f18f6b7b9699ac</id>
<content type='text'>
They're never used in `constexpr` functions, so we can simply use
`std::isnan` and `std::isfinite` instead.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
They're never used in `constexpr` functions, so we can simply use
`std::isnan` and `std::isfinite` instead.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++][math] Fix undue overflowing of `std::hypot(x,y,z)` (#100820)</title>
<updated>2024-08-05T20:08:47+00:00</updated>
<author>
<name>PaulXiCao</name>
<email>paulxicao7@gmail.com</email>
</author>
<published>2024-08-05T20:08:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=72825fde03aab3ce9eba2635b872144d1fb6b6b2'/>
<id>72825fde03aab3ce9eba2635b872144d1fb6b6b2</id>
<content type='text'>
This is in relation to mr #93350. It was merged to main, but reverted
because of failing sanitizer builds on PowerPC.

The fix includes replacing the hard-coded threshold constants (e.g.
`__overflow_threshold`) for different floating-point sizes by a general
computation using `std::ldexp`. Thus, it should now work for all architectures.
This has the drawback of not being `constexpr` anymore as `std::ldexp`
is not implemented as `constexpr` (even though the standard mandates it
for C++23).

Closes #92782</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is in relation to mr #93350. It was merged to main, but reverted
because of failing sanitizer builds on PowerPC.

The fix includes replacing the hard-coded threshold constants (e.g.
`__overflow_threshold`) for different floating-point sizes by a general
computation using `std::ldexp`. Thus, it should now work for all architectures.
This has the drawback of not being `constexpr` anymore as `std::ldexp`
is not implemented as `constexpr` (even though the standard mandates it
for C++23).

Closes #92782</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[libc++][math] Fix undue overflowing of `std::hypot(x,y,z)` (#93350)"</title>
<updated>2024-07-24T11:18:27+00:00</updated>
<author>
<name>Mitch Phillips</name>
<email>mitchp@google.com</email>
</author>
<published>2024-07-24T10:58:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1031335f2ee1879737576fde3a3425ce0046e773'/>
<id>1031335f2ee1879737576fde3a3425ce0046e773</id>
<content type='text'>
This reverts commit 9628777479a970db5d0c2d0b456dac6633864760.

More details in https://github.com/llvm/llvm-project/pull/93350, but
this broke the PowerPC sanitizer bots.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 9628777479a970db5d0c2d0b456dac6633864760.

More details in https://github.com/llvm/llvm-project/pull/93350, but
this broke the PowerPC sanitizer bots.
</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++][math] Fix undue overflowing of `std::hypot(x,y,z)` (#93350)</title>
<updated>2024-07-23T15:11:44+00:00</updated>
<author>
<name>PaulXiCao</name>
<email>paulxicao7@gmail.com</email>
</author>
<published>2024-07-23T15:11:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9628777479a970db5d0c2d0b456dac6633864760'/>
<id>9628777479a970db5d0c2d0b456dac6633864760</id>
<content type='text'>
The 3-dimentionsional `std::hypot(x,y,z)` was sub-optimally implemented.
This lead to possible over-/underflows in (intermediate) results which
can be circumvented by this proposed change.

The idea is to to scale the arguments (see linked issue for full
discussion).

Tests have been added for problematic over- and underflows.

Closes #92782</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The 3-dimentionsional `std::hypot(x,y,z)` was sub-optimally implemented.
This lead to possible over-/underflows in (intermediate) results which
can be circumvented by this proposed change.

The idea is to to scale the arguments (see linked issue for full
discussion).

Tests have been added for problematic over- and underflows.

Closes #92782</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++][math] Mathematical Special Functions: Hermite Polynomial (#89982)</title>
<updated>2024-07-20T15:50:05+00:00</updated>
<author>
<name>PaulXiCao</name>
<email>paul.luckner@rwth-aachen.de</email>
</author>
<published>2024-07-20T15:50:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=af0d731b12983a649e07f25037ee0e16a68ca470'/>
<id>af0d731b12983a649e07f25037ee0e16a68ca470</id>
<content type='text'>
Implementing the Hermite polynomials which are part of C++17's
mathematical special functions. The goal is to get early feedback which
will make implementing the other functions easier. Integration of
functions in chunks (e.g. `std::hermite` at first, then `std::laguerre`,
etc.) might make sense as well (also see note on boost.math below).

I started out from this abandoned merge request:
https://reviews.llvm.org/D58876 .

The C++23 standard defines them in-terms of `/* floating-point type */`
arguments. I have not looked into that.

Note, there is still an ongoing discussion on discourse whether
importing boost.math is an option.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implementing the Hermite polynomials which are part of C++17's
mathematical special functions. The goal is to get early feedback which
will make implementing the other functions easier. Integration of
functions in chunks (e.g. `std::hermite` at first, then `std::laguerre`,
etc.) might make sense as well (also see note on boost.math below).

I started out from this abandoned merge request:
https://reviews.llvm.org/D58876 .

The C++23 standard defines them in-terms of `/* floating-point type */`
arguments. I have not looked into that.

Note, there is still an ongoing discussion on discourse whether
importing boost.math is an option.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++] Use _Complex for multiplication and division of complex floating point types (#83575)</title>
<updated>2024-07-05T09:25:59+00:00</updated>
<author>
<name>Nikolas Klauser</name>
<email>nikolasklauser@berlin.de</email>
</author>
<published>2024-07-05T09:25:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5aacf93a8968b1ae83382ed0ce6de8279b0cd753'/>
<id>5aacf93a8968b1ae83382ed0ce6de8279b0cd753</id>
<content type='text'>
This significantly simplifies the implementation and improves the
codegen. The only downside is that the accuracy can be marginally worse,
but that is up to the compiler to decide with this change, which means
it can be controlled by compiler flags.

Differential Revision: https://reviews.llvm.org/D155312</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This significantly simplifies the implementation and improves the
codegen. The only downside is that the accuracy can be marginally worse,
but that is up to the compiler to decide with this change, which means
it can be controlled by compiler flags.

Differential Revision: https://reviews.llvm.org/D155312</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++][NFC] Run clang-format on libcxx/include again (#95874)</title>
<updated>2024-06-18T13:13:45+00:00</updated>
<author>
<name>Louis Dionne</name>
<email>ldionne.2@gmail.com</email>
</author>
<published>2024-06-18T13:13:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e2c2ffbe7a1b5d9e32a2ce64279475b50c4cba5b'/>
<id>e2c2ffbe7a1b5d9e32a2ce64279475b50c4cba5b</id>
<content type='text'>
As time went by, a few files have become mis-formatted w.r.t.
clang-format. This was made worse by the fact that formatting was not
being enforced in extensionless headers. This commit simply brings all
of libcxx/include in-line with clang-format again.

We might have to do this from time to time as we update our clang-format
version, but frankly this is really low effort now that we've formatted
everything once.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As time went by, a few files have become mis-formatted w.r.t.
clang-format. This was made worse by the fact that formatting was not
being enforced in extensionless headers. This commit simply brings all
of libcxx/include in-line with clang-format again.

We might have to do this from time to time as we update our clang-format
version, but frankly this is really low effort now that we've formatted
everything once.</pre>
</div>
</content>
</entry>
</feed>
