westonpace commented on issue #34901:
URL: https://github.com/apache/arrow/issues/34901#issuecomment-1516820479

   > I would say that if a user wants to control the rounding, they should use 
the round kernel instead of a cast?
   
   The rounding kernel allows for conversion from one valid IEEE value to 
another.  This rounding is about going from an infinite precision value that 
cannot be represented in IEEE to a valid IEEE value.
   
   I'll walk my comment back though.
   
   Technically, IEEE rounding is something that has to be considered in just 
about any operation (e.g. addition, subtraction) because the infinite-precision 
result isn't representable.
   
   In practice, we'd probably be better off just saying we always use 
TIE_TO_EVEN and it's not configurable.  This is what every other engine seems 
to do (TIE_TO_EVEN is the default for most / all modern CPUs).
   
   > It's not super clear from the name, but so we already use the existing 
allow_float_truncate options for the int->float cast (the name suggests to me 
this is mostly about float->int truncating the float if it is not a "round" 
float).
   
   I didn't realize this.  So this issue is about allowing these sorts of casts 
when `safe=true` and the value happens to be representable?  I thought this was 
an ask for a new kind of unsafe cast.
   


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

Reply via email to