<commit_before>(function(define) {'use strict';
define(function(require) {

   var C, bd0, stirlerr, sqrt2pi, bratio, log1p, solve, rgen;
   // var expm1,  qnorm;

   C = require('../constants');
   bd0 = require('../basicFunc/bd0').bd0;
   stirlerr = require('../basicFunc/stirlerr').stirlerr;
   sqrt2pi = C.sqrt2pi;
   bratio = require('../basicFunc/bratio').bratio;
   log1p = require('../basicFunc/log1p').log1p;
   // expm1 = require('../basicFunc/expm1').expm1;
   solve = require('../utils').binSearchSolve;
   // qnorm = require('./normal').qnorm;
   rgen = require('../rgen/rgen');

   /**
    * T Module
    * @module distributions.t
    * @memberof distributions
    */

   /*
    * Return the log-of-density function for student's t distribution.
    * `n` is the degrees of freedom.
    * See: R source code.
    */
   function dtlog(n) {
      var t;
      t = -bd0(n / 2, (n + 1) / 2) + stirlerr((n + 1) / 2) - stirlerr(n / 2);
      return function(x) {
         var x2n, logx2n, u;
         x2n = x * x / n;
         logx2n = Math.log(1 + x2n) / 2;
         u = x2n > 0.2 ? n * logx2n
                       : x * x / 2 - bd0(n / 2, (n + x * x) / 2);
         return t - u - (logx2n + Math.log(sqrt2pi));
      };<commit_msg>In t.js, always use `df` for degrees of freedom<commit_after>(function(define) {'use strict';
define(function(require) {

   var C, bd0, stirlerr, sqrt2pi, bratio, log1p, solve, rgen;
   // var expm1,  qnorm;

   C = require('../constants');
   bd0 = require('../basicFunc/bd0').bd0;
   stirlerr = require('../basicFunc/stirlerr').stirlerr;
   sqrt2pi = C.sqrt2pi;
   bratio = require('../basicFunc/bratio').bratio;
   log1p = require('../basicFunc/log1p').log1p;
   // expm1 = require('../basicFunc/expm1').expm1;
   solve = require('../utils').binSearchSolve;
   // qnorm = require('./normal').qnorm;
   rgen = require('../rgen/rgen');

   /**
    * T Module
    * @module distributions.t
    * @memberof distributions
    */

   /*
    * Return the log-of-density function for student's t distribution.
    * `df` is the degrees of freedom.
    * See: R source 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;
         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));
      };
{'fraction_non_alphanumeric': 0.18023715415019761, 'fraction_numerical': 0.0308300395256917, 'mean_word_length': 2.0420673076923075, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1528837', 'n_tokens_mistral': 994, 'n_tokens_neox': 955, 'n_words': 224}