Example #1
0
File: Trig.cs Project: 65001/AbMath
 public static bool TrigIdentitySinPlusCosRunnable(RPN.Node node)
 {
     return(node.IsAddition() &&
            node[0].IsExponent() &&
            node[1].IsExponent() &&
            node[0, 0].IsNumber(2) &&
            node[1, 0].IsNumber(2) &&
            (node[0, 1].IsFunction("cos") || node[0, 1].IsFunction("sin")) &&
            (node[1, 1].IsFunction("sin") || node[1, 1].IsFunction("cos")) &&
            !node.ChildrenAreIdentical() &&
            !node.ContainsDomainViolation() &&
            node[0, 1, 0].Matches(node[1, 1, 0]));
 }
Example #2
0
 public static bool setRule(RPN.Node node)
 {
     return(node.IsAddition());
 }
Example #3
0
 public static bool LogSummationRunnable(RPN.Node node)
 {
     return(node.IsAddition() && node.Children[0].IsLog() &&
            node.Children[1].IsLog() &&
            node.Children[0].Children[1].Matches(node.Children[1].Children[1]));
 }
Example #4
0
 public static bool setRule(RPN.Node node)
 {
     return(node.IsAddition() || node.IsSubtraction() || node.IsMultiplication() || node.IsExponent() ||
            node.IsDivision());
 }
Example #5
0
 public static bool LnSummationRunnable(RPN.Node node)
 {
     return(node.IsAddition() && node.Children[0].IsLn() && node.Children[1].IsLn());
 }