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

📄 sici.c

📁 linux下用PCMCIA无线网卡虚拟无线AP的程序源码
💻 C
📖 第 1 页 / 共 2 页
字号:
/*							sici.c * *	Sine and cosine integrals * * * * SYNOPSIS: * * double x, Ci, Si, sici(); * * sici( x, &Si, &Ci ); * * * DESCRIPTION: * * Evaluates the integrals * *                          x *                          - *                         |  cos t - 1 *   Ci(x) = eul + ln x +  |  --------- dt, *                         |      t *                        - *                         0 *             x *             - *            |  sin t *   Si(x) =  |  ----- dt *            |    t *           - *            0 * * where eul = 0.57721566490153286061 is Euler's constant. * The integrals are approximated by rational functions. * For x > 8 auxiliary functions f(x) and g(x) are employed * such that * * Ci(x) = f(x) sin(x) - g(x) cos(x) * Si(x) = pi/2 - f(x) cos(x) - g(x) sin(x) * * * ACCURACY: *    Test interval = [0,50]. * Absolute error, except relative when > 1: * arithmetic   function   # trials      peak         rms *    IEEE        Si        30000       4.4e-16     7.3e-17 *    IEEE        Ci        30000       6.9e-16     5.1e-17 *    DEC         Si         5000       4.4e-17     9.0e-18 *    DEC         Ci         5300       7.9e-17     5.2e-18 *//*Cephes Math Library Release 2.1:  January, 1989Copyright 1984, 1987, 1989 by Stephen L. MoshierDirect inquiries to 30 Frost Street, Cambridge, MA 02140*/#include <math.h>#ifdef UNKstatic double SN[] = {-8.39167827910303881427E-11, 4.62591714427012837309E-8,-9.75759303843632795789E-6, 9.76945438170435310816E-4,-4.13470316229406538752E-2, 1.00000000000000000302E0,};static double SD[] = {  2.03269266195951942049E-12,  1.27997891179943299903E-9,  4.41827842801218905784E-7,  9.96412122043875552487E-5,  1.42085239326149893930E-2,  9.99999999999999996984E-1,};#endif#ifdef DECstatic unsigned short SN[] = {0127670,0104362,0167505,0035161,0032106,0127177,0032131,0056461,0134043,0132213,0000476,0172351,0035600,0006331,0064761,0032665,0137051,0055601,0044667,0017645,0040200,0000000,0000000,0000000,};static unsigned short SD[] = {0026417,0004674,0052064,0001573,0030657,0165501,0014666,0131526,0032755,0032133,0034147,0024124,0034720,0173167,0166624,0154477,0036550,0145336,0063534,0063220,0040200,0000000,0000000,0000000,};#endif#ifdef IBMPCstatic unsigned short SN[] = {0xa74e,0x5de8,0x111e,0xbdd7,0x2ba6,0xe68b,0xd5cf,0x3e68,0xde9d,0x6027,0x7691,0xbee4,0x26b7,0x2d3e,0x019b,0x3f50,0xe3f5,0x2936,0x2b70,0xbfa5,0x0000,0x0000,0x0000,0x3ff0,};static unsigned short SD[] = {0x806f,0x8a86,0xe137,0x3d81,0xd66b,0x2336,0xfd68,0x3e15,0xe50a,0x670c,0xa68b,0x3e9d,0x9b28,0xfdb2,0x1ece,0x3f1a,0x8cd2,0xcceb,0x195b,0x3f8d,0x0000,0x0000,0x0000,0x3ff0,};#endif#ifdef MIEEEstatic unsigned short SN[] = {0xbdd7,0x111e,0x5de8,0xa74e,0x3e68,0xd5cf,0xe68b,0x2ba6,0xbee4,0x7691,0x6027,0xde9d,0x3f50,0x019b,0x2d3e,0x26b7,0xbfa5,0x2b70,0x2936,0xe3f5,0x3ff0,0x0000,0x0000,0x0000,};static unsigned short SD[] = {0x3d81,0xe137,0x8a86,0x806f,0x3e15,0xfd68,0x2336,0xd66b,0x3e9d,0xa68b,0x670c,0xe50a,0x3f1a,0x1ece,0xfdb2,0x9b28,0x3f8d,0x195b,0xcceb,0x8cd2,0x3ff0,0x0000,0x0000,0x0000,};#endif#ifdef UNKstatic double CN[] = { 2.02524002389102268789E-11,-1.35249504915790756375E-8, 3.59325051419993077021E-6,-4.74007206873407909465E-4, 2.89159652607555242092E-2,-1.00000000000000000080E0,};static double CD[] = {  4.07746040061880559506E-12,  3.06780997581887812692E-9,  1.23210355685883423679E-6,  3.17442024775032769882E-4,  5.10028056236446052392E-2,  4.00000000000000000080E0,};#endif#ifdef DECstatic unsigned short CN[] = {0027262,0022131,0160257,0020166,0131550,0055534,0077637,0000557,0033561,0021622,0161463,0026575,0135370,0102053,0116333,0000466,0036754,0160454,0122022,0024622,0140200,0000000,0000000,0000000,};static unsigned short CD[] = {0026617,0073177,0107543,0104425,0031122,0150573,0156453,0041517,0033245,0057301,0077706,0110510,0035246,0067130,0165424,0044543,0037120,0164121,0061206,0053657,0040600,0000000,0000000,0000000,};#endif#ifdef IBMPCstatic unsigned short CN[] = {0xe40f,0x3c15,0x448b,0x3db6,0xe02e,0x8ff3,0x0b6b,0xbe4d,0x65b0,0x5c66,0x2472,0x3ece,0x6027,0x739b,0x1085,0xbf3f,0x4532,0x9482,0x9c25,0x3f9d,0x0000,0x0000,0x0000,0xbff0,};static unsigned short CD[] = {0x7123,0xf1ec,0xeecf,0x3d91,0x686a,0x7ba5,0x5a2f,0x3e2a,0xd229,0x2ff8,0xabd8,0x3eb4,0x892c,0x1d62,0xcdcb,0x3f34,0xcaf6,0x2c50,0x1d0a,0x3faa,0x0000,0x0000,0x0000,0x4010,};#endif#ifdef MIEEEstatic unsigned short CN[] = {0x3db6,0x448b,0x3c15,0xe40f,0xbe4d,0x0b6b,0x8ff3,0xe02e,0x3ece,0x2472,0x5c66,0x65b0,0xbf3f,0x1085,0x739b,0x6027,0x3f9d,0x9c25,0x9482,0x4532,0xbff0,0x0000,0x0000,0x0000,};static unsigned short CD[] = {0x3d91,0xeecf,0xf1ec,0x7123,0x3e2a,0x5a2f,0x7ba5,0x686a,0x3eb4,0xabd8,0x2ff8,0xd229,0x3f34,0xcdcb,0x1d62,0x892c,0x3faa,0x1d0a,0x2c50,0xcaf6,0x4010,0x0000,0x0000,0x0000,};#endif#ifdef UNKstatic double FN4[] = {  4.23612862892216586994E0,  5.45937717161812843388E0,  1.62083287701538329132E0,  1.67006611831323023771E-1,  6.81020132472518137426E-3,  1.08936580650328664411E-4,  5.48900223421373614008E-7,};static double FD4[] = {/*  1.00000000000000000000E0,*/  8.16496634205391016773E0,  7.30828822505564552187E0,  1.86792257950184183883E0,  1.78792052963149907262E-1,  7.01710668322789753610E-3,  1.10034357153915731354E-4,  5.48900252756255700982E-7,};#endif#ifdef DECstatic unsigned short FN4[] = {0040607,0107135,0120133,0153471,0040656,0131467,0140424,0017567,0040317,0073563,0121610,0002511,0037453,0001710,0000040,0006334,0036337,0024033,0176003,0171425,0034744,0072341,0121657,0126035,0033023,0054042,0154652,0000451,};static unsigned short FD4[] = {/*0040200,0000000,0000000,0000000,*/0041002,0121663,0137500,0177450,0040751,0156577,0042213,0061552,0040357,0014026,0045465,0147265,0037467,0012503,0110413,0131772,0036345,0167701,0155706,0160551,0034746,0141076,0162250,0123547,0033023,0054043,0056706,0151050,};#endif#ifdef IBMPCstatic unsigned short FN4[] = {0x7ae7,0xb40b,0xf1cb,0x4010,0x83ef,0xf822,0xd666,0x4015,0x00a9,0x7471,0xeeee,0x3ff9,0x019c,0x0004,0x6079,0x3fc5,0x7e63,0x7f80,0xe503,0x3f7b,0xf584,0x3475,0x8e9c,0x3f1c,0x4025,0x5b35,0x6b04,0x3ea2,};static unsigned short FD4[] = {/*0x0000,0x0000,0x0000,0x3ff0,*/0x1fe5,0x77e8,0x5476,0x4020,0x6c6d,0xe891,0x3baf,0x401d,0xb9d7,0xc966,0xe302,0x3ffd,0x767f,0x7221,0xe2a8,0x3fc6,0xdc2d,0x3b78,0xbdf8,0x3f7c,0x14ed,0xdc95,0xd847,0x3f1c,0xda45,0x6bb8,0x6b04,0x3ea2,};#endif#ifdef MIEEEstatic unsigned short FN4[] = {0x4010,0xf1cb,0xb40b,0x7ae7,0x4015,0xd666,0xf822,0x83ef,0x3ff9,0xeeee,0x7471,0x00a9,0x3fc5,0x6079,0x0004,0x019c,0x3f7b,0xe503,0x7f80,0x7e63,0x3f1c,0x8e9c,0x3475,0xf584,0x3ea2,0x6b04,0x5b35,0x4025,};static unsigned short FD4[] = {/* 0x3ff0,0x0000,0x0000,0x0000,*/0x4020,0x5476,0x77e8,0x1fe5,0x401d,0x3baf,0xe891,0x6c6d,0x3ffd,0xe302,0xc966,0xb9d7,0x3fc6,0xe2a8,0x7221,0x767f,0x3f7c,0xbdf8,0x3b78,0xdc2d,0x3f1c,0xd847,0xdc95,0x14ed,0x3ea2,0x6b04,0x6bb8,0xda45,};#endif#ifdef UNKstatic double FN8[] = {  4.55880873470465315206E-1,  7.13715274100146711374E-1,  1.60300158222319456320E-1,  1.16064229408124407915E-2,  3.49556442447859055605E-4,  4.86215430826454749482E-6,  3.20092790091004902806E-8,  9.41779576128512936592E-11,  9.70507110881952024631E-14,};static double FD8[] = {/*  1.00000000000000000000E0,*/  9.17463611873684053703E-1,  1.78685545332074536321E-1,  1.22253594771971293032E-2,  3.58696481881851580297E-4,  4.92435064317881464393E-6,  3.21956939101046018377E-8,  9.43720590350276732376E-11,  9.70507110881952025725E-14,};#endif#ifdef DECstatic unsigned short FN8[] = {0037751,0064467,0142332,0164573,0040066,0133013,0050352,0071102,0037444,0022671,0102157,0013535,0036476,0024335,0136423,0146444,0035267,0042253,0164110,0110460,0033643,0022626,0062535,0060320,0032011,0075223,0010110,0153413,0027717,0014572,0011360,0014034,0025332,0104755,0004563,0152354,};static unsigned short FD8[] = {/*0040200,0000000,0000000,0000000,*/0040152,0157345,0030104,0075616,0037466,0174527,0172740,0071060,0036510,0046337,0144272,0156552,0035274,0007555,0042537,0015572,0033645,0035731,0112465,0026474,0032012,0043612,0030613,0030123,0027717,0103277,0004564,0151000,0025332,0104755,0004563,0152354,};#endif

⌨️ 快捷键说明

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