Package jmathexpr.func

Examples of jmathexpr.func.Function.evaluate()


        Variable x = Numbers.variable("x");
        Function exp = new Exp(x);
        System.out.printf("%s%n", exp);
       
        x.setValue(R.create(0));
        evaluated = exp.evaluate();
        System.out.printf("  %s%n", evaluated);
        assertEquals(evaluated, Naturals.one());
       
        x.setValue(R.create(1));
        System.out.printf("  %s%n", exp.evaluate());
View Full Code Here


        evaluated = exp.evaluate();
        System.out.printf("  %s%n", evaluated);
        assertEquals(evaluated, Naturals.one());
       
        x.setValue(R.create(1));
        System.out.printf("  %s%n", exp.evaluate());
       
        Function log = new Log(N.create(10), N.create(1000));
        evaluated = log.evaluate();
        System.out.printf("%s = %s%n", log, evaluated);
        assertEquals(evaluated, N.create(3));
View Full Code Here

       
        x.setValue(R.create(1));
        System.out.printf("  %s%n", exp.evaluate());
       
        Function log = new Log(N.create(10), N.create(1000));
        evaluated = log.evaluate();
        System.out.printf("%s = %s%n", log, evaluated);
        assertEquals(evaluated, N.create(3));
    }
   
    @Test(dependsOnMethods = { "testExponentiation" })
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.