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

Core: provide double precision getters or change APIs #477

Closed
GPMueller opened this issue Dec 4, 2018 · 2 comments
Closed

Core: provide double precision getters or change APIs #477

GPMueller opened this issue Dec 4, 2018 · 2 comments

Comments

@GPMueller
Copy link
Member

I did not realize that float had such horrible precision... Only 7 digits https://stackoverflow.com/a/3498243/4069571
chain.get_energy for example will therefore return extremely imprecise results.

This should be changed either in the APIs, or by adding API functions which return doubles.

@GPMueller
Copy link
Member Author

The only drawback of using the scalar alias would be that the web-UI that goes through the C API would have to be built with single precision, because the API needs to be single precision.

Currently, @MSallermann and I agree that that would be the better tradeoff vs both of

  • duplicating most of the APIs
  • limiting the APIs to single precision

@GPMueller
Copy link
Member Author

Fixed by PR #628, which was merged into develop with becc531

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant