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:
parent
3ef6bfc0ac
commit
f20fa65848
@ -39,6 +39,7 @@ for op in [:(==), :≈, :<]
|
|||||||
end
|
end
|
||||||
|
|
||||||
Base.eps(x::TrackedReal) = eps(data(x))
|
Base.eps(x::TrackedReal) = eps(data(x))
|
||||||
|
Base.eps(::Type{TrackedReal{T}}) where T = eps(T)
|
||||||
|
|
||||||
for f in :[isinf, isnan, isfinite].args
|
for f in :[isinf, isnan, isfinite].args
|
||||||
@eval Base.$f(x::TrackedReal) = Base.$f(data(x))
|
@eval Base.$f(x::TrackedReal) = Base.$f(data(x))
|
||||||
|
Loading…
Reference in New Issue
Block a user