Skip to content

Commit

Permalink
Testing tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
jatinchowdhury18 committed Nov 14, 2023
1 parent aede99f commit d72769d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false # show all errors for each platform (vs. cancel jobs on error)
matrix:
os: [ubuntu-latest, windows-2022, macos-latest]
os: [ubuntu-latest] #, macos-latest] # TODO: bring back Windows

steps:
# - name: Install Linux Deps
Expand All @@ -42,4 +42,4 @@ jobs:
- name: CMake Test
run: |
ctest --test-dir build -C RelWithDebInfo --show-only
ctest --test-dir build -C RelWithDebInfo -j4
ctest --test-dir build -C RelWithDebInfo -j4 --output-on-failure
8 changes: 4 additions & 4 deletions test/src/sigmoid_approx_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,24 @@ TEST_CASE ("Sigmoid Approx Test")
{
test_approx ([] (auto x)
{ return math_approx::sigmoid<9> (x); },
6.1e-7f);
6.5e-7f);
}
SECTION ("7th-Order")
{
test_approx ([] (auto x)
{ return math_approx::sigmoid<7> (x); },
6.8e-6f);
7.0e-6f);
}
SECTION ("5th-Order")
{
test_approx ([] (auto x)
{ return math_approx::sigmoid<5> (x); },
9.7e-5f);
1.0e-4f);
}
SECTION ("3th-Order")
{
test_approx ([] (auto x)
{ return math_approx::sigmoid<3> (x); },
1.7e-3f);
2.0e-3f);
}
}
18 changes: 9 additions & 9 deletions test/src/tanh_approx_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,40 +33,40 @@ TEST_CASE ("Tanh Approx Test")
{
test_approx ([] (auto x)
{ return math_approx::tanh<11> (x); },
1.9e-7f,
3.4e-7f,
2.0e-7f,
3.5e-7f,
5);
}
SECTION ("9th-Order")
{
test_approx ([] (auto x)
{ return math_approx::tanh<9> (x); },
1.2e-6f,
1.3e-6f,
1.5e-6f,
1.5e-6f,
18);
}
SECTION ("7th-Order")
{
test_approx ([] (auto x)
{ return math_approx::tanh<7> (x); },
1.4e-5f,
1.5e-5f,
1.5e-5f,
226);
}
SECTION ("5th-Order")
{
test_approx ([] (auto x)
{ return math_approx::tanh<5> (x); },
2.2e-4f,
2.2e-4f,
2.5e-4f,
2.5e-4f,
0);
}
SECTION ("3th-Order")
{
test_approx ([] (auto x)
{ return math_approx::tanh<3> (x); },
3.7e-3f,
3.8e-3f,
4.0e-3f,
4.0e-3f,
0);
}
}
1 change: 1 addition & 0 deletions test/src/test_helpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <algorithm>
#include <cmath>
#include <cstdint>
#include <cstring>
#include <numeric>
#include <span>
#include <vector>
Expand Down

0 comments on commit d72769d

Please sign in to comment.