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
ROUND() bug #7303
Comments
Already answered at #1772 |
Pasting hvlad comment from #1772 here, then my own notes, hvlad had said: You may check it with many tools, for example. And my notes: The example was simplification, the actual issue is with calculations... I reread the IEEE double definition and realized it says doubles are So for rounding to work the way I was thinking FB would have to You'd think after 40 years at this I would have remembered how this works
|
If you need exact decimal calculations you should use (starting with
FB4) DECFLOAT instead DOUBLE PRECISION. It does exactly what you want,
including configurable rounding rules.
|
@AlexPeshkoff , I don't see configurable rounding rules in firebird.conf. |
On 9/14/22 11:38, EPluribusUnum wrote:
@AlexPeshkoff <https://github.com/AlexPeshkoff> , I don't see
configurable rounding rules in firebird.conf.
How can I control rounding in FB40?
doc/sql.extensions/README.data_types
Also calculation precision contol is possible?
No, only have 16 or 34 digits, depending upon chosen datatype
For explicit calculation precision contol use DECIMAL(n)
|
Round() is broken for FLOAT and DOUBLE PRECISION
Tested with 3.10 on Win64 only
Updated #1772 (very old) but not sure the issue is exactly the same
Expected: 4.02
Expected: 4.02
The text was updated successfully, but these errors were encountered: