You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the min or max value of a Quantity object are set to a very different order of magnitude compared to the actual value, the normalized value that is stored is very close to zero/one. When trying to recover the original value with get_value() machine imprecision leads to a completely wrong result.
To Reproduce
Quantity(10e9,min_val=0e9, max_val=10e30).get_value() will give 0
Expected behavior
Quantity(10e9,min_val=0e9, max_val=10e30).get_value() should return 10e9
Environment
OS: ubuntu18
Python Version: 3.8
The text was updated successfully, but these errors were encountered:
This is a precision error from applying a transform from physical range to [-1, 1]. It has not been working properly if you exactly hit the bound, too, so the corresponding methods (e.g.
Describe the bug
If the min or max value of a Quantity object are set to a very different order of magnitude compared to the actual value, the normalized value that is stored is very close to zero/one. When trying to recover the original value with get_value() machine imprecision leads to a completely wrong result.
To Reproduce
Quantity(10e9,min_val=0e9, max_val=10e30).get_value() will give 0
Expected behavior
Quantity(10e9,min_val=0e9, max_val=10e30).get_value() should return 10e9
Environment
The text was updated successfully, but these errors were encountered: