public void TestAbsDer() { Entity func = "abs(x + 2)"; var derived = func.Differentiate("x"); Assert.Equal(MathS.Signum("x + 2").Simplify(), derived.Simplify()); }
public void TestSignum2() { var expr = MathS.Signum(x) + 1; var func = expr.Compile(x); Assert.Equal(0, func.Call(-3)); }
[Fact] public void Signum() => Test(@"\operatorname{sgn}\left(x\right)", MathS.Signum(x));