Add missing eps overload for TrackedReal

`eps` can be called on the number type as well, and this is missing from the TrackedReal overloads.
This commit is contained in:
Christopher Rackauckas 2018-11-14 09:58:41 -08:00 committed by GitHub
parent 3ef6bfc0ac
commit f20fa65848
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,6 +39,7 @@ for op in [:(==), :≈, :<]
end
Base.eps(x::TrackedReal) = eps(data(x))
Base.eps(::Type{TrackedReal{T}}) where T = eps(T)
for f in :[isinf, isnan, isfinite].args
@eval Base.$f(x::TrackedReal) = Base.$f(data(x))