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

Relax test tolerance for Float32 #24256

Merged
merged 1 commit into from
Oct 25, 2017
Merged

Relax test tolerance for Float32 #24256

merged 1 commit into from
Oct 25, 2017

Conversation

yuyichao
Copy link
Contributor

This fix a test failure on aarch64 due to a real part of half ulp.

@yuyichao yuyichao added linear algebra Linear algebra test This change adds or pertains to unit tests labels Oct 21, 2017
@@ -553,7 +553,7 @@ end
@test coth(acoth(coth(A))) ≈ coth(A)

# Definition of principal values (Aprahamian & Higham, 2016, pp. 4-5)
abstol = 1e-8 * norm(acosh(A))
abstol = max(1e-8, eps(real(elty))) * norm(acosh(A))
Copy link
Member

@stevengj stevengj Oct 22, 2017

Choose a reason for hiding this comment

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

Probably sqrt(eps(real(elty))) * vecnorm(acosh(A)) would do the trick here. (sqrt(ε) is the default reltol for isapprox, and we normally do approximate comparisons with vecnorm for performance.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, that works too.

This fix a test failure on aarch64 due to a real part of half ulp.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linear algebra Linear algebra test This change adds or pertains to unit tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants