爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 25306|回复: 53

[源代码] 特殊函数的fortran程序集

[复制链接]

新浪微博达人勋

发表于 2013-6-9 17:51:24 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册 新浪微博登陆

x
本帖最后由 hillside 于 2013-6-9 19:21 编辑

       特殊函数在多个学科的数值模拟中有关广泛的应用。现介绍几个有一定代表性的特殊函数程序集



1.美国伊利诺伊大学香槟分校http://jin.ece.illinois.edu特殊函数程序集(specfun.zip  

                                              FORTRAN routines for computation of Special Functions
      All of these programs are written in FORTRAN-77 and tested on PCs and workstations. Therefore, they should run on any computer with implementation of the FORTRAN-77 standard.
      Although we have made a great effort to test these programs, we would not be surprised to find some errors in them. We would appreciate it if you can bring to our attention any errors you find. You can do this by either writing us directly at the location (e-mail: j-jin1@uiuc.edu) or writing to the publisher. However, we must note that all these programs are provided "as is," and we cannot guarantee to correct the errors reported by readers on any fixed schedule.
      All the programs and subroutines contained in this archive are copyrighted. However, we give permission to the user who downloads these routines to incorporate any of these routines into his or her programs provided that the copyright is acknowledged.
      Regarding the specifics of the programs, we want to make the following two points:

  • All the programs are written in double precision. Although the use of double precision is necessary for some programs, especially for those based on series expansions, it is not necessary for all programs. For example, the computation of of special functions based on polynomial approximations does not have to use double precision. We chose to write all the programs using double precision in order to avoid possible confusion which may occur in using these programs. If necessary, you can convert the programs into the single precision format easily. However, doing so for some programs may lead to a lower accuracy.
  • In the main programs that calculate a sequence of special functions, we usually set the maximum order or degree to 100 or 250. However, this is not a limit. To compute functions with a higher order or degree, all you need to do is simply set the dimension of proper arrays higher.


For detailed description of the algorithm of each program, please consult the book "Computation of Special Functions."

Also see Errata
(Please note that all file names of programs in this archive begin with an M, for example, MBERNOA.FOR. o the the bottom of this page if you wish to download all the programs.)





    LIST OF PROGRAMS:(Full program can be downloaded at the bottom of the page)

