phobos
phobos copied to clipboard
remove use of INLINE_YL2X from std.math
rebases #3310
std/internal/math/gammafunction.d(569): [unittest] unittest failure
assert(logGamma(-50.2L) == log(fabs(gamma(-50.2L))));
e: relaxed to
assert(feqrel(logGamma(-50.2L),log(fabs(gamma(-50.2L)))) > real.mant_dig-2);
Thanks for your pull request and interest in making D better, @thewilsonator! We are looking forward to reviewing it, and you should be hearing from a maintainer soon. Please verify that your PR follows this checklist:
- My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
- My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
- I have provided a detailed rationale explaining my changes
- New or modified functions have Ddoc comments (with
Params:
andReturns:
)
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 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.
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#7668"
std\internal\math\gammafunction.d(1045): [unittest] unittest failure
assert(feqrel(betaIncompleteInv(5, 10, 0.2000002972865658842L), 0.229121208190918L) >= real.mant_dig - 3);
std/internal/math/gammafunction.d(569): [unittest] unittest failure
assert(logGamma(-50.2L) == log(fabs(gamma(-50.2L))));
e: relaxed toassert(feqrel(logGamma(-50.2L),log(fabs(gamma(-50.2L)))) > real.mant_dig-2);
I'll have to check, but I think that similar relaxations also exist in gdc's fork as well.
actually could you do me a favour and upstream the relaxations
actually could you do me a favour and upstream the relaxations
I'm looking at the first failure in dmd
assert(logGamma(-50.2L) == log(fabs(gamma(-50.2L))));
I don't see any deviation with the unittest in gdc, and yet there is no failure. On inspection, it looks like most if not all of logGamma
and gamma
is inlined and constfolded at compile-time in gdc. So the call to log()
for gdc and dmd are receiving two different numbers (same up until the 17th decimal place). I'll have a try on aarch64, as there's sure to be failures there that don't exist on i386/x86_64.
I'll have a try on aarch64, as there's sure to be failures there that don't exist on i386/x86_64.
gammafunction hasn't been ported to 128-bit, so that's a dead end. :-)
@thewilsonator can you rebase this?
@thewilsonator can you rebase this?
Tests will fail if you remove INLINE_Y2LX, so rebasing would be a futile effort.
https://github.com/dlang/phobos/pull/7942#issuecomment-817138577
@ibuclaw Any pointers on how we can fix this?