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

math_brute_force: fix exp/exp2 rlx ULP calculation #1848

Merged
merged 1 commit into from
Jan 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions test_conformance/math_brute_force/unary_float.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,15 +303,14 @@ cl_int Test(cl_uint job_id, cl_uint thread_id, void *data)

if (strcmp(fname, "exp") == 0 || strcmp(fname, "exp2") == 0)
{
float exp_error = ulps;

// For full profile, ULP depends on input value.
// For embedded profile, ULP comes from functionList.
if (!gIsEmbedded)
{
exp_error += floor(fabs(2 * s[j]));
ulps = 3.0f + floor(fabs(2 * s[j]));
}

fail = !(fabsf(err) <= exp_error);
ulps = exp_error;
fail = !(fabsf(err) <= ulps);
}
if (strcmp(fname, "tan") == 0)
{
Expand Down
Loading