|
67 | 67 | countulp(x::T, y::T) where {T <: AbstractFloat} = countulp(T, x, y) |
68 | 68 | strip_module_name(f::Function) = last(split(string(f), '.')) # strip module name from function f |
69 | 69 |
|
70 | | -function test_acc(fun_table, xx, tol; debug = true, tol_debug = 5) |
| 70 | +function test_acc(fun_table::Dict, xx; tol=1.5, debug = true, tol_debug = 5) |
71 | 71 | @testset "accuracy $(strip_module_name(xfun))" for (xfun, fun) in fun_table |
72 | 72 | rmax = 0.0 |
73 | 73 | rmean = 0.0 |
@@ -95,5 +95,6 @@ function test_acc(fun_table, xx, tol; debug = true, tol_debug = 5) |
95 | 95 | t = @test rmax <= tol |
96 | 96 | end |
97 | 97 | end |
98 | | -test_acc(fun_table, xx, tol; debug = true, tol_debug = 5) = test_acc(eltype(xx), fun_table, xx, 1.5; debug = true, tol_debug = 5) |
99 | | -test_acc(fun_table, xx; debug = true, tol_debug = 5) = test_acc(fun_table, xx, 1.5; debug = true, tol_debug = 5) |
| 98 | +test_acc(fun_table::Dict, xx; tol = 1.5, debug = true, tol_debug = 5) = test_acc(eltype(xx), fun_table, xx; tol = 1.5 debug = true, tol_debug = 5) |
| 99 | +test_acc(f::Function, xx; tol = 1.5 debug = true, tol_debug = 5) = test_acc(Dict(f=>f), xx; tol = 1.5 debug = true, tol_debug = 5) |
| 100 | +test_acc(f::Function, min, max; tol = 1.5 debug = true, tol_debug = 5) = test_acc(Dict(f=>f), FloatIterator(min,max); tol = 1.5 debug = true, tol_debug = 5) |
0 commit comments