Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 61f8ccb9f79c
Choose a base ref
...
head repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: e7aa2800f588
Choose a head ref
  • 3 commits
  • 2 files changed
  • 1 contributor

Commits on Sep 20, 2020

  1. Fix project file.

    pleroy committed Sep 20, 2020
    Copy the full SHA
    f7ea2eb View commit details
  2. Copy the full SHA
    e22f78e View commit details
  3. Merge pull request #2723 from pleroy/Tolerances

    Tolerances for Linux/macOS
    pleroy authored Sep 20, 2020
    Copy the full SHA
    e7aa280 View commit details
Showing with 10 additions and 9 deletions.
  1. +2 −1 numerics/numerics.vcxproj.filters
  2. +8 −8 numerics/quadrature_test.cpp
3 changes: 2 additions & 1 deletion numerics/numerics.vcxproj.filters
Original file line number Diff line number Diff line change
@@ -166,6 +166,7 @@
</ClInclude>
<ClInclude Include="legendre_roots.mathematica.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="quadrature.hpp">
<Filter>Header Files</Filter>
</ClInclude>
@@ -259,7 +260,7 @@
<Filter>Test Files</Filter>
</ClCompile>
<ClCompile Include="quadrature_test.cpp">
<Filter>Source Files</Filter>
<Filter>Test Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
16 changes: 8 additions & 8 deletions numerics/quadrature_test.cpp
Original file line number Diff line number Diff line change
@@ -45,17 +45,17 @@ TEST_F(QuadratureTest, Sin) {
EXPECT_THAT(GaussLegendre<9>(f, -2.0 * Radian, 5.0 * Radian),
RelativeErrorFrom(ʃf, IsNear(4.8e-11_⑴)));
EXPECT_THAT(GaussLegendre<10>(f, -2.0 * Radian, 5.0 * Radian),
AlmostEquals(ʃf, 2498));
AlmostEquals(ʃf, 2495, 2498));
EXPECT_THAT(GaussLegendre<11>(f, -2.0 * Radian, 5.0 * Radian),
AlmostEquals(ʃf, 20));
EXPECT_THAT(GaussLegendre<12>(f, -2.0 * Radian, 5.0 * Radian),
AlmostEquals(ʃf, 6));
AlmostEquals(ʃf, 6, 7));
EXPECT_THAT(GaussLegendre<13>(f, -2.0 * Radian, 5.0 * Radian),
AlmostEquals(ʃf, 1));
AlmostEquals(ʃf, 0, 1));
EXPECT_THAT(GaussLegendre<14>(f, -2.0 * Radian, 5.0 * Radian),
AlmostEquals(ʃf, 1));
AlmostEquals(ʃf, 1, 2));
EXPECT_THAT(GaussLegendre<15>(f, -2.0 * Radian, 5.0 * Radian),
AlmostEquals(ʃf, 4));
AlmostEquals(ʃf, 3, 4));
}

TEST_F(QuadratureTest, Sin10) {
@@ -88,11 +88,11 @@ TEST_F(QuadratureTest, Sin10) {
EXPECT_THAT(GaussLegendre<13>(f, -2.0 * Radian, 5.0 * Radian),
RelativeErrorFrom(ʃf, IsNear(3.7e-12_⑴)));
EXPECT_THAT(GaussLegendre<14>(f, -2.0 * Radian, 5.0 * Radian),
AlmostEquals(ʃf, 422));
AlmostEquals(ʃf, 422, 425));
EXPECT_THAT(GaussLegendre<15>(f, -2.0 * Radian, 5.0 * Radian),
AlmostEquals(ʃf, 44));
AlmostEquals(ʃf, 36, 50));
EXPECT_THAT(GaussLegendre<16>(f, -2.0 * Radian, 5.0 * Radian),
AlmostEquals(ʃf, 152));
AlmostEquals(ʃf, 152, 159));
}

} // namespace quadrature