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

Incorrect Division #375

Closed
ramyatamehrotra opened this issue Aug 24, 2018 · 1 comment
Closed

Incorrect Division #375

ramyatamehrotra opened this issue Aug 24, 2018 · 1 comment

Comments

@ramyatamehrotra
Copy link

If you look at the query below, you will observe that when two numbers which have six decimal places where at least the last digit is 0, the result of the division is incorrect.

Operating system name and version - CentOS 6
Presto Version - 0.167-T.0.9
Any details about your local setup that might be helpful in troubleshooting - N/A
Detailed steps to reproduce the bug - See the query below for reference.

Query:
select 2154 as numerator
, 2736 as denominator
, 2158.888 * 1.0000/2738.888 as correct_calc
, 2158.88800 * 1.0000/2738.88800 as correct_calc1
, 2158.888000 * 1.0000/2738.888000 as bug
;

Result:
numerator | denominator | correct_calc | correct_calc1 | bug
2154 | 2736 | 0.7882 | 0.7882 | 0.5442

@findepi
Copy link
Contributor

findepi commented Aug 25, 2018

This doesn't look like presto-admin issue. If you wanted to report an issue for Presto, https://github.com/prestodb/presto/issues would be the right place. Let me close this one.

Presto Version - 0.167-T.0.9

0.167 is pretty old version. If you report your issue at https://github.com/prestodb/presto/issues, the first question will probably be "does it reproduce on some recent release?".

@findepi findepi closed this as completed Aug 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants