jiangjiangtian commented on issue #6827:
URL: 
https://github.com/apache/incubator-gluten/issues/6827#issuecomment-2291108908

   > Hi @jiangjiangtian, here are my thoughts. If we cast double as decimal 
before rounding, how to make sure we obtain the expected decimal? I believe the 
problem with the number `0.55499999999999999` is that we do not have an exact 
representation for it, thus we can not tell if it is simply a representation of 
0.555 or if it should actually be `0.55499999999999999` as you indicated. This 
problem, I believe, also arises when casting a double as a decimal, which could 
potentially produce an unexpected result.
   > 
   > To solve this issue ultimately, I agree with @ArnavBalyan, we need to map 
Spark double type to a higher-precision type in C++ like 
`boost::multiprecision::cpp_dec_float_50` but this will take a lot of work.
   
   Thanks for your reply!
   I think you are right.


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to