code: function dtlog(df) {
        var t;
  
        t = -bd0(df / 2, (df + 1) / 2) + stirlerr((df + 1) / 2) - stirlerr(df / 2);
        return function(x) {
           var x2n, logx2n, u;
  
           if (utils.hasNaN(x, df) || df <= 0) { return NaN; }
  
           x2n = x * x / df;
           logx2n = Math.log(1 + x2n) / 2;
           u = x2n > 0.2 ? df * logx2n
                         : x * x / 2 - bd0(df / 2, (df + x * x) / 2);
           return t - u - (logx2n + Math.log(sqrt2pi));
        };
     }
docs: /*
  Return the log-of-density function for student's t distribution.
  `df` is the degrees of freedom.
  See: R source code.