-
Notifications
You must be signed in to change notification settings - Fork 10
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
Loss of precision with +=
#101
Comments
Suggestions:
|
Number 2 is incorrect: you want to keep |
Updated your suggestion above |
Hmm, I like the dynamically add solution. I guess we need to do something like this then: Where would you suggest putting the python code @robertodr ? A third alternative would be to write:
|
It's true that Stig's suggestion (probably) solves the issue, though using two different implementations for the same things it's not good.1 As to how to implement dynamic attributes in practice. You'd have to add a Python file under Footnotes
|
@robertodr can you write an example of how to use it for a method in I can do it for the other methods and dims once I have the blueprint I tried to do it with a "hello_world" kind of example, but didn't get it to work properly. |
On vacation until 5th July 🥥🌴 |
There is a fix for addition on |
@ilfreddy can you check if this is still an issue? |
@ilfreddy can you check if this is still an issue? If it isn't, please close. |
I can try, but then I need to compile from scratch. Not sure I'm able to 😉 |
It looks like the implementation of the
+=
operator forfunction_tree
s leads to precision loss.The following code (taken from ReMRChem) gives two very different results for
rho
andn
which ideally should be identical.Commit of ReMRChem showing the issue: 2b6052d94ea4f68715f840b62f9cb7
The text was updated successfully, but these errors were encountered: