use of edu.jas.ufd.Quotient in project symja_android_library by axkr.
the class JASConvert method quotIntegral2Expr.
/**
* Convert a jas <code>Integral</code> into a matheclipse expression
*
* @param integral
* the JAS Integral
* @return
*/
public IAST quotIntegral2Expr(QuotIntegral<BigRational> integral) {
IAST sum = F.Plus();
List<Quotient<BigRational>> rational = integral.rational;
List<LogIntegral<BigRational>> logarithm = integral.logarithm;
if (rational.size() != 0) {
Quotient<BigRational> qTemp;
GenPolynomial<BigRational> qNum;
GenPolynomial<BigRational> qDen;
for (int i = 0; i < rational.size(); i++) {
qTemp = rational.get(i);
qNum = qTemp.num;
qDen = qTemp.den;
sum.append(F.Times(rationalPoly2Expr(qNum), F.Power(rationalPoly2Expr(qDen), F.CN1)));
}
}
if (logarithm.size() != 0) {
for (LogIntegral<BigRational> pf : logarithm) {
sum.append(logIntegral2Expr(pf));
}
}
return sum;
}
Aggregations