|
| 1 | +// |
| 2 | +// Copyright (c) 2019-2026 Angouri. |
| 3 | +// AngouriMath is licensed under MIT. |
| 4 | +// Details: https://github.com/asc-community/AngouriMath/blob/master/LICENSE.md. |
| 5 | +// Website: https://am.angouri.org. |
| 6 | +// |
| 7 | + |
| 8 | +using AngouriMath.Core; |
| 9 | +using AngouriMath.Extensions; |
| 10 | +using Xunit; |
| 11 | + |
| 12 | +namespace AngouriMath.Tests.Calculus |
| 13 | +{ |
| 14 | + /// <summary> |
| 15 | + /// A sign read through a change of variable puts a real t for a part u, so u has to be real on the side approached. |
| 16 | + /// ln(x) on the left of 0 is ln|x| + i pi, and e^ln(x), which is x and negative there, was read as e^t at -oo, which is |
| 17 | + /// positive: floor(e^ln(x)) at 0 from the left was 0 and sgn(e^ln(x)) was 1, where both are -1. They are declined now, |
| 18 | + /// as they were in 2.6.0. Found by limitcheck; no issue was filed. |
| 19 | + /// </summary> |
| 20 | + [Trait("Area", "Calculus")] |
| 21 | + public sealed class AComplexPartIsNotARealVariableTest |
| 22 | + { |
| 23 | + [Theory] |
| 24 | + [InlineData("floor(exp(ln(x)))", ApproachFrom.Left)] |
| 25 | + [InlineData("floor(exp(ln(x)))", ApproachFrom.BothSides)] |
| 26 | + [InlineData("sgn(exp(ln(x)))", ApproachFrom.Left)] |
| 27 | + [InlineData("floor(exp(ln(x)) + 1)", ApproachFrom.Left)] |
| 28 | + public void ThePositiveReadingIsNotGiven(string input, ApproachFrom side) |
| 29 | + => Assert.IsType<Entity.Limitf>(input.ToEntity().Limit("x", 0, side)); |
| 30 | + |
| 31 | + [Fact] |
| 32 | + public void TheRightSideIsStillAnswered() |
| 33 | + => Assert.Equal(MathS.FromString("0"), "floor(exp(ln(x)))".ToEntity().Limit("x", 0, ApproachFrom.Right).Evaled); |
| 34 | + } |
| 35 | +} |
0 commit comments