Spenserrrr commented on PR #58319:
URL: https://github.com/apache/spark/pull/58319#issuecomment-5429808497

   Hi @zhengruifeng! This is a PR to fix the fmod function. The original 
`_fmod_func` cast both operands to double before `try_mod`, so an integral 
operand above 2**53 lost its low bits. Right now, the code takes the remainder 
as longs and only the result is cast back to double. Could you take a look when 
you have time?
   
   While checking the rest of the table, I found the same double cast affects 
`trunc`, `fmax,` and `fmin`. For example, `np.trunc(9007199254740993)` gives 
9007199254740992. I'll follow up on those separately unless you'd rather keep 
them out of scope. Thanks!
   cc @Yicong-Huang 


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