aherbert commented on code in PR #219:
URL: https://github.com/apache/commons-math/pull/219#discussion_r1002028137
##########
commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/analysis/differentiation/DSCompiler.java:
##########
@@ -1461,9 +1461,7 @@ public void cosh(final double[] operand, final int
operandOffset,
function[0] = JdkMath.cosh(operand[operandOffset]);
if (order > 0) {
function[1] = JdkMath.sinh(operand[operandOffset]);
- for (int i = 2; i <= order; ++i) {
Review Comment:
This is wrong
##########
commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/analysis/differentiation/DSCompiler.java:
##########
@@ -1486,9 +1484,7 @@ public void sinh(final double[] operand, final int
operandOffset,
function[0] = JdkMath.sinh(operand[operandOffset]);
if (order > 0) {
function[1] = JdkMath.cosh(operand[operandOffset]);
- for (int i = 2; i <= order; ++i) {
Review Comment:
This is wrong
##########
commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/analysis/function/Logit.java:
##########
@@ -182,8 +182,8 @@ public DerivativeStructure value(final DerivativeStructure
t)
// for x close to hi the signs will always be +inf)
// this is probably overkill, since the call to compose at the end
// of the method will transform most infinities into NaN ...
- for (int i = 2; i < f.length; ++i) {
Review Comment:
This is wrong. f[0 and f[1] have been set and should be duplicated through
the array.
--
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]