Package jmathexpr.arithmetic.op

Examples of jmathexpr.arithmetic.op.Multiplication.evaluate()


        assertEquals(evaluated, new LongRationalNumber(1, 2));
       
        Expression product = new Multiplication(new LongRationalNumber(2, 3), new LongRationalNumber(9, 2));
        ElementOf isNatural = new ElementOf(product, N);
        evaluated = isNatural.evaluate();
        System.out.printf("%s = %s : %s%n", product.evaluate(), isNatural, evaluated);
        assertEquals(evaluated, TruthValue.True);
       
        System.out.println(Q.create("-3.750"));
    }
   
View Full Code Here


        NaturalNumber two = N.create(2);
        Addition seven = new Addition(five, two);
        NaturalNumber six = N.create("6");
        Expression naturalExpr = new Multiplication(six, seven);
       
        evaluated = naturalExpr.evaluate();
        System.out.printf("%s = %s%n", naturalExpr, evaluated);       
        assertEquals(evaluated, N.create(42));
       
        Expression equality = new Equality(naturalExpr, N.create(42));
        evaluated = equality.evaluate();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.