FN
The Fullerton Function Library.
FN
is a MATLAB library which
contains a selection of routines for the evaluation of certain
elementary and special functions,
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 FORTRAN77 version and
a FORTRAN90 version and
a MATLAB 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;
MACHAR,
a MATLAB library which
computes the appropriate values of machine constants for a given machine.
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:
-
Milton Abramowitz, Irene Stegun,
Handbook of Mathematical Functions,
National Bureau of Standards, 1964,
ISBN: 0-486-61272-4,
LC: QA47.A34.
-
Carter Bays, Stephen Durham,
Improving a Poor Random Number Generator,
ACM Transactions on Mathematical Software,
Volume 2, Number 1, March 1976, pages 59-64.
-
Nancy Bosten, EL Battiste,
Remark on Algorithm 179:
Incomplete Beta Ratio,
Communications of the ACM,
Volume 17, Number 3, March 1974, pages 156-157.
-
Roger Broucke,
Algorithm 446:
Ten Subroutines for the Manipulation of Chebyshev Series,
Communications of the ACM,
Volume 16, Number 4, April 1973, pages 254-256.
-
William Cody,
ACM Algorithm 665, MACHAR, a subroutine to dynamically determine
machine parameters,
ACM Transactions on Mathematical Software,
Volume 14, Number 4, pages 303-311, 1988.
-
William Cody, William Waite,
Software Manual for the Elementary Functions,
Prentice Hall, 1980.
-
Phyllis Fox, Andrew Hall, Norman Schryer,
Algorithm 528,
Framework for a Portable Library,
ACM Transactions on Mathematical Software,
Volume 4, Number 2, June 1978, page 176-188.
-
Wayne Fullerton,
Portable Special Function Routines,
in Portability of Numerical Software,
edited by Wayne Cowell,
Lecture Notes in Computer Science, Volume 57,
Springer 1977,
ISBN: 978-3-540-08446-4,
LC: QA297.W65.
-
Walter Gautschi,
A Computational Procedure for Incomplete Gamma Functions,
ACM Transactions on Mathematical Software,
Volume 5, Number 4, December 1979, pages 466-481.
-
Richard Hamming,
Numerical Methods for Scientists and Engineers,
Dover, 1986,
ISBN: 0486652416,
LC: QA297.H28.
-
K Mitchell,
Tables of the function Integral ( 0 < y < x ) - log | 1 - y | dy / y
with an account of some properties of this and related functions,
Philosophical Magazine,
Volume 40, pages 351-368, 1949.
-
Malcolm Pike, David Hill,
Algorithm 266:
Pseudo-Random Numbers,
Communications of the ACM,
Volume 8, Number 10, October 1965, page 605.
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.
-
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_.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_randgs.m,
generates a normally distributed random number.
-
r4_random.m,
is a portable pseudorandom number generator.
-
r4_ranf.m,
is a driver for R4_RANDOM.
-
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,
truncates an R8 argument to an integer.
-
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_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_bie.m,
evaluates the exponentially scaled 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_pak.m,
packs a base 2 exponent 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_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_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_tab.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.
Examples and Tests:
-
fn_test.m,
calls all the test programs.
-
fn_test_output.txt,
the output file.
-
acos_test.m,
tests acos() functions;
-
acosh_test.m,
tests acosh() functions;
-
ai_test.m,
tests ai() functions;
-
aid_test.m,
tests aid() functions;
-
asin_test.m,
tests asin() functions;
-
asinh_test.m,
tests asinh() functions;
-
atan2_test.m,
tests atan2() functions;
-
atan_test.m,
tests atan() functions;
-
atanh_test.m,
tests atanh() functions;
-
besi0_test.m,
tests besi0() functions;
-
besi1_test.m,
tests besi1() functions;
-
besj0_test.m,
tests besj0() functions;
-
besj1_test.m,
tests besj1() functions;
-
besk0_test.m,
tests besk0() functions;
-
besk1_test.m,
tests besk1() functions;
-
besy0_test.m,
tests besy0() functions;
-
besy1_test.m,
tests besy1() functions;
-
beta_test.m,
tests beta() functions;
-
bi_test.m,
tests bi() functions;
-
bid_test.m,
tests bid() functions;
-
binom_test.m,
tests binom() functions;
-
cbrt_test.m,
tests cbrt() functions;
-
chi_test.m,
tests chi() functions;
-
chu_test.m,
tests chu() functions;
-
ci_test.m,
tests ci() functions;
-
cin_test.m,
tests cin() functions;
-
cinh_test.m,
tests cinh() functions;
-
cos_deg_test.m,
tests cos_deg() functions;
-
cos_test.m,
tests cos() functions;
-
cosh_test.m,
tests cosh() functions;
-
cot_test.m,
tests cot() functions;
-
dawson_test.m,
tests dawson() functions;
-
e1_test.m,
tests e1() functions;
-
ei_test.m,
tests ei() functions;
-
erf_test.m,
tests erf() functions;
-
erfc_test.m,
tests erfc() functions;
-
exp_test.m,
tests exp() functions;
-
fac_test.m,
tests fac() functions;
-
gamma_inc_test.m,
tests gamma_inc() functions;
-
gamma_inc_tricomi_test.m,
tests gamma_inc_tricomi() functions;
-
gamma_test.m,
tests gamma() functions;
-
int_test.m,
tests int() functions;
-
lbeta_test.m,
tests lbeta() functions;
-
li_test.m,
tests li() functions;
-
lngam_test.m,
tests lngam() functions;
-
log10_test.m,
tests log10() functions;
-
log_test.m,
tests log() functions;
-
poch_test.m,
tests poch() functions;
-
psi_test.m,
tests psi() functions;
-
rand_test.m,
tests rand() functions;
-
shi_test.m,
tests shi() functions;
-
si_test.m,
tests si() functions;
-
sin_deg_test.m,
tests sin_deg() functions;
-
sin_test.m,
tests sin() functions;
-
sinh_test.m,
tests sinh() functions;
-
spence_test.m,
tests spence() functions;
-
sqrt_test.m,
tests sqrt() functions;
-
tan_test.m,
tests tan() functions;
-
tanh_test.m,
tests tanh() functions;
You can go up one level to
the MATLAB source codes.
Last revised on 02 February 2012.