This file is indexed.

/usr/share/doc/libghc-math-functions-doc/html/math-functions.txt is in libghc-math-functions-doc 0.1.1.0-4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Special functions and Chebyshev polynomials
--   
--   This library provides implementations of special mathematical
--   functions and Chebyshev polynomials. These functions are often useful
--   in statistical and numerical computing.
@package math-functions
@version 0.1.1.0


-- | Constant values common to much numeric code.
module Numeric.MathFunctions.Constants

-- | The smallest <a>Double</a> ε such that 1 + ε ≠ 1.
m_epsilon :: Double

-- | A very large number.
m_huge :: Double
m_tiny :: Double

-- | <pre>
--   1 / sqrt 2
--   </pre>
m_1_sqrt_2 :: Double

-- | <pre>
--   2 / sqrt pi
--   </pre>
m_2_sqrt_pi :: Double

-- | <pre>
--   log(sqrt((2*pi))
--   </pre>
m_ln_sqrt_2_pi :: Double

-- | The largest <a>Int</a> <i>x</i> such that 2**(<i>x</i>-1) is
--   approximately representable as a <a>Double</a>.
m_max_exp :: Int

-- | <pre>
--   sqrt 2
--   </pre>
m_sqrt_2 :: Double

-- | <pre>
--   sqrt (2 * pi)
--   </pre>
m_sqrt_2_pi :: Double

-- | Positive infinity.
m_pos_inf :: Double

-- | Negative infinity.
m_neg_inf :: Double

-- | Not a number.
m_NaN :: Double


-- | Less common mathematical functions.
module Numeric.SpecFunctions.Extra

-- | Evaluate the deviance term <tt>x log(x/np) + np - x</tt>.
bd0 :: Double -> Double -> Double


-- | Chebyshev polynomials.
module Numeric.Polynomial.Chebyshev

-- | Evaluate a Chebyshev polynomial of the first kind. Uses Clenshaw's
--   algorithm.
chebyshev :: Vector v Double => Double -> v Double -> Double

-- | Evaluate a Chebyshev polynomial of the first kind. Uses Broucke's
--   ECHEB algorithm, and his convention for coefficient handling, and so
--   gives different results than <a>chebyshev</a> for the same inputs.
chebyshevBroucke :: Vector v Double => Double -> v Double -> Double


-- | Special functions and factorials.
module Numeric.SpecFunctions

-- | Compute the logarithm of the gamma function Γ(<i>x</i>). Uses
--   Algorithm AS 245 by Macleod.
--   
--   Gives an accuracy of 10–12 significant decimal digits, except for
--   small regions around <i>x</i> = 1 and <i>x</i> = 2, where the function
--   goes to zero. For greater accuracy, use <a>logGammaL</a>.
--   
--   Returns ∞ if the input is outside of the range (0 &lt; <i>x</i> ≤
--   1e305).
logGamma :: Double -> Double

-- | Compute the logarithm of the gamma function, Γ(<i>x</i>). Uses a
--   Lanczos approximation.
--   
--   This function is slower than <a>logGamma</a>, but gives 14 or more
--   significant decimal digits of accuracy, except around <i>x</i> = 1 and
--   <i>x</i> = 2, where the function goes to zero.
--   
--   Returns ∞ if the input is outside of the range (0 &lt; <i>x</i> ≤
--   1e305).
logGammaL :: Double -> Double

-- | Compute the normalized lower incomplete gamma function
--   γ(<i>s</i>,<i>x</i>). Normalization means that γ(<i>s</i>,∞)=1. Uses
--   Algorithm AS 239 by Shea.
incompleteGamma :: Double -> Double -> Double

-- | Inverse incomplete gamma function. It's approximately inverse of
--   <a>incompleteGamma</a> for the same <i>s</i>. So following equality
--   approximately holds:
--   
--   <pre>
--   invIncompleteGamma s . incompleteGamma s = id
--   </pre>
--   
--   For <tt>invIncompleteGamma s p</tt> <i>s</i> must be positive and
--   <i>p</i> must be in [0,1] range.
invIncompleteGamma :: Double -> Double -> Double

-- | Compute the natural logarithm of the beta function.
logBeta :: Double -> Double -> Double

-- | Regularized incomplete beta function. Uses algorithm AS63 by Majumder
--   abd Bhattachrjee.
incompleteBeta :: Double -> Double -> Double -> Double

-- | Regularized incomplete beta function. Same as <a>incompleteBeta</a>
--   but also takes logarithm of beta function as parameter.
incompleteBeta_ :: Double -> Double -> Double -> Double -> Double

-- | Compute inverse of regularized incomplete beta function. Uses initial
--   approximation from AS109 and Halley method to solve equation.
invIncompleteBeta :: Double -> Double -> Double -> Double

-- | Compute the natural logarithm of 1 + <tt>x</tt>. This is accurate even
--   for values of <tt>x</tt> near zero, where use of <tt>log(1+x)</tt>
--   would lose precision.
log1p :: Double -> Double

-- | <i>O(log n)</i> Compute the logarithm in base 2 of the given value.
log2 :: Int -> Int

-- | Compute the factorial function <i>n</i>!. Returns ∞ if the input is
--   above 170 (above which the result cannot be represented by a 64-bit
--   <a>Double</a>).
factorial :: Int -> Double

-- | Compute the natural logarithm of the factorial function. Gives 16
--   decimal digits of precision.
logFactorial :: Int -> Double

-- | Calculate the error term of the Stirling approximation. This is only
--   defined for non-negative values.
--   
--   <pre>
--   stirlingError @n@ = @log(n!) - log(sqrt(2*pi*n)*(n/e)^n)
--   </pre>
stirlingError :: Double -> Double

-- | Compute the binomial coefficient <i>n</i> <tt>`<a>choose</a>`</tt>
--   <i>k</i>. For values of <i>k</i> &gt; 30, this uses an approximation
--   for performance reasons. The approximation is accurate to 12 decimal
--   places in the worst case
--   
--   Example:
--   
--   <pre>
--   7 `choose` 3 == 35
--   </pre>
choose :: Int -> Int -> Double