<commit_before>#ifndef MATHUTILS_H
#define MATHUTILS_H

#include "libmesh.h"

namespace MathUtils 
{

  inline Real polyLog(Real x, Real tol, int deriv)
  {<commit_msg>new fission gas model<commit_after>#ifndef MATHUTILS_H
#define MATHUTILS_H

#include "libmesh.h"

namespace MathUtils 
{
  inline Real poly2Log(Real x, Real tol, int deriv)
  {
    Real c1=1.0/tol;
    Real c2=std::log(tol) - 1.0;

    Real value=0.0;
      
    if (deriv == 0)
    {
      if(x<tol)
        value =  c1*x + c2;
      else
        value =  std::log(x);
    }
    else if (deriv == 1)
    {
      if(x<tol)
        value =  c1;
      else
        value =  1.0/x;
    }
    else if (deriv == 2)
    {
      if(x<tol)
        value =  0.0;
      else
        value =  -1.0/(x*x);
    }
    else if (deriv == 3)
    {
      if(x<tol)
        value =  0.0;
      else
        value =  2.0/(x*x*x);
    }
    
    return value;
  }

  inline Real polyLog(Real x, Real tol, int deriv)
  {
{'fraction_non_alphanumeric': 0.13043478260869565, 'fraction_numerical': 0.026915113871635612, 'mean_word_length': 1.731638418079096, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7382492', 'n_tokens_mistral': 411, 'n_tokens_neox': 397, 'n_words': 92}