FN
The Fullerton Function Library.
FN,
a MATLAB library which
approximates elementary and special functions using Chebyshev polynomials;
functions include Airy, Bessel I, Bessel J, Bessel K, Bessel Y, beta,
confluent hypergeometric, cosine integral, Dawson's integral,
digamma (psi), error, exponential integral, gamma, hyperbolic cosine
integral, hyperbolic sine integral, incomplete gamma, log gamma,
logarithmic integral, Pochhammer, psi, sine integral, Spence;
by Wayne Fullerton.
The original version of the library provided routines for
single precision complex, single precision real, and
double precision real arguments and used the prefixes
"C" and "D" to indicate the complex and double precision versions.
This scheme has been modified for consistency, and also
to avoid conflict with the names of functions commonly
provided by various compilers. The prefixes "C4_", "R4_"
and "R8_" are used to indicate functions for single precision complex,
single precision real, and double precision real arguments.
For example, the sine function can be calculated by the functions
C4_SIN, R4_SIN or R8_SIN.
The original, true, correct version of FN
is available through NETLIB:
http://www.netlib.org/fn/index.html.
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the GNU LGPL license.
Languages:
FN is available in
a C version and
a C++ version and
a FORTRAN90 version and
a MATLAB version and
a Python version.
Related Data and Programs:
C4LIB,
a MATLAB library which
implements certain elementary functions for single precision complex variables;
C8LIB,
a MATLAB library which
implements certain elementary functions for double precision complex variables;
CLAUSEN,
a MATLAB library which
evaluates a Chebyshev approximant to the Clausen function Cl2(x).
fn_test
MACHAR,
a MATLAB library which
computes the appropriate values of machine constants for a given machine.
LEGENDRE_POLYNOMIAL,
a MATLAB library which
evaluates the Legendre polynomial and associated functions.
MACHINE,
a MATLAB library which
stores the appropriate values of machine constants for a given machine.
R4LIB,
a MATLAB library which
contains many utility routines, using "R4" or
"single precision real" arithmetic.
R8LIB,
a MATLAB library which
contains many utility routines, using "R8" or
"double precision real" arithmetic.
TEST_VALUES,
a MATLAB library which
supplies test values of various mathematical functions.
Reference:
-
Wayne Fullerton,
Portable Special Function Routines,
in Portability of Numerical Software,
edited by Wayne Cowell,
Lecture Notes in Computer Science, Volume 57, pages 452-483,
Springer 1977,
ISBN: 978-3-540-08446-4,
LC: QA297.W65.
Source Code:
-
c4_cos.m,
evaluates the cosine of a C4 argument.
-
c4_sin.m,
evaluates the sine of a C4 argument.
-
i4_mach.m,
returns integer machine dependent constants.
-
i4_uniform_ab.m,
returns a scaled pseudorandom I4.
-
r4_acos.m,
evaluates the arc-cosine of an R4 argument.
-
r4_acosh.m,
evaluates the arc-hyperbolic cosine of an R4 argument.
-
r4_admp.m,
modulus and phase of the derivative of the Airy function.
-
r4_ai.m,
evaluates the Airy function Ai of an R4 argument.
-
r4_aid.m,
evaluates the derivative of the Airy function Ai of an R4 argument.
-
r4_aide.m,
exponentially scaled derivative, Airy function Ai of an R4 argument.
-
r4_aie.m,
evaluates the exponential scaled Airy function Ai of an R4 argument.
-
r4_aimp.m,
evaluates the modulus and phase of the Airy function.
-
r4_aint.m,
truncates an R4 argument to an integer.
-
r4_asin.m,
evaluates the arc-sine of an R4 argument.
-
r4_asinh.m,
evaluates the arc-sine of an R4 argument.
-
r4_atan.m,
evaluates the arc-tangent of an R4 argument.
-
r4_atan2.m,
evaluates the arc-tangent of two R4 arguments.
-
r4_atanh.m,
evaluates the arc-hyperbolic tangent of an R4 argument.
-
r4_besi0.m,
evaluates the Bessel function I of order 0 of an R4 argument.
-
r4_besi0e.m,
evaluates the exponentially scaled Bessel function I0(X).
-
r4_besi1.m,
evaluates the Bessel function I of order 1 of an R4 argument.
-
r4_besi1e.m,
exponentially scaled Bessel function I of order 1 of an R4 argument.
-
r4_besj0.m,
evaluates the Bessel function J of order 0 of an R4 argument.
-
r4_besj1.m,
evaluates the Bessel function J of order 1 of an R4 argument.
-
r4_besk0.m,
evaluates the Bessel function K of order 0 of an R4 argument.
-
r4_besk0e.m,
evaluates the exponentially scaled Bessel function K0(X).
-
r4_besk1.m,
evaluates the Bessel function K of order 1 of an R4 argument.
-
r4_besk1e.m,
evaluates the exponentially scaled Bessel function K1(X).
-
r4_beskes.m,
evaluates a sequence of exponentially scaled K Bessel functions at X.
-
r4_besks.m,
evaluates a sequence of K Bessel functions at X.
-
r4_besy0.m,
evaluates the Bessel function Y of order 0 of an R4 argument.
-
r4_besy1.m,
evaluates the Bessel function Y of order 1 of an R4 argument.
-
r4_beta.m,
evaluates the beta function of R4 arguments.
-
r4_betai.m,
evaluates the incomplete beta ratio of R4 arguments.
-
r4_bi.m,
evaluates the Airy function Bi of an R4 argument.
-
r4_bid.m,
evaluates the derivative of the Airy function Bi of an R4 argument.
-
r4_bide.m,
exponentially scaled derivative, Airy function Bi of an R4 argument.
-
r4_bie.m,
evaluates the exponentially scaled Airy function Bi of an R4 argument.
-
r4_binom.m,
evaluates the binomial coefficient using R4 arithmetic.
-
r4_cbrt.m,
computes the cube root of an R4.
-
r4_chi.m,
evaluates the hyperbolic cosine integral of an R4 argument.
-
r4_chu.m,
evaluates the confluent hypergeometric function of R4 arguments.
-
r4_chu_scaled.m,
scaled confluent hypergeometric function of R4 arguments.
-
r4_ci.m,
evaluates the cosine integral Ci of an R4 argument.
-
r4_cin.m,
evaluates the alternate cosine integral Cin of an R4 argument.
-
r4_cinh.m,
evaluates the alternate hyperbolic cosine integral Cinh of an R4 argument.
-
r4_cos.m,
evaluates the cosine of an R4 argument.
-
r4_cos_deg.m,
evaluates the cosine of an R4 argument in degrees.
-
r4_cosh.m,
evaluates the hyperbolic cosine of an R4 argument.
-
r4_cot.m,
evaluates the cotangent of an R4 argument.
-
r4_csevl.m,
evaluates a Chebyshev series.
-
r4_dawson.m,
evaluates Dawson's integral of an R4 argument.
-
r4_e1.m,
evaluates the exponential integral E1 for an R4 argument.
-
r4_ei.m,
evaluates the exponential integral Ei for an R4 argument.
-
r4_erf.m,
evaluates the error function of an R4 argument.
-
r4_erfc.m,
evaluates the co-error function of an R4 argument.
-
r4_exp.m,
evaluates the exponential of an R4 argument.
-
r4_exprel.m,
evaluates the exponential relative error term of an R4 argument.
-
r4_fac.m,
evaluates the factorial of an I4 argument.
-
r4_gami.m,
evaluates the incomplete gamma function for an R4 argument.
-
r4_gamic.m,
evaluates the complementary incomplete gamma function.
-
r4_gamit.m,
evaluates Tricomi's incomplete gamma function for an R4 argument.
-
r4_gaml.m,
evaluates bounds for an R4 argument of the gamma function.
-
r4_gamma.m,
evaluates the gamma function of an R4 argument.
-
r4_gamr.m,
evaluates the reciprocal gamma function of an R4 argument.
-
r4_gmic.m,
complementary incomplete gamma, small X, A near negative integer.
-
r4_gmit.m,
Tricomi's incomplete gamma function for small X.
-
r4_inits.m,
initializes a Chebyshev series.
-
r4_int.m,
returns the integer part of an R4 argument.
-
r4_knus.m,
computes a sequence of K Bessel functions.
-
r4_lbeta.m,
evaluates the logarithm of the beta function of R4 arguments.
-
r4_lgams.m,
evaluates the log of |gamma(x)| and sign, for an R4 argument.
-
r4_lgic.m,
evaluates the log complementary incomplete gamma function for large X.
-
r4_lgit.m,
evaluates the log of Tricomi's incomplete gamma function.
-
r4_lgmc.m,
evaluates the log gamma correction factor for an R4 argument.
-
r4_li.m,
evaluates the logarithmic integral for an R4 argument.
-
r4_lngam.m,
evaluates the log of the absolute value of gamma of an R4 argument.
-
r4_lnrel.m,
evaluates log ( 1 + X ) for an R4 argument.
-
r4_log.m,
evaluates the logarithm of an R4.
-
r4_log10.m,
evaluates the logarithm, base 10, of an R4.
-
r4_mach.m,
returns single precision real machine constants.
-
r4_machar.m,
determines single precision machine constants.
-
r4_pak.m,
packs a base 2 exponent into an R4.
-
r4_poch.m,
evaluates Pochhammer's function of R4 arguments.
-
r4_poch1.m,
evaluates a quantity related to Pochhammer's symbol.
-
r4_psi.m,
evaluates the psi function of an R4 argument.
-
r4_rand.m,
is a portable pseudorandom number generator.
-
r4_rand_test.m
-
r4_randgs.m,
generates a normally distributed random number.
-
r4_random.m,
is a portable pseudorandom number generator.
-
r4_ren.m,
is a simple random number generator.
-
r4_shi.m,
evaluates the hyperbolic sine integral Shi of an R4 argument.
-
r4_si.m,
evaluates the sine integral Si of an R4 argument.
-
r4_sifg.m,
is a utility routine.
-
r4_sin.m,
evaluates the sine of an R4 argument.
-
r4_sin_deg.m,
evaluates the sine of an R4 argument in degrees.
-
r4_sinh.m,
evaluates the hyperbolic sine of an R4 argument.
-
r4_spence.m,
evaluates a form of Spence's function for an R4 argument.
-
r4_sqrt.m,
computes the square root of an R4.
-
r4_tan.m,
evaluates the tangent of an R4 argument.
-
r4_tanh.m,
evaluates the hyperbolic tangent of an R4 argument.
-
r4_upak.m,
unpacks an R4 into a mantissa and exponent.
-
r8_acos.m,
evaluates the arc-cosine of an R8 argument.
-
r8_acosh.m,
evaluates the arc-hyperbolic cosine of an R8 argument.
-
r8_admp.m,
modulus and phase of the derivative of the Airy function.
-
r8_ai.m,
evaluates the Airy function Ai of an R8 argument.
-
r8_aid.m,
evaluates the derivative of the Airy function Ai of an R8 argument.
-
r8_aide.m,
exponentially scaled derivative, Airy function Ai of an R8 argument.
-
r8_aie.m,
evaluates the exponentially scaled Airy function Ai of an R8 argument.
-
r8_aimp.m,
evaluates the modulus and phase of the Airy function.
-
r8_aint.m,
rounds an R8 argument towards 0.
-
r8_asin.m,
evaluates the arc-sine of an R8 argument.
-
r8_asinh.m,
evaluates the arc-sine of an R8 argument.
-
r8_atan.m,
evaluates the arc-tangent of an R8 argument.
-
r8_atan2.m,
evaluates the arc-tangent of two R8 arguments.
-
r8_atanh.m,
evaluates the arc-hyperbolic tangent of an R8 argument.
-
r8_b0mp.m,
evaluates the modulus and phase for the Bessel J0 and Y0 functions.
-
r8_b1mp.m,
evaluates the modulus and phase for the Bessel J1 and Y1 functions.
-
r8_besi0.m,
evaluates the Bessel function I of order 0 of an R8 argument.
-
r8_besi0e.m,
evaluates the exponentially scaled Bessel function I0(X).
-
r8_besi1.m,
evaluates the Bessel function I of order 1 of an R8 argument.
-
r8_besi1e.m,
evaluates the exponentially scaled Bessel function I1(X).
-
r8_besj0.m,
evaluates the Bessel function J of order 0 of an R8 argument.
-
r8_besj1.m,
evaluates the Bessel function J of order 1 of an R8 argument.
-
r8_besk.m,
evaluates the Bessel function K of order NU of an R8 argument.
-
r8_besk0.m,
evaluates the Bessel function K of order 0 of an R8 argument.
-
r8_besk0e.m,
evaluates the exponentially scaled Bessel function K0(X).
-
r8_besk1.m,
evaluates the Bessel function K of order 1 of an R8 argument.
-
r8_besk1e.m,
evaluates the exponentially scaled Bessel function K1(X).
-
r8_beskes.m,
evaluates a sequence of exponentially scaled K Bessel functions at X.
-
r8_besks.m,
evaluates a sequence of K Bessel functions at X.
-
r8_besy0.m,
evaluates the Bessel function Y of order 0 of an R8 argument.
-
r8_besy1.m,
evaluates the Bessel function Y of order 1 of an R8 argument.
-
r8_beta.m,
evaluates the beta function of R8 arguments.
-
r8_betai.m,
evaluates the incomplete beta ratio of R8 arguments.
-
r8_bi.m,
evaluates the Airy function Bi of an R8 argument.
-
r8_bid.m,
evaluates the derivative of the Airy function Bi of an R8 argument.
-
r8_bide.m,
exponentially scaled derivative, Airy function Bi of an R8 argument.
-
r8_binom.m,
evaluates the binomial coefficient using R8 arithmetic.
-
r8_cbrt.m,
computes the cube root of an R8.
-
r8_chi.m,
evaluates the hyperbolic cosine integral of an R8 argument.
-
r8_chu.m,
evaluates the confluent hypergeometric function of R8 arguments.
-
r8_chu_scaled.m,
scaled confluent hypergeometric function of R8 arguments.
-
r8_ci.m,
evaluates the cosine integral Ci of an R8 argument.
-
r8_cin.m,
evaluates the alternate cosine integral Cin of an R8 argument.
-
r8_cinh.m,
evaluates the alternate hyperbolic cosine integral Cinh of an R8 argument.
-
r8_cos.m,
evaluates the cosine of an R8 argument.
-
r8_cos_deg.m,
evaluates the cosine of an R8 argument in degrees.
-
r8_cosh.m,
evaluates the hyperbolic cosine of an R8 argument.
-
r8_cot.m,
evaluates the cotangent of an R8 argument.
-
r8_csevl.m,
evaluates a Chebyshev series.
-
r8_dawson.m,
evaluates Dawson's integral of an R8 argument.
-
r8_e1.m,
evaluates the exponential integral E1 for an R8 argument.
-
r8_ei.m,
evaluates the exponential integral Ei for an R8 argument.
-
r8_erf.m,
evaluates the error function of an R8 argument.
-
r8_erfc.m,
evaluates the co-error function of an R8 argument.
-
r8_exp.m,
evaluates the exponential of an R8 argument.
-
r8_exprel.m,
evaluates the exponential relative error term of an R8 argument.
-
r8_fac.m,
evaluates the factorial of an I4 argument.
-
r8_gami.m,
evaluates the incomplete gamma function for an R8 argument.
-
r8_gamic.m,
evaluates the complementary incomplete gamma function.
-
r8_gamit.m,
evaluates Tricomi's incomplete gamma function for an R8 argument.
-
r8_gaml.m,
evaluates bounds for an R8 argument of the gamma function.
-
r8_gamma.m,
evaluates the gamma function of an R8 argument.
-
r8_gamr.m,
evaluates the reciprocal gamma function of an R8 argument.
-
r8_gmic.m,
complementary incomplete gamma, small X, A near negative integer.
-
r8_gmit.m,
Tricomi's incomplete gamma function for small X.
-
r8_inits.m,
initializes a Chebyshev series.
-
r8_int.m,
returns the integer part of an R8 argument.
-
r8_knus.m,
computes a sequence of K Bessel functions.
-
r8_lbeta.m,
evaluates the logarithm of the beta function of R8 arguments.
-
r8_lgams.m,
evaluates the log of |gamma(x)| and sign, for an R8 argument.
-
r8_lgic.m,
evaluates the log complementary incomplete gamma function for large X.
-
r8_lgit.m,
evaluates the log of Tricomi's incomplete gamma function.
-
r8_lgmc.m,
evaluates the log gamma correction factor for an R8 argument.
-
r8_li.m,
evaluates the logarithmic integral for an R8 argument.
-
r8_lngam.m,
evaluates the log of the absolute value of gamma of an R8 argument.
-
r8_lnrel.m,
evaluates log ( 1 + X ) for an R8 argument.
-
r8_log.m,
evaluates the logarithm of an R8.
-
r8_log10.m,
evaluates the logarithm, base 10, of an R8.
-
r8_mach.m,
returns double precision real machine-dependent constants.
-
r8_machar.m,
determines double precision machine constants.
-
r8_mop.m,
evaluates -1 to an integer power.
-
r8_pak.m,
packs a base 2 exponent and mantissa into an R8.
-
r8_poch.m,
evaluates Pochhammer's function of R8 arguments.
-
r8_poch1.m,
evaluates a quantity related to Pochhammer's symbol.
-
r8_psi.m,
evaluates the psi function of an R8 argument.
-
r8_rand.m,
is a portable pseudorandom number generator.
-
r8_randgs.m,
generates a normally distributed random number.
-
r8_random.m,
is a portable pseudorandom number generator.
-
r8_ren.m,
is a simple random number generator.
-
r8_shi.m,
evaluates the hyperbolic sine integral Shi of an R8 argument.
-
r8_si.m,
evaluates the sine integral Si of an R8 argument.
-
r8_sifg.m,
is a utility routine.
-
r8_sign.m,
evaluates the sign of an R8 argument.
-
r8_sin.m,
evaluates the sine of an R8 argument.
-
r8_sin_deg.m,
evaluates the sine of an R8 argument in degrees.
-
r8_sinh.m,
evaluates the hyperbolic sine of an R8 argument.
-
r8_spence.m,
evaluates a form of Spence's function for an R8 argument.
-
r8_sqrt.m,
computes the square root of an R8.
-
r8_tan.m,
evaluates the tangent of an R8 argument.
-
r8_tanh.m,
evaluates the hyperbolic tangent of an R8 argument.
-
r8_upak.m,
unpacks an R8 into a mantissa and exponent.
-
timestamp.m,
prints out the current YMDHMS date as a timestamp.
Last revised on 18 January 2019.