Пример #1
0
 public override void CopyDerivedFunctionToStack(ExpressionTree cur, ExpressionTree inner, StaticStack<MathOperation> DeriveStack, MathState State)
 {
     //ln(x)' = 1/x
     // 1 x /
     DeriveStack.Push((Number)1);
     inner.CopyToStack(DeriveStack);
     DeriveStack.Push(State.GetOperator("/"));
 }
Пример #2
0
                public override void CopyDerivedFunctionToStack(ExpressionTree cur, ExpressionTree inner, StaticStack<MathOperation> DeriveStack, MathState State)
                {
                    //sqrt(x)' = 1/(x * ln 10)
                    // 1 x 10 ln * /

                    DeriveStack.Push((Number)1);
                    inner.CopyToStack(DeriveStack);
                    DeriveStack.Push((Number)10,State.GetFunction("ln"),State.GetOperator("*"), State.GetOperator("/"));
                }
Пример #3
0
 public override void CopyDerivedFunctionToStack(ExpressionTree cur, ExpressionTree inner, StaticStack<MathOperation> DeriveStack,MathState State)
 {
     inner.CopyToStack(DeriveStack);
     DeriveStack.Push(State.GetFunction("sin"), (Number)(-1), State.GetOperator("*"));
 }
Пример #4
0
 public override void CopyDerivedFunctionToStack(ExpressionTree cur, ExpressionTree inner, StaticStack<MathOperation> DeriveStack, MathState State)
 {
     //sqrt(x)' = 1/(2*sqrt(x))
     // 1 2 x sqrt * /
     DeriveStack.Push((Number)1,(Number)2);
     inner.CopyToStack(DeriveStack);
     DeriveStack.Push(State.GetFunction("sqrt"), State.GetOperator("*"), State.GetOperator("/"));
 }
Пример #5
0
 public override void CopyDerivedFunctionToStack(ExpressionTree cur,ExpressionTree inner, StaticStack<MathOperation> DeriveStack,MathState State)
 {
     inner.CopyToStack(DeriveStack);
     DeriveStack.Push(State.GetFunction("cos"));
 }