Package org.jamesii.core.math.parsetree.math

Examples of org.jamesii.core.math.parsetree.math.MultNode


    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);
    assertTrue(res2.getValue().compareTo(Math.sinh(-4.)) == 0);
  }
View Full Code Here


    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

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

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

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

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

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

    node =
        getInstance(new ListNode(toList(new MultNode(new ValueNode<>(2),
            new ValueNode<>(-2.)))));
    res = node.calc(null);
    assertTrue(res.getValue().compareTo(1) == 0);

    node =
        getInstance(new ListNode(toList(new MultNode(new ValueNode<>(2),
            new ValueNode<>(-2.)), new MultNode(new ValueNode<>(2),
            new ValueNode<>(-3.)))));
    res = node.calc(null);
    assertTrue(res.getValue().compareTo(2) == 0);
  }
View Full Code Here

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

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

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

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

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

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

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

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

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

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

TOP

Related Classes of org.jamesii.core.math.parsetree.math.MultNode

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.