tustvold commented on code in PR #3270:
URL: https://github.com/apache/arrow-rs/pull/3270#discussion_r1039031816


##########
arrow-cast/src/cast.rs:
##########
@@ -2044,14 +2044,14 @@ where
 
         let f = |x: I::Native| {
             // div is >= 10 and so this cannot overflow
-            let div = x.div_wrapping(div);
-            let rem = x.mod_wrapping(div);
+            let d = x.div_wrapping(div);
+            let r = x.mod_wrapping(div);

Review Comment:
   This is the mistake, it was computing the remainder with the result of the 
division instead of the scale factor



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