Examples of calc()


Examples of org.jamesii.core.math.parsetree.INode.calc()

    node = getInstance(getA(4));
    res2 = node.calc(null);
    assertTrue(res2.getValue().compareTo(Math.sinh(-1.)) == 0);

    node = getInstance(getA(5));
    res2 = node.calc(null);
    assertTrue(res2.getValue().compareTo(Math.sinh(0.)) == 0);

    node =
        getInstance((new MultNode(new ValueNode<>(2), new ValueNode<>(-2.))));
    res2 = node.calc(null);
View Full Code Here

Examples of org.jamesii.core.math.parsetree.INode.calc()

    res2 = node.calc(null);
    assertTrue(res2.getValue().compareTo(Math.sinh(0.)) == 0);

    node =
        getInstance((new MultNode(new ValueNode<>(2), new ValueNode<>(-2.))));
    res2 = node.calc(null);
    assertTrue(res2.getValue().compareTo(Math.sinh(-4.)) == 0);
  }

  @Override
  protected INode getA(int index) {
View Full Code Here

Examples of org.jamesii.core.math.parsetree.INode.calc()

public class TestSqrtNode extends TestValueNodeAbstract<SqrtNode, INode> {

  @Override
  public void testCalc() {
    INode node = getInstance(getA(0));
    ValueNode<Double> res = node.calc(null);
    assertTrue(res.getValue().compareTo(Math.sqrt(1)) == 0);

    node = getInstance(getA(1));
    res = node.calc(null);
    assertTrue(res.getValue().compareTo(Math.sqrt(36)) == 0);
View Full Code Here

Examples of org.jamesii.core.math.parsetree.INode.calc()

    INode node = getInstance(getA(0));
    ValueNode<Double> res = node.calc(null);
    assertTrue(res.getValue().compareTo(Math.sqrt(1)) == 0);

    node = getInstance(getA(1));
    res = node.calc(null);
    assertTrue(res.getValue().compareTo(Math.sqrt(36)) == 0);

    node = getInstance(getA(2));
    res = node.calc(null);
    assertTrue(res.getValue().compareTo(Math.sqrt(0)) == 0);
View Full Code Here

Examples of org.jamesii.core.math.parsetree.INode.calc()

    node = getInstance(getA(1));
    res = node.calc(null);
    assertTrue(res.getValue().compareTo(Math.sqrt(36)) == 0);

    node = getInstance(getA(2));
    res = node.calc(null);
    assertTrue(res.getValue().compareTo(Math.sqrt(0)) == 0);

    node = getInstance(getA(3));
    ValueNode<Double> res2 = node.calc(null);
    assertTrue(res2.getValue().compareTo(Math.sqrt(1.)) == 0);
View Full Code Here

Examples of org.jamesii.core.math.parsetree.INode.calc()

    node = getInstance(getA(2));
    res = node.calc(null);
    assertTrue(res.getValue().compareTo(Math.sqrt(0)) == 0);

    node = getInstance(getA(3));
    ValueNode<Double> res2 = node.calc(null);
    assertTrue(res2.getValue().compareTo(Math.sqrt(1.)) == 0);

    node = getInstance(getA(4));
    res2 = node.calc(null);
    assertTrue(res2.getValue().compareTo(Math.sqrt(9.)) == 0);
View Full Code Here

Examples of org.jamesii.core.math.parsetree.INode.calc()

    node = getInstance(getA(3));
    ValueNode<Double> res2 = node.calc(null);
    assertTrue(res2.getValue().compareTo(Math.sqrt(1.)) == 0);

    node = getInstance(getA(4));
    res2 = node.calc(null);
    assertTrue(res2.getValue().compareTo(Math.sqrt(9.)) == 0);

    node = getInstance(getA(5));
    res2 = node.calc(null);
    assertTrue(res2.getValue().compareTo(Math.sqrt(0.)) == 0);
View Full Code Here

Examples of org.jamesii.core.math.parsetree.INode.calc()

    node = getInstance(getA(4));
    res2 = node.calc(null);
    assertTrue(res2.getValue().compareTo(Math.sqrt(9.)) == 0);

    node = getInstance(getA(5));
    res2 = node.calc(null);
    assertTrue(res2.getValue().compareTo(Math.sqrt(0.)) == 0);

    node = getInstance((new MultNode(new ValueNode<>(2), new ValueNode<>(2.))));
    res2 = node.calc(null);
    assertTrue(res2.getValue().compareTo(Math.sqrt(4.)) == 0);
View Full Code Here

Examples of org.jamesii.core.math.parsetree.INode.calc()

    node = getInstance(getA(5));
    res2 = node.calc(null);
    assertTrue(res2.getValue().compareTo(Math.sqrt(0.)) == 0);

    node = getInstance((new MultNode(new ValueNode<>(2), new ValueNode<>(2.))));
    res2 = node.calc(null);
    assertTrue(res2.getValue().compareTo(Math.sqrt(4.)) == 0);
  }

  @Override
  protected INode getA(int index) {
View Full Code Here

Examples of org.jamesii.core.math.parsetree.INode.calc()

public class TestCeilingNode extends TestValueNodeAbstract<CeilingNode, INode> {

  @Override
  public void testCalc() {
    INode node = getInstance(getA(0));
    ValueNode<Double> res = node.calc(null);
    assertTrue(res.getValue().compareTo(Math.ceil(1)) == 0);

    node = getInstance(getA(1));
    res = node.calc(null);
    assertTrue(res.getValue().compareTo(Math.ceil(-1)) == 0);
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.