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

Hotfix inaccurate Pi value #73

Merged
merged 5 commits into from
Feb 19, 2021
Merged

Hotfix inaccurate Pi value #73

merged 5 commits into from
Feb 19, 2021

Conversation

zhucaoxiang
Copy link
Collaborator

There is a funny/strange bug.

In the code, the value of Pi is assigned by REAL, parameter :: pi = 3.141592653589793238462643383279502884197, while REAL will be replaced by real(dp) in the macros (dp is double-precision specification). For some reason, the actual Pi value used during the runtime is 3.1415927410125732. The numbers after the 7-th digit are incorrect and cause some finite error.

Previously, REAL was interpreted as real and the default option of using 8 bytes for floating numbers was turned on. The Pi value was read correctly.

The fix in this PR is to use REAL, parameter :: pi = acos(-1.0_dp) and Pi value is now correct.

A fix to the HDF5 module for the IPP cluster is also included (#70 ).

FAMUS (the dipole branch) will also be updated. If you are using other branches, please remember the develop branch.

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

Successfully merging this pull request may close these issues.

6 participants