Calc can compute a variety of less common functions that arise in various branches of mathematics. All of the functions described in this section allow arbitrary complex arguments and, except as noted, will work to arbitrarily large precision. They can not at present handle error forms or intervals as arguments.
NOTE: These functions are still experimental. In particular, their accuracy is not guaranteed in all domains. It is advisable to set the current precision comfortably higher than you actually need when using these functions. Also, these functions may be impractically slow for some values of the arguments.
The f g (
gamma] command computes the Euler
gamma function. For positive integer arguments, this is related to the
factorial function: ‘gamma(n+1) = fact(n)’. For general complex
arguments the gamma function can be defined by the following definite
‘gamma(a) = integ(t^(a-1) exp(t), t, 0, inf)’.
(The actual implementation uses far more efficient computational methods.)
The f G (
gammaP] command computes
the incomplete gamma function, denoted ‘P(a,x)’. This is defined by
‘gammaP(a,x) = integ(t^(a-1) exp(t), t, 0, x) / gamma(a)’.
This implies that ‘gammaP(a,inf) = 1’ for any ‘a’ (see the
definition of the normal gamma function).
Several other varieties of incomplete gamma function are defined.
The complement of ‘P(a,x)’, called ‘Q(a,x) = 1-P(a,x)’ by
some authors, is computed by the I f G [
You can think of this as taking the other half of the integral, from
‘x’ to infinity.
The functions corresponding to the integrals that define ‘P(a,x)’
and ‘Q(a,x)’ but without the normalizing ‘1/gamma(a)’
factor are called ‘g(a,x)’ and ‘G(a,x)’, respectively
(where ‘g’ and ‘G’ represent the lower- and upper-case Greek
letter gamma). You can obtain these using the H f G [
and H I f G [
The f b (
beta] command computes the
Euler beta function, which is defined in terms of the gamma function as
‘beta(a,b) = gamma(a) gamma(b) / gamma(a+b)’,
‘beta(a,b) = integ(t^(a-1) (1-t)^(b-1), t, 0, 1)’.
The f B (
betaI] command computes
the incomplete beta function ‘I(x,a,b)’. It is defined by
‘betaI(x,a,b) = integ(t^(a-1) (1-t)^(b-1), t, 0, x) / beta(a,b)’.
Once again, the H (hyperbolic) prefix gives the corresponding
un-normalized version [
The f e (
erf] command computes the
‘erf(x) = 2 integ(exp(-(t^2)), t, 0, x) / sqrt(pi)’.
The complementary error function I f e (
is the corresponding integral from ‘x’ to infinity; the sum
‘erf(x) + erfc(x) = 1’.
The f j (
besJ] and f y
besY] commands compute the Bessel
functions of the first and second kinds, respectively.
In ‘besJ(n,x)’ and ‘besY(n,x)’ the “order” parameter
‘n’ is often an integer, but is not required to be one.
Calc’s implementation of the Bessel functions currently limits the
precision to 8 digits, and may not be exact even to that precision.
Use with care!