Beispiel #1
0
        public void TestAbsDer()
        {
            Entity func    = "abs(x + 2)";
            var    derived = func.Differentiate("x");

            Assert.Equal(MathS.Signum("x + 2").Simplify(), derived.Simplify());
        }
Beispiel #2
0
        public void TestSignum2()
        {
            var expr = MathS.Signum(x) + 1;
            var func = expr.Compile(x);

            Assert.Equal(0, func.Call(-3));
        }
Beispiel #3
0
 [Fact] public void Signum()
 => Test(@"\operatorname{sgn}\left(x\right)", MathS.Signum(x));