edoddridge / aronnax

An idealised isopycnal model that can be run either with n+1/2 layers, or with n layers and variable bathymetry.
http://aronnax.readthedocs.io/en/latest/
MIT License
24 stars 6 forks source link

Use a 64-bit value for pi #10

Closed axch closed 7 years ago

axch commented 7 years ago

No reason to lose accuracy for a dozen source code characters.

From http://stackoverflow.com/questions/507819/pi-and-accuracy-of-a-floating-point-number, 3.1415926535897932384 should be sufficient.

I am loath to just do this myself until more of the testing is in place. Ideally, from my point of view, I would see accuracy improve (slightly) from making the change. @edoddridge, if you feel differently, don't let me stop you from just editing the file and closing this ticket.

edoddridge commented 7 years ago

Fair point. The value for pi is only used in three places:

Given that the value isn't used directly in the computation, I'm happy just updating it.

axch commented 7 years ago

FYI, if you write Closes #10 or Fixes #10 in the commit log, Github will close the issue automatically. Didn't know whether you knew that. https://help.github.com/articles/closing-issues-via-commit-messages/