diff --git a/src/testers.jl b/src/testers.jl index 28c859c7..7b0b398f 100644 --- a/src/testers.jl +++ b/src/testers.jl @@ -1,5 +1,5 @@ """ - test_scalar(f, z; rtol=1e-9, atol=1e-9, fdm=central_fdm(5, 1), fkwargs=NamedTuple(), check_inferred=true, kwargs...) + test_scalar(f, z; rtol=1e-9, atol=0.0, fdm=central_fdm(5, 1), fkwargs=NamedTuple(), check_inferred=true, kwargs...) Given a function `f` with scalar input and scalar output, perform finite differencing checks, at input point `z` to confirm that there are correct `frule` and `rrule`s provided. @@ -16,7 +16,7 @@ at input point `z` to confirm that there are correct `frule` and `rrule`s provid Otherwise it is determined from the function and argument types. - All remaining keyword arguments are passed to `isapprox`. """ -function test_scalar(f, z; rtol=1e-9, atol=1e-9, fdm=_fdm, fkwargs=NamedTuple(), check_inferred=true, testset_name=nothing, kwargs...) +function test_scalar(f, z; rtol=1e-9, atol=0.0, fdm=_fdm, fkwargs=NamedTuple(), check_inferred=true, testset_name=nothing, kwargs...) # To simplify some of the calls we make later lets group the kwargs for reuse rule_test_kwargs = (; rtol=rtol, atol=atol, fdm=fdm, fkwargs=fkwargs, check_inferred=check_inferred, kwargs...) isapprox_kwargs = (; rtol=rtol, atol=atol, kwargs...) @@ -110,7 +110,7 @@ function test_frule( check_inferred::Bool=true, fkwargs::NamedTuple=NamedTuple(), rtol::Real=1e-9, - atol::Real=1e-9, + atol::Real=0.0, testset_name=nothing, kwargs..., ) @@ -189,7 +189,7 @@ function test_rrule( check_inferred::Bool=true, fkwargs::NamedTuple=NamedTuple(), rtol::Real=1e-9, - atol::Real=1e-9, + atol::Real=0.0, testset_name=nothing, kwargs..., )