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

step-3: use a double for the RHS #10918

Merged
merged 1 commit into from Sep 15, 2020
Merged

Conversation

tjhei
Copy link
Member

@tjhei tjhei commented Sep 15, 2020

No description provided.

@bangerth
Copy link
Member

Does it matter? I can see the value, but would have written it as 1.0.

@tjhei
Copy link
Member Author

tjhei commented Sep 15, 2020

Does it matter?

I prefer to always write floating point values as floating point values. This way, it is obvious for the reader and (admittedly not in this situation) avoids mistakes that come from integer math producing wrong results.

I have seen too many mistakes around this. This is an instance of "defensive programming", which I know you are a fan of (1). :-)

but would have written it as 1.0.

I don't care much either way.

@bangerth
Copy link
Member

I double checked, and we're using 0. and 1. in so many other places that it's not worth thinking about this one place.

@bangerth bangerth merged commit f6c1864 into dealii:master Sep 15, 2020
@tjhei tjhei deleted the step_3_double_rhs branch September 15, 2020 23:43
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.

None yet

3 participants