Skip to content

merge stable#10978

Closed
ibuclaw wants to merge 29 commits intodlang:masterfrom
ibuclaw:merge_stable
Closed

merge stable#10978
ibuclaw wants to merge 29 commits intodlang:masterfrom
ibuclaw:merge_stable

Conversation

@ibuclaw
Copy link
Member

@ibuclaw ibuclaw commented Mar 20, 2026

0xEAB and others added 29 commits April 5, 2025 06:51
* Implement `version (linux_legacy_emulate_getrandom)`

* Fix style
* Add changelog entry for the `getrandom()` backwards compatibility shim

* Comment message pragma of the `getrandom()` backwards compatibility shim
Co-authored-by: Parmar Mahipalsinh <mahipalsinhp81@gmail.com>
Check GC.inFinalizer when writing debug garbage to referenced GC array, as
this is not valid to do when called from the GC.
Use of rndtol to determine which domain x belongs to is replaced with
trunc. rndtol depends on rounding mode. Depending on the mode,
rndtol(-1.5) could be -2 or -1, which map to different domains with
different signs. trunc doesn't depend on rounding mode. trunc(-1.5) is
always -1.
dlang/dmd#21525 Adds the template `_d_newarrayUTrace`.
To fix dlang/dmd#21033, this commit needs to replace the use of the
non-template hook with the newly added template in `std.array.d`.

Signed-off-by: Teodor Dutu <teodor.dutu@gmail.com>
Fix the large value method of computing std.mathspecial.beta so that it
recovers the signs of gamma(x), gamma(y), and gamma(x+y).
This modifies `std.mathspecial.logmdigammaInverse(y)` so that when y is
negative, not just less than zero, it returns NaN.

Since NaNs can  be negative, the NaN payload propagation logic is moved
to the top of the function.
…ng#10890)

* phobos#10826 explicitly address at origin in Q1 in beta

This modifies the beta function so that it explicitly addresses the case
where the input parameters (x,y) are (+0,+0), i.e. next to the origin in
the first quadrant. This is already implicitly handled, but explicitly
handling it will be make the algoritm clearer when it is extended to
address the cases where x is very small and y is very small or very
large.

Since the cases are numbered, I had to renumber the cases. (Maybe I
shouldn't have numbered them originally.)

* phobos#10826 support Q1, near origin or very large

This adds support for the cases when (x,y) is in the first quadrant
and  near the origin or the larger of x and y is very large

* phobos#10826: change NaN handling behavior of beta

This changes the NaN handling behavior of beta to be the same as that of
the + operator, i.e., when both input arguments are NaN, the one with
the larger payload is returned.

* phobos#10826: apply symmetry to entire beta alogrithm
`getNaNPayload(x)` returns a value even if `x` is not NaN, so it is up to
the caller to verify that `x` is a NaN before calling `getNaNPayload(x)`.
This means it is not a good option for determining for determining which
of a set of values has the largest NaN payload when it is only known
that at least one value is NaN. `cmp(x, y)` can be used. since to orders
-NaN as before -infinity and NaN as after infinity. When two NaN with the
same sign are compared, the one with the larger payload is considered
larger. This means that `cmp(abs(x), abx(y))` will find the NaN with the
larger payload when it is only known that at least one of `x` or `y` is
NaN.
'Deprecation: cannot return non-zero compile-time value from `opApply`'

Hit e.g. when compiling the unittests.
_d_toObject has been made public in object.d, so (incompatible) forward declaration no longer necessary
This addresses phobos#10920.

Adapted the existing function igammaTemmeLarge os that it supports
gammaIncomplete as well as its complement gammaIncompleteCompl. As part
of this adaptation, log(sigma+1) was replaced with log1p(sigma), since
Temme's alorithm requires a to be close to x, which means that sigma is
close to 0, making log(sigma+1) imprecise. gammaIncomplete was then
modified to use igammaTemmeLarge when x is much larger than 1 and a is
near x.
…e it for redBlackTree() functions too (dlang#10951)

PR dlang#10792 changed the constraint to allow const-ref predicates too,
using a lambda - which seems to have a very bad effect on attributes
inference. Avoiding the lambda and using `std.traits.lvalueOf()`
instead seems to work better.

Also update the template constraints of the free-standing
`redBlackTree()` functions, which were forgotten in dlang#10792.
@ibuclaw ibuclaw requested a review from CyberShadow as a code owner March 20, 2026 09:52
@ibuclaw ibuclaw requested a review from PetarKirov as a code owner March 20, 2026 09:52
@dlang-bot
Copy link
Contributor

Thanks for your pull request, @ibuclaw!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

⚠️⚠️⚠️ Warnings ⚠️⚠️⚠️

  • In preparation for migrating from Bugzilla to GitHub Issues, the issue reference syntax has changed. Please add the word "Bugzilla" to issue references. For example, Fix Bugzilla Issue 12345 or Fix Bugzilla 12345.(Reminder: the edit needs to be done in the Git commit message, not the GitHub pull request.)

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + phobos#10978"

@ibuclaw ibuclaw closed this Mar 20, 2026
@ibuclaw ibuclaw deleted the merge_stable branch March 20, 2026 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet