[stable] Slightly relax gammafunction unittests to pass with quadruple real#10911
[stable] Slightly relax gammafunction unittests to pass with quadruple real#10911kinke wants to merge 1 commit intodlang:stablefrom
real#10911Conversation
|
Thanks for your pull request and interest in making D better, @kinke! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "stable + phobos#10911" |
| assert(beta(-0.5, real.infinity) == -real.infinity); | ||
| assert(cmp(beta(nextDown(-0.0L), 2*nextUp(+0.0L)), -0.0L) <= 0); | ||
| static if (real.mant_dig != 113) // TODO: yields 1 with quadruple precision, verify! | ||
| assert(cmp(beta(nextDown(-0.0L), 2*nextUp(+0.0L)), -0.0L) <= 0); |
There was a problem hiding this comment.
Unsure about this one. Edit: The beta(…) result is a NaN apparently. Edit2: Whereas it's a negative NaN with 80-bit real.
There was a problem hiding this comment.
Changed to version(AArch64), as beta() yields a positive NaN for macOS arm64 CI too, with 64-bit real. Note that this AArch64/ARM(?) behavior isn't affected by setting the non-fast FPU mode in https://github.com/dlang/dmd/blob/c8e2ae291414f839de5a7635da09a03c63fed2f6/druntime/src/test_runner.d#L114-L152.
This fixes the unittest failures on my Raspberry Pi 5 (based on Debian 13), with LDC.