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

fix #12552 (norm should return NaN for NaN inputs) #12564

Merged
merged 1 commit into from
Aug 11, 2015

Conversation

stevengj
Copy link
Member

This is a minimal fix for #12552 that does not require a decision on #7866.

In the infinity norms, we don't have to worry about signed zeros because we are taking absolute values. So, it is optimal anyway just to inline our own max and min functions that ignore the sign bit, and once we are doing that we can treat NaN however we want for these functions.

In doing so, I noticed and fixed a bug that sqrt(big(NaN)) was throwing a DomainError rather than returning NaN.

stevengj added a commit that referenced this pull request Aug 11, 2015
fix #12552 (norm should return NaN for NaN inputs)
@stevengj stevengj merged commit f74f6ee into JuliaLang:master Aug 11, 2015
@stevengj stevengj deleted the norm_nan branch August 11, 2015 20:35
stevengj added a commit that referenced this pull request Oct 20, 2015
stevengj added a commit that referenced this pull request Oct 20, 2015
…(NaN))

(cherry picked from commit e7e614d)
ref #12564

Fix test syntax to pass on 0.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linear algebra Linear algebra
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants