spirit-code / spirit

Atomistic Spin Simulation Framework
http://spirit-code.github.io
MIT License
118 stars 52 forks source link

Core: provide double precision getters or change APIs #477

Closed GPMueller closed 1 year ago

GPMueller commented 5 years ago

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 commented 1 year ago

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

GPMueller commented 1 year ago

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