mbernoa.for (BERNOA) Evaluate a sequence of Bernoulli numbers (method 1).mbernob.for (BERNOB) Evaluate a sequence of Bernoulli numbers (method 2).
meulera.for (EULERA) Evaluate a sequence of Euler numbers (method 1).
meulerb.for (EULERB) Evaluate a sequence of Euler numbers (method 2).
*****
mothpl.for (OTHPL) Evaluate a sequence of orthogonal polynomials and their derivatives, including Chebyshev, Laguerre, and Hermite polynomials.
mlegzo.for (LEGZO) Evaluate the nodes and weights for Gauss-Legendre quadrature.
mlagzo.for (LAGZO) Evaluate the nodes and weights for Gauss-Laguerre quadrature.
mherzo.for (HERZO) Evaluate the nodes and weights for Gauss-Hermite quadrature.
*****
mgamma.for (GAMMA) Evaluate the gamma function.
mlgama.for (LGAMA) Evaluate the gamma function or the logarithm of the gamma function.
mcgama.for (CGAMA) Evaluate the gamma function with a complex argument.
mbeta.for (BETA) Evaluate the beta function.
mpsi.for (PSI) Evaluate the psi function.
mcpsi.for (CPSI) Evaluate the psi function with a complex argument.
mincog.for (INCOG) Evaluate the incomplete gamma function.
mincob.for (INCOB) Evaluate the incomplete beta function.
*****
mlpn.for (LPN) Evaluate a sequence of Legendre polynomials and their derivatives with real arguments.
mclpn.for (CLPN) Evaluate a sequence of Legendre polynomials and their derivatives with complex arguments.
mlpni.for (LPNI) Evaluate a sequence of Legendre polynomials, their derivatives, and their integrals.
mlqna.for (LQNA) Evaluate a sequence of Legendre functions of the second kind and their derivatives with restricted real arguments.
mlqnb.for (LQNB) Evaluate a sequence of Legendre functions of the second kind and their derivatives with nonrestricted real arguments.
mclqn.for (CLQN) Evaluate a sequence of Legendre functions of the second kind and their derivatives with complex arguments.
mlpmn.for (LPMN) Evaluate a sequence of associated Legendre polynomials and their derivatives with real arguments.
mlpmn.for (CLPMN) Evaluate a sequence of associated Legendre polynomials and their derivatives with complex arguments.
mlqmn.for (LQMN) Evaluate a sequence of associated Legendre functions of the second kind and their derivatives with real arguments.
mclqmn.for (CLQMN) Evaluate a sequence of associated Legendre functions of the second kind and their derivatives with complex arguments.
mlpmv.for (LPMV) Evaluate associated Legendre functions of the first kind with an integer order and arbitrary non-negative degree.
*****
mjy01a.for (JY01A) Evaluate the zeroth- and first-order Bessel functions of the first and second kinds with real arguments using series and asymptotic expansions.
mjy01b.for (JY01B) Evaluate the zeroth- and first-order Bessel functions of the first and second kinds with real arguments using polynomial approximations.
mjyna.for (JYNA) Evaluate a sequence of Bessel functions of the first and second kinds and their derivatives with integer orders and real arguments (method 1).
mjynb.for (JYNB) Evaluate a sequence of Bessel functions of the first and second kinds and their derivatives with integer orders and real arguments (method 2).
mcjy01.for (CJY01) Evaluate the zeroth- and first-order Bessel functions of the first and second kinds and their derivatives with complex arguments.
mcjyna.for (CJYNA) Evaluate a sequence of Bessel functions of the first and second kinds and their derivatives with integer orders and complex arguments (method 1).
mcjynb.for (CJYNB) Evaluate a sequence of Bessel functions of the first and second kinds and their derivatives with integer orders and complex arguments (method 2).
mjyv.for (JYV) Evaluate a sequence of Bessel functions of the first and second kinds and their derivatives with arbitrary real orders and real arguments.
mcjyva.for (CJYVA) Evaluate a sequence of Bessel functions of the first and second kinds and their derivatives with arbitrary real orders and complex arguments (method 1).
mcjyvb.for (CJYVB) Evaluate a sequence of Bessel functions of the first and second kinds and their derivatives with arbitrary real orders and complex arguments (method 2).
mcjk.for (CJK) Evaluate the coefficients for the asymptotic expansion of Bessel functions for large orders.
mcjylv.for (CJYLV) Evaluate Bessel functions of the first and second kinds and their derivatives with a large arbitrary real order and complex arguments.
mjyzo.for (JYZO) Evaluate the zeros of the Bessel functions of the first and second kinds and their derivatives.
mjdzo.for (JDZO) Evaluate the zeros of the Bessel functions of the first kind and their derivatives.
mcyzo.for (CYZO) Evaluate the complex zeros of the Bessel functions of the second kind of order zero and one.
mlamn.for (LAMN) Evaluate a sequence of lambda functions with integer orders and their derivatives.
mlamv.for (LAMV) Evaluate a sequence of lambda functions with arbitrary orders and their derivatives.
*****
mik01a.for (IK01A) Evaluate the zeroth- and first-order modified Bessel functions of the first and second kinds with real arguments.
mik01b.for (IK01B) Evaluate the zeroth- and first-order modified Bessel functions of the first and second kinds with real arguments.
mikna.for (IKNA) Evaluate a sequence of modified Bessel functions of the first and second kinds and their derivatives with integer orders and real arguments (method 1).
miknb.for (IKNB) Evaluate a sequence of modified Bessel functions of the first and second kinds and their derivatives with integer orders and real arguments (method 2).
mcik01.for (CIK01) Evaluate the zeroth- and first-order modified Bessel functions of the first and second kinds and their derivatives with complex arguments.
mcikna.for (CIKNA) Evaluate a sequence of modified Bessel functions of the first and second kinds and their derivatives with integer orders and complex arguments (method 1).
mciknb.for (CIKNB) Evaluate a sequence of modified Bessel functions of the first and second kinds and their derivatives with integer orders and complex arguments (method 2).
mikv.for (IKV) Evaluate a sequence of modified Bessel functions of the first and second kinds and their derivatives with arbitrary real orders and real arguments.
mcikva.for (CIKVA) Evaluate a sequence of modified Bessel functions of the first and second kinds and their derivatives with arbitrary real orders and complex arguments.
mcikvb.for (CIKVB) Evaluate a sequence of modified Bessel functions of the first and second kinds and their derivatives with arbitrary real orders and complex arguments.
mciklv.for (CIKLV) Evaluate modified Bessel functions of the first and second kinds and their derivatives with a large arbitrary real order and complex arguments.
mch12n.for (CH12N) Evaluate a sequence of Hankel functions of the first and second kinds and their derivatives with integer orders and complex arguments.
*****
mitjya.for (ITJYA) Evaluate the integral of Bessel functions J0(t) and Y0(t) from 0 to x using series and asymptotic expansions.
mitjyb.for (ITJYB) Evaluate the integral of Bessel functions J0(t) and Y0(t) from 0 to x using polynomial approximations.
mittjya.for (ITTJYA) Evaluate the integral of [1-J0(t)]/t from 0 to x and Y0(t)/t from x to infinity using series and asymptotic expansions.
mittjyb.for (ITTJYB) Evaluate the integral of [1-J0(t)]/t from 0 to x and Y0(t)/t from x to infinity using polynomial approximations.
mitika.for (ITIKA) Evaluate the integral of modified Bessel functions I0(t) and K0(t) from 0 to x using series and asymptotic expansions.
mitikb.for (ITIKB) Evaluate the integral of modified Bessel functions I0(t) and K0(t) from 0 to x using polynomial approximations.
mittika.for (ITTIKA) Evaluate the integral of [1-I0(t)]/t from 0 to x and K0(t) from x to infinity using series and asymptotic expansions.
mittikb.for (ITTIKB) Evaluate the integral of [1-I0(t)]/t from 0 to x and K0(t) from x to infinity using polynomial approximations.
****
msphj.for (SPHJ) Evaluate a sequence of spherical Bessel functions of the first kind and their derivatives with integer orders and real arguments.
msphy.for (SPHY) Evaluate a sequence of spherical Bessel functions of the second kind and their derivatives with integer orders and real arguments.
mcsphjy.for (CSPHJY) Evaluate a sequence of spherical Bessel functions of the first and second kinds and their derivatives with integer orders and complex arguments.
mrctj.for (RCTJ) Evaluate a sequence of Riccati-Bessel functions and their derivatives of the first kind.
mrcty.for (RCTY) Evaluate a sequence of Riccati-Bessel functions and their derivatives of the second kind.
msphi.for (SPHI) Evaluate a sequence of modified spherical Bessel functions of the first kind and their derivatives with integer orders and real arguments.
msphk.for (SPHK) Evaluate a sequence of modified spherical Bessel functions of the second kind and their derivatives with integer orders and real arguments.
mcsphik.for (CSPHIK) Evaluate a sequence of modified spherical Bessel functions of the first and second kinds and their derivatives with integer orders and complex arguments.
*****
mklvna.for (KLVNA) Evaluate the Kelvin functions and their derivatives using series and asymptotic expansions.
mklvnb.for (KLVNB) Evaluate the Kelvin functions and their derivatives using polynomial approximations.
mklvnzo.for (KLVNZO) Evaluate the zeros of the Kelvin functions and their derivatives.
*****
mairya.for (AIRYA) Evaluate the Airy functions and their derivatives by means of Bessel functions.
mairyb.for (AIRYB) Evaluate the Airy functions and their derivatives using the series and asymptotic expansions.
mitairy.for (ITAIRY) Evaluate the integral of the Airy functions.
mairyzo.for (AIRYZO) Evaluate the zeros of Airy functions and their derivatives.
*****
mstvh0.for (STVH0) Evaluate the zeroth-order Struve function.
mstvh1.for (STVH1) Evaluate the first-order Struve function.
mstvhv.for (STVHV) Evaluate the Struve functions with an arbitrary order.
mitsh0.for (ITSH0) Evaluate the integral of Struve function H0(t) from 0 to x.
mitth0.for (ITTH0) Evaluate the integral of H0(t)/t from x to infinity.
mstvl0.for (STVL0) Evaluate the zeroth-order modified Struve function.
mstvl1.for (STVL1) Evaluate the first-order modified Struve function.
mstvlv.for (STVLV) Evaluate the modified Struve function with an arbitrary order.
mitls0.for (ITSL0) Evaluate the integral of modified Struve function L0(t) from 0 to x.
*****
mhygfx.for (HYGFX) Evaluate the hypergeometric function with real arguments.
mhygfz.for (HYGFZ) Evaluate the hypergeometric function with complex arguments.
*****
mchgm.for (CHGM) Evaluate the confluent hypergeometric function M(a,b,x) with real arguments.
mcchg.for (CCHG) Evaluate the confluent hypergeometric function M(a,b,z) with complex arguments.
mchgu.for (CHGU) Evaluate the confluent hypergeometric function U(a,b,x) with real arguments.
*****
mpbdv.for (PBDV) Evaluate a sequence of parabolic cylinder functions Dv(x) and their derivatives.
mpbvv.for (PBVV) Evaluate a sequence of parabolic cylinder functions Vv(x) and their derivatives.
mpbwa.for (PBWA) Evaluate parabolic cylinder functions W(a,+/-x) and their derivatives.
mcpbdn.for (CPBDN) Evaluate a sequence of parabolic cylinder functions Dn(z) and their derivatives for complex arguments.
*****
mcva1.for (CVA1) Evaluate a sequence of characteristic values for the Mathieu and modified Mathieu functions.
mcva2.for (CVA2) Evaluate a specific characteristic value for the Mathieu and modified Mathieu functions.
mfcoef.for (FCOEF) Evaluate the expansion coefficients for the Mathieu and modified Mathieu functions.
mmtu0.for (MTU0) Evaluate the Mathieu functions and their derivatives.
mmtu12.for (MTU12) Evaluate the modified Mathieu functions of the first and second kinds and their derivatives.
*****
msegv.for (SEGV) Evaluate a sequence of characteristic values for spheroidal wave functions.
msdmn.for (SDMN) Evaluate the expansion coefficients d_k^mn for spheroidal wave functions.
mscka.for (SCKA) Evaluate the expansion coefficients c_2k^mn for spheroidal wave functions (method 1).
msckb.for (SCKB) Evaluate the expansion coefficients c_2k^mn for spheroidal wave functions (method 2).
maswfa.for (ASWFA) Evaluate the angular spheroidal wave functions of the first kind (method 1).
maswfb.for (ASWFB) Evaluate the angular spheroidal wave functions of the first kind (method 2).
mrswfp.for (RSWFP) Evaluate the radial prolate spheroidal wave functions of the first and second kinds.
mrswfo.for (RSWFO) Evaluate the radial oblate spheroidal wave functions of the first and second kinds.
mlpmns.for (LPMNS) Evaluate a sequence of the associated Legendre functions of the first kind and their derivatives with real arguments for a given order.
mlqmns.for (LQMNS) Evaluate a sequence of the associated Legendre functions of the second kind and their derivatives with real arguments for a given order.
*****
merror.for (ERROR) Evaluate the error function.
mcerror.for (CERROR) Evaluate the error function with a complex argument.
*****
mfcs.for (FCS) Evaluate the Fresnel Integrals.
mffk.for (FFK) Evaluate the modified Fresnel integrals.
mcerzo.for (CERZO) Evaluate the complex zeros of the error function.
mfcszo.for (FCSZO) Evaluate the complex zeros of the Fresnel Integrals.
*****
mcisia.for (CISIA) Evaluate the cosine and sine integrals using their series and asymptotic expansions.
mcisib.for (CISIB) Evaluate the cosine and sine integrals using their rational approximations.
*****
mcomelp.for (COMELP) Evaluate the complete elliptic integrals of the first and second kinds.
melit.for (ELIT) Evaluate the incomplete elliptic integrals of the first and second kinds.
melit3.for (ELIT3) Evaluate the complete and incomplete elliptic integrals of the third kind.
mjelp.for (JELP) Evaluate the Jacobian elliptic functions.
*****
me1xa.for (E1XA) Evaluate the exponential integral E1(x) using its polynomial approximations.
me1xb.for (E1XB) Evaluate the exponential integral E1(x) using its series and continued fraction expressions.
me1z.for (E1Z) Evaluate the exponential integral E1(z) for complex arguments.
menxa.for (ENXA) Evaluate a sequence of exponential integrals En(x) (method 1).
menxb.for (ENXB) Evaluate a sequence of exponential integrals En(x) (method 2).
meix.for (EIX) Evaluate the exponential integral Ei(x).

