diff --git a/functions/std_accuracy_test.cpp b/functions/std_accuracy_test.cpp index 4ac4fecd61..728f5c5523 100644 --- a/functions/std_accuracy_test.cpp +++ b/functions/std_accuracy_test.cpp @@ -18,7 +18,6 @@ namespace functions { namespace _multiprecision { using ::testing::AnyOf; -using ::testing::Eq; using namespace boost::multiprecision; using namespace principia::quantities::_si; using namespace principia::testing_utilities::_almost_equals; @@ -66,8 +65,13 @@ TEST_F(StdAccuracyTest, SinCos) { max_cos_ulp_distance = std::max(max_cos_ulp_distance, ULPDistance(std::cos(α), Cos(α))); } - EXPECT_THAT(max_sin_ulp_distance, IsNear(0.727_(1))); - EXPECT_THAT(max_cos_ulp_distance, IsNear(0.834_(1))); + EXPECT_THAT(max_sin_ulp_distance, + AnyOf(IsNear(0.727_(1)), // Windows. + IsNear(0.654_(1)), // macOS. + IsNear(0.513_(1)))); // Ubuntu. + EXPECT_THAT(max_cos_ulp_distance, + AnyOf(IsNear(0.834_(1)), // Windows, macOS. + IsNear(0.502_(1)))); // Ubuntu. } // Hardest argument reduction, [Mul+10] table 11.1. @@ -76,7 +80,7 @@ TEST_F(StdAccuracyTest, SinCos) { EXPECT_THAT(ULPDistance(std::sin(x), Sin(x)), IsNear(9.89e-22_(1))); EXPECT_THAT(ULPDistance(std::cos(x), Cos(x)), AnyOf(IsNear(0.0454_(1)), // Windows, macOS. - Eq(8))); // Linux. + IsNear(7.95_(1)))); // Linux. } } diff --git a/ksp_plugin/flight_plan.cpp b/ksp_plugin/flight_plan.cpp index 78045dce17..0b06e895da 100644 --- a/ksp_plugin/flight_plan.cpp +++ b/ksp_plugin/flight_plan.cpp @@ -83,7 +83,6 @@ FlightPlan::FlightPlan(FlightPlan const& other) desired_final_time_(other.desired_final_time_), anomalous_segments_(other.anomalous_segments_), manœuvres_(other.manœuvres_), - coast_analysers_(), ephemeris_(other.ephemeris_), analysis_is_enabled_(other.analysis_is_enabled_), adaptive_step_parameters_(other.adaptive_step_parameters_), diff --git a/numerics/polynomial_evaluators_body.hpp b/numerics/polynomial_evaluators_body.hpp index 4a82ab6dfa..4e2e975218 100644 --- a/numerics/polynomial_evaluators_body.hpp +++ b/numerics/polynomial_evaluators_body.hpp @@ -71,9 +71,6 @@ InternalEstrinEvaluator::Evaluate( Argument const& argument) { static_assert(subdegree >= 2, "Unexpected subdegree in InternalEstrinEvaluator::Evaluate"); - // |n| is used to select |argument^(2^(n + 1))| = |argument^m|. - constexpr int n = FloorLog2(subdegree) - 1; - // |m| is |2^(n + 1)|. constexpr int m = PowerOf2Le(subdegree); auto const a = @@ -108,9 +105,6 @@ EvaluateDerivative(Coefficients const& coefficients, static_assert(subdegree >= 2, "Unexpected subdegree in InternalEstrinEvaluator::" "EvaluateDerivative"); - // |n| is used to select |argument^(2^(n + 1))| = |argument^m|. - constexpr int n = FloorLog2(subdegree) - 1; - // |m| is |2^(n + 1)|. constexpr int m = PowerOf2Le(subdegree); auto const a = diff --git a/numerics/polynomial_evaluators_test.cpp b/numerics/polynomial_evaluators_test.cpp index e16b2a98be..e49c96444e 100644 --- a/numerics/polynomial_evaluators_test.cpp +++ b/numerics/polynomial_evaluators_test.cpp @@ -26,7 +26,6 @@ class PolynomialEvaluatorTest : public ::testing::Test { int degree> void Test() { using E = Evaluator; - auto const* const e = E::Singleton(); auto const binomial_coefficients = MakeBinomialTuple( std::make_index_sequence()); diff --git a/physics/body_surface_reference_frame_body.hpp b/physics/body_surface_reference_frame_body.hpp index acba744627..962508b8f4 100644 --- a/physics/body_surface_reference_frame_body.hpp +++ b/physics/body_surface_reference_frame_body.hpp @@ -106,8 +106,6 @@ template AcceleratedRigidMotion BodySurfaceReferenceFrame::MotionOfThisFrame( Instant const& t) const { - DegreesOfFreedom const centre_degrees_of_freedom = - centre_trajectory_->EvaluateDegreesOfFreedom(t); Vector const centre_acceleration = ephemeris_->ComputeGravitationalAccelerationOnMassiveBody(centre_, t); diff --git a/physics/ephemeris_test.cpp b/physics/ephemeris_test.cpp index c49f3a836a..5d20732ecc 100644 --- a/physics/ephemeris_test.cpp +++ b/physics/ephemeris_test.cpp @@ -994,7 +994,6 @@ TEST_P(EphemerisTest, ComputeGravitationalJerkOnMassiveBody) { CHECK_OK(ephemeris->Prolong(j2000)); auto const earth = ephemeris->bodies()[solar_system_2000.index("Earth")]; - auto const earth_trajectory = ephemeris->trajectory(earth); std::mt19937_64 random(42); std::uniform_real_distribution delay_distribution(1, 5); diff --git a/physics/lagrange_equipotentials_test.cpp b/physics/lagrange_equipotentials_test.cpp index 65a8825ddb..0e3bec6179 100644 --- a/physics/lagrange_equipotentials_test.cpp +++ b/physics/lagrange_equipotentials_test.cpp @@ -125,8 +125,6 @@ TEST_F(LagrangeEquipotentialsTest, reference_frame.ToThisFrameAtTimeSimilarly(t0_)(moon_dof); Position const q_earth = earth_world_dof.position(); Position const q_moon = moon_world_dof.position(); - Velocity const v_earth = earth_world_dof.velocity(); - Velocity const v_moon = moon_world_dof.velocity(); Position const initial_earth_moon_l5 = Barycentre({q_earth, q_moon}, {1.0, 1.0}) + (q_earth - q_moon).Norm() *