Thanks John for your swift reply. This makes a lot more sense to me now, especially after noticing there exists a wrapper method to convert all Real arguments into Float64 for the pdf function.
On Friday, 19 June 2015 17:03:50 UTC+1, John Myles White wrote: > > For many of the numerical methods in that package, people weren't sure if > the code in question would generate reasonable results for other types. > Some of it probably does, but it's not trivially true that evaluating those > distribution on high-precision floats would produce correct results. > > On Friday, June 19, 2015 at 8:59:41 AM UTC-7, Xiubo Zhang wrote: >> >> I have been reading the source code for Distributions.jl, and had noted >> that functions such as "pdf" are defined over (d::Normal, x::Float64) (for >> Normal distribution, for example) rather than (d::Normal, x::Real). The >> manual of Julia recommended that more general types be used over specific >> types when possible; also it seems one of the major features of the >> language is the smart type inferencing which eliminates the needs to use >> very specific types. >> >> So my question really is, what is the rationale behind the decision of >> using specific types over abstract types? What are the advantages and >> disadvantages? >> >
