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

Experiment with single precision #1

Open
maxpkatz opened this issue Jul 22, 2017 · 0 comments
Open

Experiment with single precision #1

maxpkatz opened this issue Jul 22, 2017 · 0 comments

Comments

@maxpkatz
Copy link
Member

We should compile StarLord in single precision and compare results to double precision (looking at both performance and relative accuracy). Main difficulties are:

  • We sometimes use large numbers in the code like 1.d200, which could be replaced with HUGE()
  • In astro we usually represent physics with numbers that are larger than the single precision floating point range, for example white dwarf systems where the total energy is O(1e50). A solution here is to use scaled numbers in the actual simulation (say, scaled by the maximum value on the domain in the initial conditions) and undo the scaling only for I/O when we need the absolute numbers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant