diff --git a/test/maths/fast.cpp b/test/maths/fast.cpp index 3f535c08..4a01b28b 100644 --- a/test/maths/fast.cpp +++ b/test/maths/fast.cpp @@ -63,8 +63,8 @@ main () cruft::TAP::logger tap; - for (unsigned i = 0; i < std::size (sins); ++i) { - const auto theta = cruft::pi / 4 * i / (std::size (sins)-1); + for (std::size_t i = 0; i < std::size (sins); ++i) { + const auto theta = cruft::pi / 4 * static_cast (i) / (std::size (sins) - 1); const auto value = cruft::maths::fast::sin (theta); const auto abserr = std::abs (sins[i] - value); @@ -72,9 +72,9 @@ main () successes.sin += (abserr < 1e-32f || cruft::relatively_equal (sins[i], value, 1e-6f)) ? 1 : 0; } - for (unsigned int i = 0; i < std::size (exps); ++i) { + for (std::size_t i = 0; i < std::size (exps); ++i) { static constexpr float half_log2 = 0.34657359027997265470861606072908828403775006718012f; - const auto exponent = half_log2 * i / (std::size (exps)-1); + const auto exponent = half_log2 * static_cast (i) / (std::size (exps)-1); const auto value = cruft::maths::fast::exp (exponent); const auto abserr = std::abs (exps[i] - value);