Skip to content

Commit

Permalink
Trying to avoid bad allocations in Windows CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jatinchowdhury18 committed Nov 14, 2023
1 parent b2fa98c commit 19c2885
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/src/sigmoid_approx_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@

TEST_CASE ("Sigmoid Approx Test")
{
const auto all_floats = test_helpers::all_32_bit_floats (-20.0f, 20.0f, 1.0e-3f);
#if ! defined(WIN32)
const auto all_floats = test_helpers::all_32_bit_floats (-10.0f, 10.0f, 1.0e-3f);
#else
const auto all_floats = test_helpers::all_32_bit_floats (-10.0f, 10.0f, 1.0e-1f);
#endif
const auto y_exact = test_helpers::compute_all (all_floats, [] (auto x)
{ return 1.0f / (1.0f + std::exp (-x)); });

Expand Down
4 changes: 4 additions & 0 deletions test/src/tanh_approx_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@

TEST_CASE ("Tanh Approx Test")
{
#if ! defined(WIN32)
const auto all_floats = test_helpers::all_32_bit_floats (-10.0f, 10.0f, 1.0e-3f);
#else
const auto all_floats = test_helpers::all_32_bit_floats (-10.0f, 10.0f, 1.0e-1f);
#endif
const auto y_exact = test_helpers::compute_all (all_floats, [] (auto x)
{ return std::tanh (x); });

Expand Down

0 comments on commit 19c2885

Please sign in to comment.