2.特殊函数程序集(由《Computation of Special Functions》一书的作者编写)
    The source code from `Computation of Special Functions' by Zhang & Jin, published by Wiley, 1996. As well as the `usual' functions such as gamma, error function, Bessel and Airy functions, there are the confluent hypergeometric, parabolic cylinder, Mathieu, spheroidal wave, and various exponential integrals, etc.文件夹名称为zhangjin.zip

specfun.zip

258.36 KB, 下载次数: 111, 下载积分: 金钱 -5

zhangjin.zip

311.31 KB, 下载次数: 67, 下载积分: 金钱 -5

密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2013-6-9 19:19:46 | 显示全部楼层
mark这个好
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2013-6-9 19:24:53 | 显示全部楼层
嘿嘿嘿,谢了啊{:soso_e142:}{:soso_e142:}{:soso_e142:}{:soso_e142:}
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2013-6-9 20:20:07 | 显示全部楼层
感谢分享!!!!!!!!!
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2013-6-10 00:22:39 | 显示全部楼层
额~顶下楼主,感谢分享
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2013-6-10 11:36:52 | 显示全部楼层
感谢分享!!!!!!!!!
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2013-6-11 19:33:02 | 显示全部楼层
顶一个哈哦
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2013-6-23 20:19:18 | 显示全部楼层
很高深很强大!
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2013-6-24 20:23:48 | 显示全部楼层
不错的东东!
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2013-10-2 10:32:51 | 显示全部楼层
好东西啊 谢谢~~
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表