Package jmathexpr.func

Examples of jmathexpr.func.Function


   
    @Test(dependsOnMethods = { "testSum" })
    public void testFunctions() {
        Expression evaluated;
        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());
       
        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

TOP

Related Classes of jmathexpr.func.Function

Copyright © 2018 www.massapicom. 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.