Skip to content

Commit

Permalink
Merge pull request #18 from risicle/ris-test-kdot-lenient
Browse files Browse the repository at this point in the history
test_kdot2/kdot3/fdot: increase leniency
  • Loading branch information
nschloe authored Sep 28, 2020
2 parents 4fa0e04 + 541d18c commit 8bb3bc6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/test_dot.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@
@pytest.mark.parametrize("cond", [1.0, 1.0e15])
def test_kdot2(cond):
x, y, ref, _ = accupy.generate_ill_conditioned_dot_product(100, cond)
assert abs(accupy.kdot(x, y, K=2) - ref) < 1.0e-15 * abs(ref)
assert abs(accupy.kdot(x, y, K=2) - ref) < 1.0e-13 * abs(ref)
return


@pytest.mark.parametrize("cond", [1.0, 1.0e15, 1.0e30])
def test_kdot3(cond):
x, y, ref, _ = accupy.generate_ill_conditioned_dot_product(100, cond)
assert abs(accupy.kdot(x, y, K=3) - ref) < 1.0e-15 * abs(ref)
assert abs(accupy.kdot(x, y, K=3) - ref) < 1.0e-13 * abs(ref)
return


@pytest.mark.parametrize("cond", [1.0, 1.0e15, 1.0e30, 1.0e38])
def test_fdot(cond):
x, y, ref, _ = accupy.generate_ill_conditioned_dot_product(100, cond)
assert abs(accupy.fdot(x, y) - ref) < 1.0e-15 * abs(ref)
assert abs(accupy.fdot(x, y) - ref) < 1.0e-13 * abs(ref)
return


Expand Down

0 comments on commit 8bb3bc6

Please sign in to comment.