Search in sources :

Example 6 with BigFraction

use of org.hipparchus.fraction.BigFraction in project symja_android_library by axkr.

the class FractionTestCase method assertEquals.

private static void assertEquals(String expected, IExpr actual) {
    if (actual instanceof IFraction) {
        BigFraction bigFraction = ((IFraction) actual).toBigFraction();
        Assertions.assertEquals(expected, bigFraction.toString().replaceAll("[\\s]", ""));
    }
}
Also used : IFraction(org.matheclipse.core.interfaces.IFraction) BigFraction(org.hipparchus.fraction.BigFraction)

Aggregations

BigFraction (org.hipparchus.fraction.BigFraction)6 IFraction (org.matheclipse.core.interfaces.IFraction)3 BigInteger (java.math.BigInteger)2 IExpr (org.matheclipse.core.interfaces.IExpr)2 IInteger (org.matheclipse.core.interfaces.IInteger)2 IAST (org.matheclipse.core.interfaces.IAST)1 IComplex (org.matheclipse.core.interfaces.IComplex)1 IComplexNum (org.matheclipse.core.interfaces.IComplexNum)1 INum (org.matheclipse.core.interfaces.INum)1 IRational (org.matheclipse.core.interfaces.IRational)1 ISymbol (org.matheclipse.core.interfaces.ISymbol)1