-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
The default test tolerances here seem wrong:
ChainRulesTestUtils.jl/src/testers.jl
Line 17 in 6925da1
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 followisapprox
here and usesqrt(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 followisapprox
here and default toatol = 0
.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers