arturobernalg commented on PR #219:
URL: https://github.com/apache/commons-math/pull/219#issuecomment-1287885356

   > I noticed the CI build failure on the same tests in the differentiation 
package. This is because some of the loop copy statements are duplicating the 
first 2 elements through the rest of the array. This is different from a system 
arraycopy which will copy the first two elements to the next two elements. But 
the downstream elements are not duplicates of the first two, they are copies of 
the two previous elements in the original array:
   > 
   > ```
   > data = [a, b, c, d, e, f]
   > 
   > for (int i = 2; i < data.length; ++i) {
   >     data[i] = data[i - 2];
   > }
   > // data = [a, b, a, b, a, b]
   > 
   > arraycopy(data, 0, data, 2, data.length - 2);
   > // data = [a, b, a, b, c, d]
   > ```
   
   Now I'm confused. What soul I do with this PR?


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