From discourse here
julia> pdf(Chi(3), -.5)
ERROR: DomainError with -0.5:
log will only return a complex result if called with a complex argument. Try log(Complex(x)).
Even though pdf should be 0 for x < 0. See wiki.
The problem is a logpdf function that does not check the bounds. See here
logpdf(d::Chi, x::Real) = (ν = d.ν;
(1 - ν/2) * logtwo + (ν - 1) * log(x) - x^2/2 - loggamma(ν/2)
)