cephes

advertisement
CEPHES MATHEMATICAL FUNCTION LIBRARY
This computer software library is a collection of more than
400 high quality mathematical routines for scientific and
engineering applications.
All are written entirely in C
language. Many of the functions are supplied in six different
arithmetic precisions: 32 bit single (24-bit significand), 64 bit
IEEE double (53-bit), 64 bit DEC (56-bit), 80 or 96 bit IEEE long
double (64-bit), and extended precision formats having 144-bit
and 336-bit significands. The extended precision arithmetic is
included with the function library.
The library treats about 180 different mathematical
functions. In addition to the elementary arithmetic and
transcendental routines, the library includes a substantial
collection of probability integrals, Bessel functions, and higher
transcendental functions.
There are complex variable routines covering complex
arithmetic, complex logarithm and exponential, and complex
trigonometric functions.
Each function subroutine has been tested by comparing at a
large number of points against high precision check routines.
The test programs use floating point arithmetic having 144 bit
(43 decimal) precision. Thus the actual accuracy of each program
is reported, not merely the result of a consistency test. Test
results are given with the description of each routine.
The routines have been characterized and tested in IEEE Std
754 double precision arithmetic (both Intel and Motorola
formats), used on IBM PC and a growing number of other computers,
and also in the popular DEC/IBM double precision format.
For DEC and IEEE arithmetic, numerical constants and
approximation coefficients are supplied as integer arrays in
order to eliminate conversion errors that might be introduced by
the language compiler. All coefficients are also supplied in the
normal decimal scientific notation so that the routines can be
compiled and used on other machines that do not support either of
the above numeric formats.
A single, common error handling routine is supplied. Error
conditions produce a display of the function name and error type.
The user may easily insert modifications to implement any desired
action on specified types of error.
The following table summarizes the current contents of the
double precision library. See also the corresponding
documentation for the single and long double precision libraries.
Accuracies reported for DEC and IEEE arithmetic are with
arithmetic rounding precision limited to 56 and 53 bits,
respectively. Higher precision may be realized if an arithmetic
unit such as the 8087 or 68881 is used in conjunction with an
optimizing compiler. The accuracy figures are experimentally
measured; they are not guaranteed maximum errors.
Documentation is included on the distribution media as
Unix-style manual pages that describe the functions and their
invocation. The primary documentation for the library functions
is the book by Moshier, Methods and Programs for Mathematical
Functions, Prentice-Hall, 1989.
Function
--------
Name
----
Accuracy
DEC
IEEE
-------
Arithmetic and Algebraic
Square root
sqrt
2e-17
2e-16
Long integer square root
lsqrt
1
1
Cube root
cbrt
2e-17
2e-16
Evaluate polynomial
polevl
Evaluate Chebyshev series
chbevl
Round to nearest integer value round
Truncate upward to integer
ceil
Truncate downward to integer
floor
Extract exponent
frexp
Add integer to exponent
ldexp
Absolute value
fabs
Rational arithmetic
euclid
Roots of a polynomial
polrt
Reversion of power series
revers
IEEE 854 arithmetic
ieee
Polynomial arithmetic (polyn.c):
Add polynomials
poladd
Subtract polynomials
polsub
Multiply polynomials
polmul
Divide polynomials
poldiv
Substitute polynomial variable polsbt
Evaluate polynomial
poleva
Set all coefficients to zero
polclr
Copy coefficients
polmov
Display coefficients
polprt
Note, polyr.c contains routines corresponding to
the above for polynomials with rational coefficients.
Power series manipulations (polmisc.c):
Square root of a polynomial
polsqt
Arctangent
polatn
Sine
polsin
Reversion of power series
revers
Exponential and Trigonometric
Arc cosine
acos
3e-17
Arc hyperbolic cosine
acosh
4e-17
Arc hyperbolic sine
asinh
5e-17
Arc hyperbolic tangent
atanh
3e-17
Arcsine
asin
6e-17
Arctangent
atan
4e-17
Quadrant correct arctangent
atan2
4e-17
Cosine
cos
3e-17
Cosine of arg in degrees
cosdg
4e-17
Exponential, base e
exp
3e-17
Exponential, base 2
exp2
2e-17
Exponential, base 10
exp10
3e-17
Hyperbolic cosine
cosh
3e-17
Hyperbolic sine
sinh
4e-17
Hyperbolic tangent
tanh
3e-17
3e-16
5e-16
4e-16
2e-16
5e-16
3e-16
4e-16
2e-16
2e-16
2e-16
2e-16
2e-16
3e-16
3e-16
3e-16
Logarithm, base e
Logarithm, base 2
Logarithm, base 10
Power
Integer Power
Sine
Sine of arg in degrees
Tangent
Tangent of arg in degrees
log
log2
log10
pow
powi
sin
sindg
tan
tandg
2e-17
3e-17
1e-15
3e-17
4e-17
4e-17
3e-17
2e-16
2e-16
2e-16
2e-14
9e-14
2e-16
2e-16
3e-16
3e-16
Exponential integral
Exponential integral
expn
Hyperbolic cosine integral
shichi
Hyperbolic sine integral
shichi
Cosine integral
sici
Sine integral
sici
2e-16
9e-17
9e-17
8e-17A
4e-17A
2e-15
8e-16
7e-16
7e-16
4e-16
Gamma
Beta
Factorial
Gamma
Logarithm of gamma function
Incomplete beta integral
Inverse beta integral
Incomplete gamma integral
Complemented gamma integral
Inverse gamma integral
Psi (digamma) function
Reciprocal Gamma
beta
fac
gamma
lgam
incbet
incbi
igam
igamc
igami
psi
rgamma
8e-15
2e-17
1e-16
5e-17
4e-14
3e-13
5e-15
3e-15
9e-16
2e-16
1e-16
8e-14
2e-15
1e-15
5e-16
4e-13
8e-13
4e-14
1e-12
1e-14
1e-15
1e-15
Error function
Error function
Complemented error function
Dawson's integral
Fresnel integral (C)
Fresnel integral (S)
erf
erfc
dawsn
fresnl
fresnl
5e-17
5e-16
7e-16
2e-16
2e-16
4e-16
6e-14
7e-16
2e-15
2e-15
Bessel
Airy (Ai)
Airy (Ai')
Airy (Bi)
Airy (Bi')
Bessel, order 0
Bessel, order 1
Bessel, order n
Bessel, noninteger order
Bessel, second kind, order 0
Bessel, second kind, order 1
Bessel, second kind, order n
Bessel, noninteger order
Modified Bessel, order 0
Exponentially scaled i0
Modified Bessel, order 1
Exponentially scaled i1
airy
airy
airy
airy
j0
j1
jn
jv
y0
y1
yn
yv
i0
i0e
i1
i1e
6e-16A
6e-16A
6e-16A
6e-16A
4e-17A
4e-17A
7e-17A
2e-15A
5e-15A
4e-15A
5e-15A
4e-16A
3e-16A
2e-15A
5e-15A
7e-17A 1e-15A
9e-17A 1e-15A
3e-16A 3e-15A
see struve.c
8e-17
6e-16
8e-17
5e-16
1e-16
2e-15
1e-16
2e-15
Modified Bessel, nonint. order
Mod. Bessel, 3rd kind, order 0
Exponentially scaled k0
Mod. Bessel, 3rd kind, order 1
Exponentially scaled k1
Mod. Bessel, 3rd kind, order n
iv
k0
k0e
k1
k1e
kn
Hypergeometric
Confluent hypergeometric
Gauss hypergeometric function
2F0
1F2
3F0
hyperg 1e-15
2e-14
hyp2f1 4e-11
9e-8
hyp2f0f see hyperg.c
onef2f
see struve.c
threef0f see struve.c
Elliptic
Complete elliptic integral (E)
Incomplete elliptic integral (E)
Complete elliptic integral (K)
Incomplete elliptic integral (K)
Jacobian elliptic function (sn)
Jacobian elliptic function (cn)
Jacobian elliptic function (dn)
Jacobian elliptic function (phi)
ellpe
ellie
ellpk
ellik
ellpj
ellpj
ellpj
ellpj
3e-15
1e-16
1e-16
9e-17
9e-17
1e-9
2e-14
1e-15
1e-15
1e-15
8e-16
2e-8
3e-17
2e-16
4e-17
9e-17
5e-16A
2e-16
2e-15
3e-16
6e-16
4e-15A
4e-15A
1e-12A
9e-16
Probability
Binomial distribution
Complemented binomial
Inverse binomial
Chi square distribution
Complemented Chi square
Inverse Chi square
F distribution
Complemented F
Inverse F distribution
Gamma distribution
Complemented gamma
Negative binomial distribution
Complemented negative binomial
Normal distribution
Inverse normal distribution
Poisson distribution
Complemented Poisson
Inverse Poisson distribution
Student's t distribution
bdtr
bdtrc
bdtri
chdtr
chdtrc
chdtri
fdtr
fdtrc
fdtri
gdtr
gdtrc
nbdtr
nbdtrc
ndtr
ndtri
pdtr
pdtrc
pdtri
stdtr
4e-14
4e-14
3e-13
5e-15
3e-15
9e-16
4e-14
4e-14
3e-13
5e-15
3e-15
4e-14
4e-14
2e-15
1e-16
3e-15
5e-15
3e-15
2e-15
4e-13
4e-13
8e-13
3e-14
2e-14
6e-15
4e-13
4e-13
8e-13
3e-14
2e-14
4e-13
4e-13
3e-14
7e-16
2e-14
3e-14
5e-14
2e-14
Miscellaneous
Dilogarithm
Riemann Zeta function
Two argument zeta function
Struve function
spence
zetac
zeta
struve
3e-16
1e-16
4e-15
1e-15
Matrix
Fast Fourier transform
Simultaneous linear equations
fftr
simq
Simultaneous linear equations
gels (symmetric coefficient matrix)
Matrix inversion
minv
Matrix multiply
mmmpy
Matrix times vector
mvmpy
Matrix transpose
mtransp
Eigenvectors (symmetric matrix) eigens
Levenberg-Marquardt nonlinear equations lmdif
Simpson's rule
Runge-Kutta
Adams-Bashforth
Numerical Integration
simpsn
runge - see de118
adams - see de118
Complex addition
Subtraction
Multiplication
Division
Absolute value
Square root
Complex Arithmetic
cadd
csub
cmul
cdiv
cabs
csqrt
1e-17
1e-17
2e-17
5e-17
3e-17
3e-17
1e-16
1e-16
2e-16
4e-16
3e-16
3e-16
Complex Exponential and Trigonometric
Exponential
cexp
4e-17
Logarithm
clog
9e-17
Cosine
ccos
5e-17
Arc cosine
cacos
2e-15
Sine
csin
5e-17
Arc sine
casin
2e-15
Tangent
ctan
7e-17
Arc tangent
catan
1e-16
Cotangent
ccot
7e-17
3e-16
5e-16A
4e-16
2e-14
4e-16
2e-14
7e-16
2e-15
9e-16
Applications
Minimax rational approximations to functions
Digital elliptic filters
Numerical integration of the Moon and planets
IEEE compliance test for printf(), scanf()
remes
ellf
de118
ieetst
Long Double Precision Functions
Function
--------
Name
----
Accuracy
--------
Arc hyperbolic cosine
Arc cosine
Arc hyperbolic sine
Arcsine
Arc hyperbolic tangent
Arctangent
Quadrant correct arctangent
Cube root
Truncate upward to integer
Hyperbolic cosine
Cosine
Cotangent
Exponential, base e
Exponential, base 2
Exponential, base 10
Absolute value
Truncate downward to integer
Extract exponent
Add integer to exponent
Logarithm, base e
Logarithm, base 2
Logarithm, base 10
Integer Power
Power
Hyperbolic sine
Sine
Square root
Hyperbolic tangent
Tangent
acoshl
acosl
asinhl
asinl
atanhl
atanl
atan2l
cbrtl
ceill
coshl
cosl
cotl
expl
exp2l
exp10l
fabsl
floorl
frexpl
ldexpl
logl
log2l
log10l
powil
powl
sinhl
sinl
sqrtl
tanhl
tanl
2e-19
1e-19
2e-19
3e-19
1e-19
1e-19
2e-19
7e-20
1e-19
1e-19
2e-19
1e-19
9e-20
1e-19
9e-20
1e-19
9e-20
4e-17
3e-18
2e-19
1e-19
8e-20
1e-19
2e-19
Single Precision Routines
Function
--------
Name
----
Accuracy
--------
ceilf
floorf
frexpf
ldexpf
fabsf
sqrtf
cbrtf
9e-8
8e-8
Arithmetic
Truncate upward to integer
Truncate downward to integer
Extract exponent
Add integer to exponent
Absolute value
Square root
Cube root
Polynomials and Power Series
Polynomial arithmetic (polynf.c):
Add polynomials
poladdf
Subtract polynomials
polsubf
Multiply polynomials
polmulf
Divide polynomials
poldivf
Substitute polynomial variable polsbtf
Evaluate polynomial
polevaf
Set all coefficients to zero
polclrf
Copy coefficients
polmovf
Display coefficients
polprtf
Note, polyr.c contains routines corresponding to
the above for polynomials with rational coefficients.
Evaluate polynomial
polevlf (coefficients in reverse order)
Evaluate Chebyshev series
chbevlf (coefficients in reverse order)
Exponential and Trigonometric
Arc cosine
acosf
1e-7
Arc hyperbolic cosine
acoshf 2e-7
Arc hyperbolic sine
asinhf 2e-7
Arc hyperbolic tangent
atanhf 1e-7
Arcsine
asinf
3e-7
Arctangent
atanf
2e-7
Quadrant correct arctangent
atan2f 2e-7
Cosine
cosf
1e-7
Cosine of arg in degrees
cosdgf 1e-7
Cotangent
cotf
3e-7
Cotangent of arg in degrees
cotdgf 2e-7
Exponential, base e
Exponential, base 2
Exponential, base 10
Hyperbolic cosine
Hyperbolic sine
Hyperbolic tangent
Logarithm, base e
Logarithm, base 2
Logarithm, base 10
Power
Integer Power
Sine
Sine of arg in degrees
Tangent
Tangent of arg in degrees
expf
exp2f
exp10f
coshf
sinhf
tanhf
logf
log2f
log10f
powf
powif
sinf
sindgf
tanf
tandgf
2e-7
2e-7
1e-7
2e-7
1e-7
1e-7
8e-8
1e-7
1e-7
1e-6
1e-6
1e-7
1e-7
3e-7
2e-7
Exponential integral
Exponential integral
Hyperbolic cosine integral
Hyperbolic sine integral
Cosine integral
Sine integral
expnf
shichif
shichif
sicif
sicif
6e-7
4e-7A
4e-7
2e-7A
4e-7A
Gamma
Beta
Factorial
Gamma
Logarithm of gamma function
Incomplete beta integral
Inverse beta integral
Incomplete gamma integral
Complemented gamma integral
Inverse gamma integral
Psi (digamma) function
Reciprocal Gamma
betaf
facf
gammaf
lgamf
incbetf
incbif
igamf
igamcf
igamif
psif
rgammaf
4e-5
6e-8
6e-7
7e-7(A)
2e-4
3e-4
8e-6
8e-6
1e-5
8e-7
9e-7
erff
erfcf
dawsnf
fresnlf
fresnlf
2e-7
4e-6
4e-7
1e-6
1e-6
airyf
airyf
airyf
airyf
j0f
j1f
jnf
1e-5A
9e-6A
2e-6A
2e-6A
2e-7A
2e-7A
4e-7A
Error function
Error function
Complemented error function
Dawson's integral
Fresnel integral (C)
Fresnel integral (S)
Bessel
Airy (Ai)
Airy (Ai')
Airy (Bi)
Airy (Bi')
Bessel, order 0
Bessel, order 1
Bessel, order n
Bessel, noninteger order
Bessel, second kind, order 0
Bessel, second kind, order 1
Bessel, second kind, order n
Bessel, second kind, order v
Modified Bessel, order 0
Exponentially scaled i0
Modified Bessel, order 1
Exponentially scaled i1
Modified Bessel, nonint. order
Mod. Bessel, 3rd kind, order 0
Exponentially scaled k0
Mod. Bessel, 3rd kind, order 1
Exponentially scaled k1
Mod. Bessel, 3rd kind, order n
jvf
y0f
y1f
ynf
yvf
i0f
i0ef
i1f
i1ef
ivf
k0f
k0ef
k1f
k1ef
knf
2e-6A
2e-7A
2e-7A
2e-6A
see struvef.c
4e-7
4e-7
2e-6
2e-6
9e-6
8e-7
8e-7
5e-7
5e-7
2e-4A
Hypergeometric
Confluent hypergeometric 1F1
Gauss hypergeometric function
2F0
1F2
3F0
hypergf 1e-5
hyp2f1f 2e-3
hyp2f0f see hypergf.c
onef2f
see struvef.c
threef0f see struvef.c
Elliptic
Complete elliptic integral (E)
Incomplete elliptic integral (E)
Complete elliptic integral (K)
Incomplete elliptic integral (K)
Jacobian elliptic function (sn)
Jacobian elliptic function (cn)
Jacobian elliptic function (dn)
Jacobian elliptic function (phi)
ellpef
ellief
ellpkf
ellikf
ellpjf
ellpjf
ellpjf
ellpjf
1e-7
5e-7
1e-7
3e-7
2e-6A
2e-6A
1e-3A
4e-7
bdtrf
bdtrcf
bdtrif
chdtrf
chdtrcf
chdtrif
fdtrf
fdtrcf
fdtrif
gdtrf
gdtrcf
nbdtrf
nbdtrcf
ndtrf
ndtrif
pdtrf
pdtrcf
7e-5
6e-5
4e-5
3e-5
3e-5
2e-5
2e-5
7e-5
4e-5A
6e-5
9e-5
2e-4
1e-4
2e-5
4e-7
7e-5
8e-5
Probability
Binomial distribution
Complemented binomial
Inverse binomial
Chi square distribution
Complemented Chi square
Inverse Chi square
F distribution
Complemented F
Inverse F distribution
Gamma distribution
Complemented gamma
Negative binomial distribution
Complemented negative binomial
Normal distribution
Inverse normal distribution
Poisson distribution
Complemented Poisson
Inverse Poisson distribution
Student's t distribution
pdtrif
stdtrf
9e-6
2e-5
spencef
zetacf
zetaf
struvef
4e-7
6e-7
7e-7
9e-5
Miscellaneous
Dilogarithm
Riemann Zeta function
Two argument zeta function
Struve function
Complex Arithmetic
Complex addition
Subtraction
Multiplication
Division
Absolute value
Square root
caddf
csubf
cmulf
cdivf
cabsf
csqrtf
6e-8
6e-8
1e-7
2e-7
1e-7
2e-7
Complex Exponential and Trigonometric
Exponential
Logarithm
Cosine
Arc cosine
Sine
Arc sine
Tangent
Arc tangent
Cotangent
cexpf
clogf
ccosf
cacosf
csinf
casinf
ctanf
catanf
ccotf
1e-7
3e-7A
2e-7
9e-6
2e-7
1e-5
3e-7
2e-6
4e-7
QLIB Extended Precision Mathematical Library
q100asm.bat
q100asm.rsp
Create 100-decimal Q type library (for IBM PC MSDOS)
qlibasm.bat
qlibasm.rsp
43-decimal Q type library (for IBM PC MSDOS)
qlib.lib
qlib100.lib
qlib120.lib
Q type library, 43 decimal
Q type library, 100 decimal
Q type library, 120 decimal
Function calling arguments:
NQ is the number of 16-bit short integers in a number (see qhead.h)
short x[NQ], x1[NQ], ... are inputs
short y[NQ], y1[NQ], ... are outputs
mconf.h
Machine configuration file
mtherr.c
Common error handling routine
qacosh.c
Arc hyperbolic cosine
qacosh( x, y );
qairy.c
Airy functions
qairy( x, Ai, Ai', Bi, Bi' );
Also see source program for auxiliary functions.
qasin.c
Arc sine
qasin( x, y );
qasinh.c
Arc hyperbolic sine
qasinh( x, y );
qatanh.c
Arc hyperbolic tangent
qatanh( x, y );
qatn.c
Arc tangent
qatn( x, y );
qatn2( x1, x2, y ); y = radian angle whose tangent is x2/x1
qbeta.c
Beta function
qbeta( x, y );
qcbrt.c
Cube root
qcbrt( x, y );
qcmplx.c
Complex variable functions:
qcabs absolute value qcabs( y );
qcadd add
qcsub subtract
qcsub( a, b, y ); y = b - a
qcmul multiply
qcdiv divide
qcdiv( d, n, y ); y = n/d
qcmov move
qcneg negate
qcneg( y );
qcexp exponential function
qclog logarithm
qcsin sine
qccos cosine
qcasin
arcsine
qcos.c
qcosm1(
qcosh.c
qctst1.c
qdawsn.c
qellie.c
qellik.c
qellpe.c
qellpj.c
qellpj(
qellpk.c
qerf.c
qerfc.c
qeuclid.c
qexp.c
qexp10.c
qexp2.c
qexp21.c
qexpn.c
qf68k.a
qf68k.asm
qf68k.s
qfac.c
qfresf.c
qgamma.c
qhead.asm
qhead.h
qhy2f1.c
qhyp.c
qigam.c
qigami.c
qin.c
qincb.c
qincbi.c
qine.c
qjn.c
qjypn.c
qjyqn.c
qkn.c
qkne.c
qlog.c
qcacos
arccosine
qcsqrt square root
qctan tangent
qccot cotangent
qcatan
arctangent
Cosine
x, y );
y = cos(x) - 1
Hyperbolic cosine
Universal function test program for complex variables
Dawson's integral
Incomplete elliptic integral (E)
Incomplete elliptic integral (K)
Complete elliptic integral (E)
Jacobian elliptic functions sn, cn, dn, phi
u, m, sn, cn, dn, phi ); sn = sn(u|m), etc.
Complete elliptic integral (K)
Error integral
Complementary error integral
Q type rational arithmetic:
qradd add fractions
qrsub subtract fractions
qrmul multiply fractions
qrdiv divide fractions
qreuclid reduce to lowest terms
Exponential function
Base 10 exponential function
Base 2 exponential function
2**x - 1
Exponential integral
Q type arithmetic for 68000 OS-9
Q type arithmetic for 68000 (Definicon assembler)
Q type arithmetic for 68000 (System V Unix)
Factorial
Fresnel integral S(x)
Fresnel integral C(x)
Gamma function
log Gamma function
Q type configuration file for assembly language
Q type configuration file for C language
Gauss hypergeometric function
Confluent hypergeometric function
Incomplete gamma integral
Functional inverse of incomplete gamma integral
Bessel function In
Incomplete beta integral
Functional inverse of incomplete beta integral
Exponentially weighted In
Bessel function Jv (noninteger order)
qhank Hankel's asymptotic expansion
Auxiliary Bessel functions
modified Bessel function Kn
Exponentially weighted Kn
Natural logarithm
qlog1.c
qlog10.c
qndtr.c
qndtri.c
qpolyr.c
log(1+x)
Common logarithm
Gaussian distribution function
Functional inverse of Gaussian distribution function
Q type polynomial arithmetic, rational coefficients:
poleva
Evaluate polynomial a(t) at t = x.
polprt
Print the coefficients of a to D digits.
polclr
Set a identically equal to zero, up to
a[na].
qpow.c
qprob.c
qpsi.c
qshici.c
qsici.c
qsimq.c
qsin.c
qsindg.c
qsinh.obj
qspenc.c
qsqrt.c
qsqrta.c
qstudt.c
qtan.c
qtanh.c
qtst1.c
qyn.c
polmov
Set b = a.
poladd
c = b + a, nc = max(na,nb)
polsub
c = b - a, nc = max(na,nb)
polmul
c = b * a, nc = na+nb
poldiv
c = b / a, nc = MAXPOL
Power function, also
qpowi raise to integer power
Various probability integrals:
qbdtr binomial distribution
qbdtrc complemented binomial distribution
qbdtri inverse of binomial distribution
qchdtr chi-square distribution
qchdti
inverse of chi-square distribution
qfdtr F distribution
qfdtrc
complemented F distribution
qfdtri
inverse of F distribution
qgdtr gamma distribution
qgdtrc
complemented gamma distribution
qnbdtr
negative binomial distribution
qnbdtc
complemented negative binomial
qpdtr Poisson distribution
qpdtrc
complemented Poisson distribution
qpdtri
inverse of Poisson distribution
psi function
hyperbolic sine integral
hyperbolic cosine integral
sine integral
cosine integral
solve simultaneous equations
sine
qsinmx3(x,y); y = sin(x) - x
sine of arg in degrees
hyperbolic sine
Spence's integral (dilogarithm)
square root
strictly rounded square root
Student's t distribution function
tangent
hyperbolic tangent
Universal function test program
Bessel function Yn (integer order), also
qyaux0
auxiliary functions
qyaux1
qymod modulus
qyphase
phase
qzetac.c
Riemann zeta function
Arithmetic routines
qflt.c
Main Q type arithmetic package:
asctoq
decimal ASCII string to Q type
dtoq DEC double precision to Q type
etoq IEEE double precision to Q type
ltoq long integer to Q type
qabs absolute value
qadd add
qclear
set to zero
qcmp compare
qdiv divide
qifrac
long integer part plus q type fraction
qinfin
set to infinity, leaving its sign alone
qmov b = a
qmul multiply
qmuli multiply by small integer
qneg negate
qnrmlz
adjust exponent and mantissa
qsub subtract
qtoasc
Q type to decimal ASCII string
qtod convert Q type to DEC double precision
qtoe convert Q type to IEEE double precision
qflta.c
Q type arithmetic, C language loops, strict rounding
qfltb.c
Q type arithmetic, C language faster loops
mulr.asm
Q type multiply, IBM PC assembly language
divn.asm
Q type IBM PC divide routine
subm.asm
Q type assembly language add, subtract for MSDOS
qfltd.asm
Q type arithmetic for 68020 (Definicon assembler)
qconst.c
Q type common constants
qc120.c
120 decimal version of qconst.c
mul128.a
Fast multiply algorithm (for OS-9 68000)
mul128ts.c
Test program for above
mul32.a
mul64.a
qfloor.c
Q type floor(), also
qround() round to integer
Applications
calc100.doc
qcalc.c
qcalc.h
qcalc120.exe
qcalcasm.bat
qcalclin.bat
qccalc.mak
Documentation for 100 digit calculator program
Command interpreter for calculator program
Include file for command interpreter
120 decimal calculator program
Make calculator program
Make complex variable calculator program
qparanoi.c
notes
qparanoi.mak
Paranoia arithmetic test for Q type arithmetic
Paranoia documentation
Paranoia makefile
etst.c
etstasm.bat
etstlink.bat
dentst.c
Arithmetic demo program
qstirling.c
Find coefficients for Stirling's formula
qbernum.c
qbernum.lst
qbernuma.bat
Generates Bernoulli numbers
frexp(), ldexp() tester
Calculator programs for qcalc
euler.tak
gamcof.tak
gamma.tak
lgamnum.doc
lgamnum.tak
zeta.tak
ctest.tak
Euler's constant
Bernoulli numbers for gamma function
Gamma function
Stirling's formula
zeta function
exercise complex variable calculator
A: absolute error; others are relative error (i.e., % of reading)
Copyright 1984 - 1992 by Stephen L. Moshier
Release
Release
Release
Release
Release
Release
1.0:
1.1:
1.2:
2.0:
2.1:
2.2:
July, 1984
March, 1985
May, 1986
April, 1987
March, 1989
July, 1992
Download