LunarEngineer opened a new issue, #35620: URL: https://github.com/apache/arrow/issues/35620
### Describe the bug, including details regarding any error messages, version, and platform. When I try to add the integer (here it is INT32) values 3529900000 and 63409 (expected result 3529963409) I get 6340935000. I was converting them to float for the addition when I discovered the oddity. There's no need to convert them to float, so removing that fixes this specific issue from our POV, but the fact that float addition is returning potentially incorrect values is potentially concerning. I am using PyArrow 11.0.0, but I have validated that I experience the same issue in PyArrow 12.0.0. I am using this platform: ```sh PRETTY_NAME="Debian GNU/Linux 11 (bullseye)" NAME="Debian GNU/Linux" VERSION_ID="11" VERSION="11 (bullseye)" VERSION_CODENAME=bullseye ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/" ``` Please let me know if there is any additional troubleshooting you wish me to do. Simple code to reproduce: ```python def test_minimal_viable(): import pyarrow as pa import pyarrow.compute as pc first = pa.chunked_array(pa.array([63409])) last = pa.chunked_array(pa.array([35299])) intsum = pc.add( pc.multiply(first.cast('int32'), pa.scalar(100000)), last.cast('int32') ) floatsum = pc.add( pc.multiply(first.cast('float'), pa.scalar(100000)), last.cast('float') ) raise Exception(f"""PyArrow Float Addition Error I am attempting to add {pc.multiply(first,100000)} and {last}. When I convert them to integer they yield: {intsum} When I convert them to float they yield: {floatsum} """) ``` This yields: E Exception: PyArrow Float Addition Error E E I am attempting to add [ E [ E 6340900000 E ] E ] and [ E [ E 35299 E ] E ]. E E When I convert them to integer they yield: [ E [ E 6340935299 E ] E ] E E When I convert them to float they yield: [ E [ E 6340935000 E ] E ] ### Component(s) Python -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
