<commit_before>{-# LANGUAGE BangPatterns, ScopedTypeVariables, ForeignFunctionInterface #-}
-- |
-- Module    : Numeric.SpecFunctions.Internal
-- Copyright : (c) 2009, 2011, 2012 <NAME>
-- License   : BSD3
--
-- Maintainer  : <EMAIL>
-- Stability   : experimental
-- Portability : portable
--
-- Internal module with implementation of special functions.
module Numeric.SpecFunctions.Internal where

import Data.Bits       ((.&.), (.|.), shiftR)
import Data.Int        (Int64)
import qualified Data.Vector.Unboxed as U
import           Data.Vector.Unboxed   ((!))

import Numeric.Polynomial.Chebyshev    (chebyshevBroucke)
import Numeric.Polynomial              (evaluatePolynomialL,evaluateEvenPolynomialL,evaluateOddPolynomialL)
import Numeric.RootFinding             (Root(..), newtonRaphson)
import Numeric.Series                  (sumPowerSeries,enumSequenceFrom,scanSequence,evalContFractionB)
import Numeric.MathFunctions.Constants ( m_epsilon, m_NaN, m_neg_inf, m_pos_inf
                                       , m_sqrt_2_pi, m_ln_sqrt_2_pi, m_eulerMascheroni
                                       , m_min_log, m_tiny
                                       )
import Text.Printf


----------------------------------------------------------------
-- Error function
----------------------------------------------------------------

-- | Error function.
--
-- \[
-- \operatorname{erf}(x) = \frac{2}{\sqrt{\pi}} \int_{0}^{x} \exp(-t^2) dt
-- \]<commit_msg>Fix broken build for older GHCs<commit_after>{-# LANGUAGE BangPatterns, ScopedTypeVariables, ForeignFunctionInterface #-}
-- |
-- Module    : Numeric.SpecFunctions.Internal
-- Copyright : (c) 2009, 2011, 2012 <NAME>
-- License   : BSD3
--
-- Maintainer  : <EMAIL>
-- Stability   : experimental
-- Portability : portable
--
-- Internal module with implementation of special functions.
module Numeric.SpecFunctions.Internal where

import Control.Applicative
import Data.Bits       ((.&.), (.|.), shiftR)
import Data.Int        (Int64)
import Data.Word       (Word)
import qualified Data.Vector.Unboxed as U
import           Data.Vector.Unboxed   ((!))

import Numeric.Polynomial.Chebyshev    (chebyshevBroucke)
import Numeric.Polynomial              (evaluatePolynomialL,evaluateEvenPolynomialL,evaluateOddPolynomialL)
import Numeric.RootFinding             (Root(..), newtonRaphson)
import Numeric.Series                  (sumPowerSeries,enumSequenceFrom,scanSequence,evalContFractionB)
import Numeric.MathFunctions.Constants ( m_epsilon, m_NaN, m_neg_inf, m_pos_inf
                                       , m_sqrt_2_pi, m_ln_sqrt_2_pi, m_eulerMascheroni
                                       , m_min_log, m_tiny
                                       )
import Text.Printf


----------------------------------------------------------------
-- Error function
----------------------------------------------------------------

-- | Error function.
--
-- \[
-- \operatorname{erf}(x) = \frac{2}{\sqrt{\pi}} \int_{0}^{x} \exp(-t^2) dt
-- \]
{'fraction_non_alphanumeric': 0.192449047778149, 'fraction_numerical': 0.013364517206815904, 'mean_word_length': 1.8705656759348035, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4501377', 'n_tokens_mistral': 886, 'n_tokens_neox': 831, 'n_words': 168}