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

Safe a call to sqrt by wrapping its argument in fabs. #423

Merged
merged 1 commit into from
Jun 26, 2018

Conversation

kgbudge
Copy link
Contributor

@kgbudge kgbudge commented Jun 26, 2018

The variances whose sqrt are taken in the timer output code are formally positive indefinite, but roundof will sometimes make them very slightly negative and trigger a floating point exception. Wrapping in fabs is a perfectly adequate fix, since the result printed will be zero, which is the right printed value.

Status

The quantities wrapped in fabs in the timer output code are formally positive indefinite, but roundoff error will sometimes make them very slightly negative. Wrappiong in fabs is a perfectly adequate fix, since the result printed will be zero, which is the right printed value.
@kgbudge kgbudge added the bug label Jun 26, 2018
@KineticTheory KineticTheory merged commit cab62a5 into lanl:develop Jun 26, 2018
@kgbudge kgbudge deleted the timer branch June 27, 2018 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants