arturobernalg commented on code in PR #217:
URL: https://github.com/apache/commons-math/pull/217#discussion_r1002127274


##########
commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/ode/nonstiff/AdamsNordsieckFieldTransformer.java:
##########
@@ -170,9 +170,9 @@ private AdamsNordsieckFieldTransformer(final Field<T> 
field, final int n) {
         // Nordsieck to multistep, then shifting rows to represent step advance
         // then applying inverse transform
         T[][] shiftedP = bigP.getData();
-        for (int i = shiftedP.length - 1; i > 0; --i) {
-            // shift rows
-            shiftedP[i] = shiftedP[i - 1];
+        // shift rows
+        if (shiftedP.length - 1 >= 0) {

Review Comment:
   done.



##########
commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/fitting/SimpleCurveFitter.java:
##########
@@ -318,8 +317,8 @@ private WeightedObservedPoint[] 
getInterpolationPointsForY(WeightedObservedPoint
         private boolean isBetween(double value,
                                   double boundary1,
                                   double boundary2) {
-            return (value >= boundary1 && value <= boundary2) ||

Review Comment:
   done.



##########
commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/analysis/differentiation/SparseGradient.java:
##########
@@ -393,7 +371,7 @@ public SparseGradient copySign(final SparseGradient sign) {
     public SparseGradient copySign(final double sign) {
         final long m = Double.doubleToLongBits(value);
         final long s = Double.doubleToLongBits(sign);
-        if ((m >= 0 && s >= 0) || (m < 0 && s < 0)) { // Sign is currently OK

Review Comment:
   done.



##########
commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/analysis/differentiation/SparseGradient.java:
##########
@@ -382,7 +360,7 @@ public SparseGradient signum() {
     public SparseGradient copySign(final SparseGradient sign) {
         final long m = Double.doubleToLongBits(value);
         final long s = Double.doubleToLongBits(sign.value);
-        if ((m >= 0 && s >= 0) || (m < 0 && s < 0)) { // Sign is currently OK

Review Comment:
   done.



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