The default test tolerances here seem wrong:
|
function test_scalar(f, z; rtol=1e-9, atol=1e-9, fdm=_fdm, fkwargs=NamedTuple(), check_inferred=true, kwargs...) |
- The default
rtol = 1e-9 assumes double precision. Better to follow isapprox here and use sqrt(eps(float(T)))?
- By setting a nonzero default
atol you are implicitly assuming quantities of order unity. This corresponds to an absurdly large tolerance if the functions happen to be scaled to have very small magnitude. Better to follow isapprox here and default to atol = 0.
The default test tolerances here seem wrong:
ChainRulesTestUtils.jl/src/testers.jl
Line 17 in 6925da1
rtol = 1e-9assumes double precision. Better to followisapproxhere and usesqrt(eps(float(T)))?atolyou are implicitly assuming quantities of order unity. This corresponds to an absurdly large tolerance if the functions happen to be scaled to have very small magnitude. Better to followisapproxhere and default toatol = 0.