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
Hey team, I hope all of you are doing well in these times.
So I have a question, related to calculation precision. I am not that knowledgeable with Python, so I cannot propose a concrete solution.
The issue is that for calculation as a type float is being used as a type, which leads to unstable calculations because of decimals.
I think this can pose a really big issue and is a no-go for us to use this. When decimals are being calculated and everything depends on the floating-point, something else should be used. Because it really depends on which CPU is the machine using, and what is the state of that CPU.
In the Java world, the solution is BigDecimal or a custom implementation.
Hey team, I hope all of you are doing well in these times.
So I have a question, related to calculation precision. I am not that knowledgeable with Python, so I cannot propose a concrete solution.
The issue is that for calculation as a type
float
is being used as a type, which leads to unstable calculations because of decimals.I think this can pose a really big issue and is a no-go for us to use this. When decimals are being calculated and everything depends on the floating-point, something else should be used. Because it really depends on which CPU is the machine using, and what is the state of that CPU.
In the Java world, the solution is
BigDecimal
or a custom implementation.For an example
Prints a different result every time.
Is there a plan to resolve this in the near future?
EDIT:
Also, this would apply to all calculations inside the app with float as a type
The text was updated successfully, but these errors were encountered: