<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/libc/test/src/math/RoundToIntegerTest.h, 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] Fix for adding macro I (#111872)</title>
<updated>2024-10-11T20:35:01+00:00</updated>
<author>
<name>Shourya Goel</name>
<email>shouryagoel10000@gmail.com</email>
</author>
<published>2024-10-11T20:35:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=111b062f63ba52552f41e425449ba1db048dc51a'/>
<id>111b062f63ba52552f41e425449ba1db048dc51a</id>
<content type='text'>
We have two (EDIT: 4) files in which we are using `I`. This PR replaces
them with alternatives like `i` and `IDX` etc.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We have two (EDIT: 4) files in which we are using `I`. This PR replaces
them with alternatives like `i` and `IDX` etc.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] remove errno.h includes (#110934)</title>
<updated>2024-10-05T23:31:36+00:00</updated>
<author>
<name>Job Henandez Lara</name>
<email>jobhdezlara93@gmail.com</email>
</author>
<published>2024-10-05T23:31:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=46944b0cbc9a9d8daad0182c40fcd3560bc9ca35'/>
<id>46944b0cbc9a9d8daad0182c40fcd3560bc9ca35</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Move struct Sign into LIBC_NAMESPACE (#110709)</title>
<updated>2024-10-01T17:55:57+00:00</updated>
<author>
<name>Michael Jones</name>
<email>michaelrj@google.com</email>
</author>
<published>2024-10-01T17:55:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f6b2a222beed734df1d91bd5c165a5233c19fddb'/>
<id>f6b2a222beed734df1d91bd5c165a5233c19fddb</id>
<content type='text'>
The struct Sign should be in the correct namespace. Also update the
various tests that use it.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The struct Sign should be in the correct namespace. Also update the
various tests that use it.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Fix warnings emitted by GCC (#98751)</title>
<updated>2024-07-15T15:20:53+00:00</updated>
<author>
<name>OverMighty</name>
<email>its.overmighty@gmail.com</email>
</author>
<published>2024-07-15T15:20:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=88f0dc48d6f46e1677dc679ae649e9b291140b13'/>
<id>88f0dc48d6f46e1677dc679ae649e9b291140b13</id>
<content type='text'>
Fixes #98709.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #98709.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Fix integer `rint` variants on the GPU (#98095)</title>
<updated>2024-07-09T01:07:45+00:00</updated>
<author>
<name>Joseph Huber</name>
<email>huberjn@outlook.com</email>
</author>
<published>2024-07-09T01:07:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=afa6bed8afe9011c07c682a0a24362260d92cfdd'/>
<id>afa6bed8afe9011c07c682a0a24362260d92cfdd</id>
<content type='text'>
Summary:
Currently these are implemented as a static cast on `__builtin_rint()`
to a long. Howver, this is not strictly correct. The standard states
that the output is unspecified, but most implementations, and the LLVM
libc implementation, do some kind of guarantee on this beahvior. This is
not guaranteed by just doing a cast. This patch just uses the generic
versions until we implement `__builitin_lrint` correctly.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
Currently these are implemented as a static cast on `__builtin_rint()`
to a long. Howver, this is not strictly correct. The standard states
that the output is unspecified, but most implementations, and the LLVM
libc implementation, do some kind of guarantee on this beahvior. This is
not guaranteed by just doing a cast. This patch just uses the generic
versions until we implement `__builitin_lrint` correctly.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc][math][c23] Add MPFR unit tests for {rint,lrint,llrint,lround,llround}f16 (#94473)</title>
<updated>2024-06-10T21:30:18+00:00</updated>
<author>
<name>OverMighty</name>
<email>its.overmighty@gmail.com</email>
</author>
<published>2024-06-10T21:30:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f50656c50938781fdfdabe05c9225783ce7e409d'/>
<id>f50656c50938781fdfdabe05c9225783ce7e409d</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] fix loose except check in `{EXPECT,ASSERT}_FP_EXCEPTION` macros (#88816)</title>
<updated>2024-05-06T13:05:22+00:00</updated>
<author>
<name>Michael Flanders</name>
<email>flanders.michaelk@gmail.com</email>
</author>
<published>2024-05-06T13:05:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ecfb5d9951554d8bdb6a499c958f48cc35f78a88'/>
<id>ecfb5d9951554d8bdb6a499c958f48cc35f78a88</id>
<content type='text'>
Adds more FP test macros for the upcoming test adds for #61092 and the
issues opened from it: #88768, #88769, #88770, #88771, #88772.

Fix bug in `{EXPECT,ASSERT}_FP_EXCEPTION`. `EXPECT_FP_EXCEPTION(0)`
seems to be used to test that an exception did not happen, but it always
does `EXPECT_GE(... &amp; 0, 0)` which never fails.

Update and refactor tests that break after the above bug fix. An
interesting way things broke after the above change is that
`ForceRoundingMode` and `quick_get_round()` were raising the inexact
exception, breaking a lot of the `atan*` tests.

The changes for all files other than `FPMatcher.h` and
`libc/test/src/math/smoke/RoundToIntegerTest.h` should have the same
semantics as before. For `RoundToIntegerTest.h`, lines 56-58 before the
changes do not always hold since this test is used for functions with
different exception and errno behavior like `lrint` and `lround`. I've
deleted those lines for now, but tests for those cases should be added
for the different nearest int functions to account for this.

Adding @nickdesaulniers for review.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adds more FP test macros for the upcoming test adds for #61092 and the
issues opened from it: #88768, #88769, #88770, #88771, #88772.

Fix bug in `{EXPECT,ASSERT}_FP_EXCEPTION`. `EXPECT_FP_EXCEPTION(0)`
seems to be used to test that an exception did not happen, but it always
does `EXPECT_GE(... &amp; 0, 0)` which never fails.

Update and refactor tests that break after the above bug fix. An
interesting way things broke after the above change is that
`ForceRoundingMode` and `quick_get_round()` were raising the inexact
exception, breaking a lot of the `atan*` tests.

The changes for all files other than `FPMatcher.h` and
`libc/test/src/math/smoke/RoundToIntegerTest.h` should have the same
semantics as before. For `RoundToIntegerTest.h`, lines 56-58 before the
changes do not always hold since this test is used for functions with
different exception and errno behavior like `lrint` and `lround`. I've
deleted those lines for now, but tests for those cases should be added
for the different nearest int functions to account for this.

Adding @nickdesaulniers for review.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Make fenv and math tests preserve fenv_t state (#89658)</title>
<updated>2024-04-23T20:21:25+00:00</updated>
<author>
<name>Roland McGrath</name>
<email>mcgrathr@google.com</email>
</author>
<published>2024-04-23T20:21:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=837dab96d6f5bece79fd58d28ea2e6f7c0912493'/>
<id>837dab96d6f5bece79fd58d28ea2e6f7c0912493</id>
<content type='text'>
This adds a new test fixture class FEnvSafeTest (usable as a base
class for other fixtures) that ensures each test doesn't perturb
the `fenv_t` state that the next test will start with.  It also
provides types and methods tests can use to explicitly wrap code
under test either to check that it doesn't perturb the state or
to save and restore the state around particular test code.

All the fenv and math tests are updated to use this so that none
can affect another.  Expectations that code under test and/or
tests themselves don't perturb state can be added later.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds a new test fixture class FEnvSafeTest (usable as a base
class for other fixtures) that ensures each test doesn't perturb
the `fenv_t` state that the next test will start with.  It also
provides types and methods tests can use to explicitly wrap code
under test either to check that it doesn't perturb the state or
to save and restore the state around particular test code.

All the fenv and math tests are updated to use this so that none
can affect another.  Expectations that code under test and/or
tests themselves don't perturb state can be added later.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Add proxy header math_macros.h. (#87598)</title>
<updated>2024-04-05T22:21:16+00:00</updated>
<author>
<name>lntue</name>
<email>35648136+lntue@users.noreply.github.com</email>
</author>
<published>2024-04-05T22:21:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5748ad84e5e8e5621f221199cc290666f00e2a30'/>
<id>5748ad84e5e8e5621f221199cc290666f00e2a30</id>
<content type='text'>
Context: https://github.com/llvm/llvm-project/pull/87017

- Add proxy header `libc/hdr/math_macros.h` that will:
  - include `&lt;math.h&gt;` in overlay mode,
- include `"include/llvm-libc-macros/math-macros.h"` in full build mode.
- Its corresponding CMake target `libc.hdr.math_macros` will only depend
on `libc.include.math` and `libc.include.llvm-libc-macros.math_macros`
in full build mode.
- Replace all `#include "include/llvm-libc-macros/math-macros.h"` with
`#include "hdr/math_macros.h"`.
- Add dependency to `libc.hdr.math_macros` CMake target when using
`add_fp_unittest`.
- Update the remaining dependency.
- Update bazel overlay: add `libc:hdr_math_macros` target, and replacing
all dependency on `libc:llvm_libc_macros_math_macros` with
`libc:hdr_math_macros`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Context: https://github.com/llvm/llvm-project/pull/87017

- Add proxy header `libc/hdr/math_macros.h` that will:
  - include `&lt;math.h&gt;` in overlay mode,
- include `"include/llvm-libc-macros/math-macros.h"` in full build mode.
- Its corresponding CMake target `libc.hdr.math_macros` will only depend
on `libc.include.math` and `libc.include.llvm-libc-macros.math_macros`
in full build mode.
- Replace all `#include "include/llvm-libc-macros/math-macros.h"` with
`#include "hdr/math_macros.h"`.
- Add dependency to `libc.hdr.math_macros` CMake target when using
`add_fp_unittest`.
- Update the remaining dependency.
- Update bazel overlay: add `libc:hdr_math_macros` target, and replacing
all dependency on `libc:llvm_libc_macros_math_macros` with
`libc:hdr_math_macros`.</pre>
</div>
</content>
</entry>
</feed>
