⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fermi_dirac.c

📁 该文件为c++的数学函数库!是一个非常有用的编程工具.它含有各种数学函数,为科学计算、工程应用等程序编写提供方便!
💻 C
📖 第 1 页 / 共 3 页
字号:
/* specfunc/fermi_dirac.c *  * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman *  * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. *  * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU * General Public License for more details. *  * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *//* Author:  G. Jungman */#include <config.h>#include <gsl/gsl_math.h>#include <gsl/gsl_errno.h>#include <gsl/gsl_sf_exp.h>#include <gsl/gsl_sf_gamma.h>#include <gsl/gsl_sf_hyperg.h>#include <gsl/gsl_sf_pow_int.h>#include <gsl/gsl_sf_zeta.h>#include <gsl/gsl_sf_fermi_dirac.h>#include "error.h"#include "chebyshev.h"#include "cheb_eval.c"#define locEPS  (1000.0*GSL_DBL_EPSILON)/* Chebyshev fit for F_{1}(t);  -1 < t < 1, -1 < x < 1 */static double fd_1_a_data[22] = {  1.8949340668482264365,  0.7237719066890052793,  0.1250000000000000000,  0.0101065196435973942,  0.0, -0.0000600615242174119,  0.0,  6.816528764623e-7,  0.0, -9.5895779195e-9,  0.0,  1.515104135e-10,  0.0, -2.5785616e-12,  0.0,  4.62270e-14,  0.0, -8.612e-16,  0.0,  1.65e-17,  0.0, -3.e-19};static cheb_series fd_1_a_cs = {  fd_1_a_data,  21,  -1, 1,  12};/* Chebyshev fit for F_{1}(3/2(t+1) + 1);  -1 < t < 1, 1 < x < 4 */static double fd_1_b_data[22] = {  10.409136795234611872,  3.899445098225161947,  0.513510935510521222,  0.010618736770218426, -0.001584468020659694,  0.000146139297161640, -1.408095734499e-6, -2.177993899484e-6,  3.91423660640e-7, -2.3860262660e-8, -4.138309573e-9,  1.283965236e-9, -1.39695990e-10, -4.907743e-12,  4.399878e-12, -7.17291e-13,  2.4320e-14,  1.4230e-14, -3.446e-15,  2.93e-16,  3.7e-17, -1.6e-17};static cheb_series fd_1_b_cs = {  fd_1_b_data,  21,  -1, 1,  11};/* Chebyshev fit for F_{1}(3(t+1) + 4);  -1 < t < 1, 4 < x < 10 */static double fd_1_c_data[23] = {  56.78099449124299762,  21.00718468237668011,  2.24592457063193457,  0.00173793640425994, -0.00058716468739423,  0.00016306958492437, -0.00003817425583020,  7.64527252009e-6, -1.31348500162e-6,  1.9000646056e-7, -2.141328223e-8,  1.23906372e-9,  2.1848049e-10, -1.0134282e-10,  2.484728e-11, -4.73067e-12,  7.3555e-13, -8.740e-14,  4.85e-15,  1.23e-15, -5.6e-16,  1.4e-16, -3.e-17};static cheb_series fd_1_c_cs = {  fd_1_c_data,  22,  -1, 1,  13};/* Chebyshev fit for F_{1}(x) / x^2 * 10 < x < 30  * -1 < t < 1 * t = 1/10 (x-10) - 1 = x/10 - 2 * x = 10(t+2) */static double fd_1_d_data[30] = {  1.0126626021151374442, -0.0063312525536433793,  0.0024837319237084326, -0.0008764333697726109,  0.0002913344438921266, -0.0000931877907705692,  0.0000290151342040275, -8.8548707259955e-6,  2.6603474114517e-6, -7.891415690452e-7,  2.315730237195e-7, -6.73179452963e-8,  1.94048035606e-8, -5.5507129189e-9,  1.5766090896e-9, -4.449310875e-10,  1.248292745e-10, -3.48392894e-11,  9.6791550e-12, -2.6786240e-12,  7.388852e-13, -2.032828e-13,  5.58115e-14, -1.52987e-14,  4.1886e-15, -1.1458e-15,  3.132e-16, -8.56e-17,  2.33e-17, -5.9e-18};static cheb_series fd_1_d_cs = {  fd_1_d_data,  29,  -1, 1,  14};/* Chebyshev fit for F_{1}(x) / x^2 * 30 < x < Inf * -1 < t < 1 * t = 60/x - 1 * x = 60/(t+1) */static double fd_1_e_data[10] = {  1.0013707783890401683,  0.0009138522593601060,  0.0002284630648400133, -1.57e-17, -1.27e-17, -9.7e-18, -6.9e-18, -4.6e-18, -2.9e-18, -1.7e-18};static cheb_series fd_1_e_cs = {  fd_1_e_data,  9,  -1, 1,  4};/* Chebyshev fit for F_{2}(t);  -1 < t < 1, -1 < x < 1 */static double fd_2_a_data[21] = {  2.1573661917148458336,  0.8849670334241132182,  0.1784163467613519713,  0.0208333333333333333,  0.0012708226459768508,  0.0, -5.0619314244895e-6,  0.0,  4.32026533989e-8,  0.0, -4.870544166e-10,  0.0,  6.4203740e-12,  0.0, -9.37424e-14,  0.0,  1.4715e-15,  0.0, -2.44e-17,  0.0,  4.e-19};static cheb_series fd_2_a_cs = {  fd_2_a_data,  20,  -1, 1,  12};/* Chebyshev fit for F_{2}(3/2(t+1) + 1);  -1 < t < 1, 1 < x < 4 */static double fd_2_b_data[22] = {  16.508258811798623599,  7.421719394793067988,  1.458309885545603821,  0.128773850882795229,  0.001963612026198147, -0.000237458988738779,  0.000018539661382641, -1.92805649479e-7, -2.01950028452e-7,  3.2963497518e-8, -1.885817092e-9, -2.72632744e-10,  8.0554561e-11, -8.313223e-12, -2.24489e-13,  2.18778e-13, -3.4290e-14,  1.225e-15,  5.81e-16, -1.37e-16,  1.2e-17,  1.e-18};static cheb_series fd_2_b_cs = {  fd_2_b_data,  21,  -1, 1,  12};/* Chebyshev fit for F_{1}(3(t+1) + 4);  -1 < t < 1, 4 < x < 10 */static double fd_2_c_data[20] = {  168.87129776686440711,  81.80260488091659458,  15.75408505947931513,  1.12325586765966440,  0.00059057505725084, -0.00016469712946921,  0.00003885607810107, -7.89873660613e-6,  1.39786238616e-6, -2.1534528656e-7,  2.831510953e-8, -2.94978583e-9,  1.6755082e-10,  2.234229e-11, -1.035130e-11,  2.41117e-12, -4.3531e-13,  6.447e-14, -7.39e-15,  4.3e-16};static cheb_series fd_2_c_cs = {  fd_2_c_data,  19,  -1, 1,  12};/* Chebyshev fit for F_{1}(x) / x^3 * 10 < x < 30  * -1 < t < 1 * t = 1/10 (x-10) - 1 = x/10 - 2 * x = 10(t+2) */static double fd_2_d_data[30] = {  0.3459960518965277589, -0.00633136397691958024,  0.00248382959047594408, -0.00087651191884005114,  0.00029139255351719932, -0.00009322746111846199,  0.00002904021914564786, -8.86962264810663e-6,  2.66844972574613e-6, -7.9331564996004e-7,  2.3359868615516e-7, -6.824790880436e-8,  1.981036528154e-8, -5.71940426300e-9,  1.64379426579e-9, -4.7064937566e-10,  1.3432614122e-10, -3.823400534e-11,  1.085771994e-11, -3.07727465e-12,  8.7064848e-13, -2.4595431e-13,  6.938531e-14, -1.954939e-14,  5.50162e-15, -1.54657e-15,  4.3429e-16, -1.2178e-16,  3.394e-17, -8.81e-18};static cheb_series fd_2_d_cs = {  fd_2_d_data,  29,  -1, 1,  14};/* Chebyshev fit for F_{2}(x) / x^3 * 30 < x < Inf * -1 < t < 1 * t = 60/x - 1 * x = 60/(t+1) */static double fd_2_e_data[4] = {  0.3347041117223735227,  0.00091385225936012645,  0.00022846306484003205,  5.2e-19};static cheb_series fd_2_e_cs = {  fd_2_e_data,  3,  -1, 1,  3};/* Chebyshev fit for F_{-1/2}(t);  -1 < t < 1, -1 < x < 1 */static double fd_mhalf_a_data[20] = {  1.2663290042859741974,  0.3697876251911153071,  0.0278131011214405055, -0.0033332848565672007, -0.0004438108265412038,  0.0000616495177243839,  8.7589611449897e-6, -1.2622936986172e-6, -1.837464037221e-7,  2.69495091400e-8,  3.9760866257e-9, -5.894468795e-10, -8.77321638e-11,  1.31016571e-11,  1.9621619e-12, -2.945887e-13, -4.43234e-14,  6.6816e-15,  1.0084e-15, -1.561e-16};static cheb_series fd_mhalf_a_cs = {  fd_mhalf_a_data,  19,  -1, 1,  12};/* Chebyshev fit for F_{-1/2}(3/2(t+1) + 1);  -1 < t < 1, 1 < x < 4 */static double fd_mhalf_b_data[20] = {  3.270796131942071484,  0.5809004935853417887, -0.0299313438794694987, -0.0013287935412612198,  0.0009910221228704198, -0.0001690954939688554,  6.5955849946915e-6,  3.5953966033618e-6, -9.430672023181e-7,  8.75773958291e-8,  1.06247652607e-8, -4.9587006215e-9,  7.160432795e-10,  4.5072219e-12, -2.3695425e-11,  4.9122208e-12, -2.905277e-13, -9.59291e-14,  3.00028e-14, -3.4970e-15};static cheb_series fd_mhalf_b_cs = {  fd_mhalf_b_data,  19,  -1, 1,  12};/* Chebyshev fit for F_{-1/2}(3(t+1) + 4);  -1 < t < 1, 4 < x < 10 */static double fd_mhalf_c_data[25] = {  5.828283273430595507,  0.677521118293264655, -0.043946248736481554,  0.005825595781828244, -0.000864858907380668,  0.000110017890076539, -6.973305225404e-6, -1.716267414672e-6,  8.59811582041e-7, -2.33066786976e-7,  4.8503191159e-8, -8.130620247e-9,  1.021068250e-9, -5.3188423e-11, -1.9430559e-11,  8.750506e-12, -2.324897e-12,  4.83102e-13, -8.1207e-14,  1.0132e-14, -4.64e-16, -2.24e-16,  9.7e-17, -2.6e-17,  5.e-18};static cheb_series fd_mhalf_c_cs = {  fd_mhalf_c_data,  24,  -1, 1,  13};/* Chebyshev fit for F_{-1/2}(x) / x^(1/2) * 10 < x < 30  * -1 < t < 1 * t = 1/10 (x-10) - 1 = x/10 - 2 */static double fd_mhalf_d_data[30] = {  2.2530744202862438709,  0.0018745152720114692, -0.0007550198497498903,  0.0002759818676644382, -0.0000959406283465913,  0.0000324056855537065, -0.0000107462396145761,  3.5126865219224e-6, -1.1313072730092e-6,  3.577454162766e-7, -1.104926666238e-7,  3.31304165692e-8, -9.5837381008e-9,  2.6575790141e-9, -7.015201447e-10,  1.747111336e-10, -4.04909605e-11,  8.5104999e-12, -1.5261885e-12,  1.876851e-13,  1.00574e-14, -1.82002e-14,  8.6634e-15, -3.2058e-15,  1.0572e-15, -3.259e-16,  9.60e-17, -2.74e-17,  7.6e-18, -1.9e-18};static cheb_series fd_mhalf_d_cs = {  fd_mhalf_d_data,  29,  -1, 1,  15};/* Chebyshev fit for F_{1/2}(t);  -1 < t < 1, -1 < x < 1 */static double fd_half_a_data[23] = {  1.7177138871306189157,  0.6192579515822668460,  0.0932802275119206269,  0.0047094853246636182, -0.0004243667967864481, -0.0000452569787686193,  5.2426509519168e-6,  6.387648249080e-7, -8.05777004848e-8, -1.04290272415e-8,  1.3769478010e-9,  1.847190359e-10, -2.51061890e-11, -3.4497818e-12,  4.784373e-13,  6.68828e-14, -9.4147e-15,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -