Skip to content

Commit

Permalink
use hipparchus version 4.0-SNAPSHOT - implement new getAddendum()
Browse files Browse the repository at this point in the history
  • Loading branch information
axkr committed Sep 28, 2024
1 parent 968b706 commit 13ed24a
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -943,6 +943,11 @@ public IExpr gegenbauerC(IExpr arg2, IExpr arg3) {
return IComplexNum.super.gegenbauerC(arg2, arg3);
}

@Override
public IExpr getAddendum() {
return valueOf(Apfloat.ZERO, fApcomplex.imag());
}

public Complex getCMComplex() {
return new Complex(fApcomplex.real().doubleValue(), fApcomplex.imag().doubleValue());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import org.apfloat.NumericComputationException;
import org.apfloat.OverflowException;
import org.matheclipse.core.basic.Config;
import org.matheclipse.core.basic.OperationSystem;
import org.matheclipse.core.eval.Errors;
import org.matheclipse.core.eval.EvalEngine;
import org.matheclipse.core.interfaces.IComplexNum;
Expand Down Expand Up @@ -967,6 +966,11 @@ public IExpr gegenbauerC(IExpr arg2, IExpr arg3) {
return INum.super.gegenbauerC(arg2, arg3);
}

@Override
public IExpr getAddendum() {
return isFinite() ? valueOf(fApfloat.subtract(fApfloat.real())) : zero();
}

@Override
public ApfloatNum getPi() {
return valueOf(EvalEngine.getApfloat().pi());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import org.hipparchus.complex.Complex;
import org.hipparchus.exception.NullArgumentException;
import org.matheclipse.core.basic.Config;
import org.matheclipse.core.basic.OperationSystem;
import org.matheclipse.core.builtin.Arithmetic;
import org.matheclipse.core.builtin.functions.HypergeometricJS;
import org.matheclipse.core.eval.Errors;
Expand Down Expand Up @@ -1015,6 +1014,11 @@ public double getImaginaryPart() {
return temp;
}

@Override
public IExpr getAddendum() {
return F.complexNum(new Complex(0, fComplex.getImaginary()));
}

@Override
public IExpr getPi() {
return F.num(Math.PI);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import org.hipparchus.complex.Complex;
import org.hipparchus.util.MathUtils;
import org.matheclipse.core.basic.Config;
import org.matheclipse.core.basic.OperationSystem;
import org.matheclipse.core.builtin.functions.HypergeometricJS;
import org.matheclipse.core.eval.Errors;
import org.matheclipse.core.eval.EvalEngine;
Expand Down Expand Up @@ -1019,6 +1018,11 @@ public IExpr gegenbauerC(IExpr arg2, IExpr arg3) {
return INum.super.gegenbauerC(arg2, arg3);
}

@Override
public IExpr getAddendum() {
return zero();
}

@Override
public Num getPi() {
return F.num(Math.PI);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1767,6 +1767,11 @@ default IExpr getAt(final int index) {
return S.Part.of(this, F.ZZ(index));
}

@Override
default IExpr getAddendum() {
return isFinite() ? subtract(re()) : zero();
}

@Override
public default Field<IExpr> getField() {
return F.EXPR_FIELD;
Expand Down
10 changes: 5 additions & 5 deletions symja_android_library/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -243,27 +243,27 @@
<dependency>
<groupId>org.hipparchus</groupId>
<artifactId>hipparchus-clustering</artifactId>
<version>3.2-SNAPSHOT</version>
<version>4.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.hipparchus</groupId>
<artifactId>hipparchus-fft</artifactId>
<version>3.2-SNAPSHOT</version>
<version>4.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.hipparchus</groupId>
<artifactId>hipparchus-fitting</artifactId>
<version>3.2-SNAPSHOT</version>
<version>4.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.hipparchus</groupId>
<artifactId>hipparchus-ode</artifactId>
<version>3.2-SNAPSHOT</version>
<version>4.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.hipparchus</groupId>
<artifactId>hipparchus-optim</artifactId>
<version>3.2-SNAPSHOT</version>
<version>4.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.jgrapht</groupId>
Expand Down

0 comments on commit 13ed24a

Please sign in to comment.