Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove use of INLINE_YL2X from std.math #7668

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

thewilsonator
Copy link
Contributor

rebases #3310

@thewilsonator
Copy link
Contributor Author

thewilsonator commented Oct 19, 2020

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);

@dlang-bot
Copy link
Contributor

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: and Returns:)

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"

@thewilsonator
Copy link
Contributor Author

std\internal\math\gammafunction.d(1045): [unittest] unittest failure
assert(feqrel(betaIncompleteInv(5, 10, 0.2000002972865658842L), 0.229121208190918L) >= real.mant_dig - 3);

@ibuclaw
Copy link
Member

ibuclaw commented Oct 19, 2020

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);

I'll have to check, but I think that similar relaxations also exist in gdc's fork as well.

@thewilsonator
Copy link
Contributor Author

actually could you do me a favour and upstream the relaxations

@ibuclaw
Copy link
Member

ibuclaw commented Oct 21, 2020

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.

@ibuclaw
Copy link
Member

ibuclaw commented Oct 21, 2020

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. :-)

@RazvanN7
Copy link
Collaborator

@thewilsonator can you rebase this?

@ibuclaw
Copy link
Member

ibuclaw commented Apr 15, 2021

@thewilsonator can you rebase this?

Tests will fail if you remove INLINE_Y2LX, so rebasing would be a futile effort.

#7942 (comment)

@RazvanN7
Copy link
Collaborator

@ibuclaw Any pointers on how we can fix this?

@dlang-bot dlang-bot removed the stalled label Sep 13, 2021
@LightBender LightBender added the Salvage This PR needs work, but we want to keep it and it can be salvaged. label Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Rebase Salvage This PR needs work, but we want to keep it and it can be salvaged. stalled
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants