Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ Sumf or Minusf when CollectCommonFactors(x) is { } collected => collected,
/// </summary>
/// <remarks>
/// The pairwise rules only ever see two adjacent terms of the sum tree, so a sum of
/// four was left half-factored at <c>a*(c + d) + b*c + b*d</c> -- that is #531. Sums
/// four was left half-factored at <c>a*(c + d) + b*c + b*d</c> -- that is
/// https://github.com/asc-community/AngouriMath/issues/531. Sums
/// of two are left to those rules, which are older and better tested.
/// </remarks>
/// <returns><see langword="null"/> when no factor is shared, so the rule does not fire.</returns>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ internal static partial class Patterns
/// ever reached for numeric angles that are multiples of pi. Nothing opened a
/// symbolic <c>sin(2x)</c>, so <c>cos(2x) - (1 - 2sin(x)^2)</c> did not reduce to
/// zero and neither did <c>(sin(2t)csc(t))^2/4 - cos(2t) - sin(t)^2</c>, which is
/// #557.
/// https://github.com/asc-community/AngouriMath/issues/557.
/// </remarks>
internal static Entity ExpandMultipleAngleRules(Entity x) => x switch
{
Expand Down
3 changes: 2 additions & 1 deletion Sources/Tests/UnitTests/Calculus/IntegrationTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,8 @@ public void Test2()
var expr = MathS.Sin(x);
// Quadrature over a symmetric interval leaves a residual around 1e-17, which
// downcasting used to round away. It no longer does, because the same rounding
// was destroying every legitimate small number (see IssueRegressionTest, #602).
// was destroying every legitimate small number (see IssueRegressionTest, and
// https://github.com/asc-community/AngouriMath/issues/602).
// Asserted the way Test1 and Test3 assert, against the method's own accuracy.
Assert.True(MathS.Compute.DefiniteIntegral(expr, x, -1, 1).Abs() < 1e-15);
}
Expand Down
3 changes: 2 additions & 1 deletion Sources/Tests/UnitTests/Common/AlreadyFixedIssuesTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ public void Issue415_IntervalsUnite() =>

// https://github.com/asc-community/AngouriMath/issues/550
// The reporter's small system did not solve. The 25x26 one from the same report
// is a question of scale and is tracked separately at #608.
// is a question of scale and is tracked separately at
// https://github.com/asc-community/AngouriMath/issues/608.
[Fact]
public void Issue550_SmallLinearSystemSolves()
{
Expand Down
6 changes: 4 additions & 2 deletions Sources/Tests/UnitTests/Common/NumericsRegressionTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@
$"round-trip of {text} gave {back}");
}

// Adjacent to #584: a zero integer part used to render as the empty string,
// Adjacent to https://github.com/asc-community/AngouriMath/issues/584:
// a zero integer part used to render as the empty string,
// so ToBaseN(0.5m, 2) produced ".1" and ToBaseN(0m, 2) produced "".
[Theory]
[InlineData(0, 2, "0")]
Expand Down Expand Up @@ -171,7 +172,8 @@
// https://github.com/asc-community/AngouriMath/issues/561
// The reporter's 4x4 matrix spans 1e5 to 1e50, so entries of its inverse fall
// below 1e-16 and downcasting rounded them to zero. Fixed by the same change as
// #602; pinned here because the matrix path reaches it by its own route.
// https://github.com/asc-community/AngouriMath/issues/602;
// pinned here because the matrix path reaches it by its own route.
[Fact]
public void Issue561_LargeValuedMatrixInvertsExactly()
{
Expand All @@ -182,7 +184,7 @@
{ 20692733745923116440.0, 985012471441596398530723840.0, 53035823659846109665657533505732608.0, 3088144109088191970827418502918634458841088.0 },
{ 985012471441596398530723840.0, 53035823659846109665657533505732608.0, 3088144109088191970827418502918634458841088.0, 190454802288659943182846234171424053458511757049856.0 }
});
var product = (Entity.Matrix)(matrix * matrix.Inverse).InnerSimplified;

Check warning on line 187 in Sources/Tests/UnitTests/Common/NumericsRegressionTest.cs

View workflow job for this annotation

GitHub Actions / Test (windows-latest)

Possible null reference argument for parameter 'm2' in 'Matrix Matrix.operator *(Matrix m1, Matrix m2)'.

Check warning on line 187 in Sources/Tests/UnitTests/Common/NumericsRegressionTest.cs

View workflow job for this annotation

GitHub Actions / Test (windows-latest)

Possible null reference argument for parameter 'm2' in 'Matrix Matrix.operator *(Matrix m1, Matrix m2)'.

Check warning on line 187 in Sources/Tests/UnitTests/Common/NumericsRegressionTest.cs

View workflow job for this annotation

GitHub Actions / Test (macos-latest)

Possible null reference argument for parameter 'm2' in 'Matrix Matrix.operator *(Matrix m1, Matrix m2)'.

Check warning on line 187 in Sources/Tests/UnitTests/Common/NumericsRegressionTest.cs

View workflow job for this annotation

GitHub Actions / Test (macos-latest)

Possible null reference argument for parameter 'm2' in 'Matrix Matrix.operator *(Matrix m1, Matrix m2)'.

Check warning on line 187 in Sources/Tests/UnitTests/Common/NumericsRegressionTest.cs

View workflow job for this annotation

GitHub Actions / Test (macos-latest)

Possible null reference argument for parameter 'm2' in 'Matrix Matrix.operator *(Matrix m1, Matrix m2)'.

Check warning on line 187 in Sources/Tests/UnitTests/Common/NumericsRegressionTest.cs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

Possible null reference argument for parameter 'm2' in 'Matrix Matrix.operator *(Matrix m1, Matrix m2)'.

Check warning on line 187 in Sources/Tests/UnitTests/Common/NumericsRegressionTest.cs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

Possible null reference argument for parameter 'm2' in 'Matrix Matrix.operator *(Matrix m1, Matrix m2)'.

Check warning on line 187 in Sources/Tests/UnitTests/Common/NumericsRegressionTest.cs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

Possible null reference argument for parameter 'm2' in 'Matrix Matrix.operator *(Matrix m1, Matrix m2)'.
Assert.Equal(MathS.IdentityMatrix(4), product);
}

Expand Down
3 changes: 2 additions & 1 deletion Sources/Tests/UnitTests/PatternsTest/MultipleAngleTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ public void IdentitiesReduceToZero(string input) =>
// The same identity written as cos(2x) - (2cos(x)^2 - 1) gets as far as
// 1 - cos(x)^2 - sin(x)^2 and stops: sin^2 + cos^2 = 1 is matched as a pair, and
// there the pair sits either side of a subtraction. That is the same
// pairwise-versus-flattened gap as #531, in a product of trigonometric terms
// pairwise-versus-flattened gap as
// https://github.com/asc-community/AngouriMath/issues/531, in a product of trigonometric terms
// rather than a sum, and is not something opening the angle can reach.
[Fact]
public void PythagoreanPairAcrossASubtractionIsStillMissed() =>
Expand Down
Loading