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

Enabled tgamma test for bruteforce suite #2251

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

shajder
Copy link
Contributor

@shajder shajder commented Jan 28, 2025

Fixes #507 according to work plan from issue description.

@@ -2111,6 +2111,8 @@ int reference_not(double x)
return r;
}

double reference_tgamma(double x) { return tgamma(x); }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if we can rely on libc's tgamma for the reference computation? Known Maximum Errors in Math Functions seems to indicate that most tgamma libc implementations have a rather large ULP value.

Copy link
Contributor Author

@shajder shajder Feb 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, thanks! Computing reference values for tgamma seems challenging. As far as I understand, each implementation is subject to non-zero error. Please correct me if I am wrong at any point, I see few directions to follow:

  • pre-computed high-precision values taken from MatLab or similar software. This approach will definitely impact the source code with a separate path for tgamma processing.
  • limiting tgamma arguments for integral values which will result in zero error outcome. As with the previous proposition, this approach will result as a separate path for tgamma processing.
  • implementing a procedure to compute tgamma reference values with maximum known-error. According to this paper OpenLibm contains tgamma implementation with error<1ULP. Moreover, license looks friendly for other open source projects. Then we could take into account the known-error by enlarging the error from table 65.

I will appreciate discussion over this subject, thanks!

@shajder shajder added the waiting_for_feedback Waiting for feedback/information label Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting_for_feedback Waiting for feedback/information
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bruteforce tests missing functions on master
2 participants