[ 
https://issues.apache.org/jira/browse/ARROW-10234?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Praveen Kumar resolved ARROW-10234.
-----------------------------------
    Fix Version/s: 2.0.0
       Resolution: Fixed

Issue resolved by pull request 8398
[https://github.com/apache/arrow/pull/8398]

> [C++][Gandiva] Fix logic of round() for floats/decimals in Gandiva
> ------------------------------------------------------------------
>
>                 Key: ARROW-10234
>                 URL: https://issues.apache.org/jira/browse/ARROW-10234
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: C++ - Gandiva
>            Reporter: Sagnik Chakraborty
>            Assignee: Sagnik Chakraborty
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 2.0.0
>
>          Time Spent: 2h 50m
>  Remaining Estimate: 0h
>
> round() for floats/doubles is returning incorrect results for some edge 
> cases, like round(cast(1.55 as float), 1) gives 1.6, but it should be 1.5, 
> since the result after casting to float comes to 1.5499999523162842, due to 
> inaccurate representation of floating point numbers in memory. Removing an 
> intermediate explicit cast to float statement for a double value, which is 
> used in subsequent computations, minimises the error introduced due to the 
> incorrect representation.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to