[
https://issues.apache.org/jira/browse/MATH-1569?focusedWorklogId=819378&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-819378
]
ASF GitHub Bot logged work on MATH-1569:
----------------------------------------
Author: ASF GitHub Bot
Created on: 22/Oct/22 19:05
Start Date: 22/Oct/22 19:05
Worklog Time Spent: 10m
Work Description: 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?
Issue Time Tracking
-------------------
Worklog Id: (was: 819378)
Time Spent: 1.5h (was: 1h 20m)
> Manual array copy
> -----------------
>
> Key: MATH-1569
> URL: https://issues.apache.org/jira/browse/MATH-1569
> Project: Commons Math
> Issue Type: Sub-task
> Reporter: Arturo Bernal
> Priority: Minor
> Time Spent: 1.5h
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)