|
[ 簡単な説明 ]
MPAライブラリ中で使用する各種定数(π、e等19種類)のMPA型での定義を行うサブ・ヘッダー。 MPA 型構造体を static として定義する。 階乗計算(m_kaijo( ))での最大引数値を _MAX_KAIJO として定義しておく。 |
/* mpa_v.h values of mpa */
#ifndef _MPA_VF
#define _MPA_VF
static MPA _E = {
1, /* sign */
0, /* exp */
0, /* zero */
2,23536,21592,20829,21158,22011,17762, 313,29939,25521,
14789,16871, 2893,21173, 7699,12808,20880,26615,19603,20199,
2342,26591, 6098,32539, 3468, 6379,22774,16601, 171,22668,
6061, 7928,31575,11258,25953, 4633,32071,27616,26349, 1067,
3477,10875,27930,31194,21956,27599,30076,18860,24892, 6369,
24806,17851,30889,20795,12094,32579,18551,25265, 8502,22259,
19788, 5529, 9460,16851,26090,30741,12674,22930,16088,14881,
2708,23958, 9103,30578,27354,23472,13821, 3331,21748, 5406,
30949, 7145,11862,30451,22748,22371, 4272,15678, 9144, 5338,
28830, 382,14451,16124,11980, 416, 4916,20584,12129,18617,
16293};
static MPA _PI = {
1, /* sign */
0, /* exp */
0, /* zero */
3, 4639,23202, 4276,12429, 6296,26152,23558,28787, 8786,
590, 1093, 6643, 3712, 8379,30001,27726,13892,20810, 1084,
25485, 155,24313,10445,20276,29830, 6960, 5509, 7036,19426,
17268,32521,21941,23203,16965,29250,27997,19531,26604,14242,
12555,21324,14317,13701,32727, 5854,16491,16239,14561,22518,
23177,20434,27559,25730, 6084,22783, 6436,20684,20972,29229,
20336,16399,19338, 2845,31766,12724,18486, 3626,29926,19746,
25594,18409, 4925,16134,25949, 4590,10475,12995,17967, 6833,
533, 9591, 7893, 5251,23589,21197,22128,25002,14634,31024,
1265,14902, 562,17156, 6083, 5250,31000,23661,20027,29135,
7623};
static MPA _2_PI = {
1, /* sign */
0, /* exp */
0, /* zero */
6, 9279,13636, 8552,24858,12593,19537,14349,24806,17572,
1180, 2186,13286, 7424,16759,27235,22684,27785, 8852, 2169,
18202, 311,15858,20891, 7785,26892,13920,11018,14073, 6085,
1769,32275,11115,13639, 1163,25733,23227, 6295,20440,28484,
25111, 9880,28634,27403,32686,11709, 214,32478,29123,12269,
13587, 8101,22351,18692,12169,12798,12873, 8601, 9177,25691,
7905, 31, 5908, 5691,30764,25449, 4204, 7253,27085, 6725,
18421, 4050, 9850,32269,19130, 9180,20950,25991, 3166,13666,
1066,19182,15786,10503,14411, 9627,11489,17236,29269,29280,
2530,29804, 1125, 1544,12166,10501,29233,14555, 7287,25502,
15246};
static MPA _PI_2 = {
1, /* sign */
0, /* exp */
0, /* zero */
1,18703,27985, 2138, 6214,19532,13076,11779,14393,20777,
295, 546,19705,18240, 4189,31384,30247, 6946,10405, 542,
12742,16461,28540,21606,26522,14915, 3480, 2754,19902, 9713,
8634,16260,27354,27985,24866,31009,13998,26149,29686, 7121,
6277,27046, 7158,23234,32747,19311, 8245,24503,23664,27643,
11588,26601,13779,29249, 3042,11391,19602,10342,10486,14614,
26552, 8199,26053, 1422,32267, 6362, 9243, 1813,14963, 9873,
12797, 9204,18846,24451,12974,18679, 5237,22881,25367,19800,
16650,21179,20330,19009,28178,26982,27448,12501, 7317,15512,
632,23835, 281, 8578, 3041,19009,15500,11830,26397,30951,
20196};
static MPA _PI_4 = {
1, /* sign */
-1, /* exp */
0, /* zero */
25735,30376,17453, 3107, 9766, 6538, 5889,23580,26772,16531,
16657, 9852,25504, 2094,32076,15123,19857, 5202,16655, 6371,
8230,30654,10803,13261, 7457,18124, 1377, 9951, 4856,20701,
8130,13677,13992,28817,15504,23383,13074,31227, 3560,19522,
29907, 3579,11617,16373,26039,20506,28635,28216,13821,22178,
13300,23273,31008,17905, 5695,26185, 5171, 5243, 7307,13276,
4099,29410,17095,16133,19565, 4621,17290,23865,21320,22782,
20986, 9423,12225,22871, 9339,19002,27824,29067,26284, 8325,
10589,26549, 9504,30473,13491,13724, 6250,20042,24140, 316,
11917,16524,20673, 1520,25888,24134, 5915,13198,31859,26481,
24577};
static MPA _SQRT3 = {
1, /* sign */
0, /* exp */
0, /* zero */
1,23987,27553,12441,10867,22827,20661,24817,14395,17554,
30221, 6538,15780,15558, 7298,19600,28229,21361, 4674,31227,
5615, 2797,30374, 9749,11794, 4423,25075, 2462, 9434, 7439,
12707, 8602,13216, 3436,26848,30524, 4654,12444,12523,19900,
24286, 7658, 2925,26115,14015,10909,15852, 5114,28350,31133,
9895,31918,29332, 4985,17302, 4693,13682,16566,13247, 2835,
4949,31736,18191,17566,14184,21219,29412, 6826,12325, 751,
16467, 3605,23326,24797,15715,24840,17212, 1707, 6746,16499,
22882,27681,20581, 5462, 5709,12823,23992,22814,32190,27429,
20086,23135, 8055, 4963, 9411, 2362,18687,26337, 1093, 5336,
14003};
static MPA _SQRT2 = {
1, /* sign */
0, /* exp */
0, /* zero */
1,13572,31129,32375,19600,17815,27725,19925, 5501, 7965,
14256,11938,10101, 1230,26813,12822, 1639, 6421, 9598, 8385,
1879, 2604, 7493,18425,24505, 987, 7303,23850, 3016,14791,
23123,24594, 3692,15866, 5044,13448, 1488,29738,30970,14668,
2872,24593,24089,24306,22071,18705,13378, 5673, 3093,15474,
6078, 5004,30938,23178, 7261,24487,14742,10851, 8600,31986,
2494,21233, 4220, 3513,12381,27300,20548,25616, 6473,10259,
19029,23395,31261,32244,27088, 2874,31015,24772, 4902,27379,
10833,13905,23655,19718,28144, 9068,14344, 4976, 1020,12853,
6041,19095,21487,15777,30207,23174,31871,18978, 2435,30632,
3144};
static MPA _1_SQRT2 = {
1, /* sign */
-1, /* exp */
0, /* zero */
23170,15564,32571,26184, 8907,30246,26346,19134,20366,23512,
5969, 5050,16999,13406,22795, 819,19594,21183, 4192,17323,
17686, 3746,25596,28636,16877,20035,28309, 1508, 7395,27945,
28681, 1846, 7933, 2522, 6724, 744,14869,15485, 7334, 1436,
12296,28428,28537,11035,25736,23073, 2836,17930,24121, 3039,
2502,15469,11589, 3630,28627,23755, 5425,20684,15993, 1247,
10616,18494, 1756,22574,30034,10274,12808, 3236,21513,25898,
28081,32014,32506,13544, 1437,15507,28770, 2451,13689,21800,
23336,28211,26243,14072, 4534, 7172, 2488, 510, 6426,19404,
25931,27127,24272,31487,27971,15935,25873, 1217,31700, 1572,
0};
static MPA _LN2 = {
1, /* sign */
-1, /* exp */
0, /* zero */
22713, 1533,31289,30618,24143, 3790,12295,29430,22432,15568,
25806,10635,12652,10292,11959, 2986,32021,31214, 3780, 1758,
23908,24918,10917,31562,32013,17467, 9685,25436, 2497, 1296,
20142,15145, 2228,28169,10194,27809,12562,11171, 2613,19418,
2200,24334, 4055, 7849,24093,17625,16502, 9583,20598, 7573,
32489,14124,29757,18037,19089,19189,28627,12110, 1542, 9350,
11005, 1564,24129,25506,27926,26097, 8679,32092,12351,21288,
9206,23547,18480,17228, 7953,32341, 3351,14682,15067,31774,
32010,24395,17531,24896, 1436,22621, 3086,30171,17608,14706,
10364,29483, 9166,13519, 6552,20069,18889,21587, 2435, 8672,
24205};
static MPA _LN10 = {
1, /* sign */
0, /* exp */
0, /* zero */
2, 9915, 3549,21844,11013,23882,28002,23574,19496,20933,
4076,31981, 6014, 8656,15457,29712, 1984,23269, 5679, 363,
27754, 523,19655, 1630, 177,15898,26668,12562, 1552, 8572,
11695,23675,25104, 1482, 5846,15382,15912,20817,18705,29618,
27291, 1889,22577,32247,22963,22025,11068,14290,17798,30355,
21017,25565,29337,30315,12854, 644, 5690, 9837, 3396,15438,
5078,24854, 1405,12143, 2109, 3389, 9614,18818,31328,15432,
30972,21865,27578,12601,21940, 5941, 2501,17204,18412,22836,
24113,15007,23325, 5237, 5621, 8120, 3648,24478,12408,10276,
27205,15150,14217,20583, 7615, 9213, 9655,22094, 4192,22468,
4635};
static MPA _LNRADIX = {
1, /* sign */
0, /* exp */
0, /* zero */
10,13015,23009,10597, 529, 1698,24087,20598,15476, 8807,
4155,26646,28458,25944,23313,15546,12036,21577, 9459,23932,
26380,30951,13326,32697,14692,21450,32633,14214,21093, 4687,
19449, 7224,30568, 664,29323,21850,23924,24595, 3726, 6435,
29127, 243, 4563,28060,19442, 955, 2238,18158,12682,14061,
15305,28589,15265,20379, 8419,24199,25704, 3426,17810,23134,
9183, 1235,23471, 1498,22154,25685,31010,31895,22633,21434,
24412, 7028,25533,15063,29047,21005,26364,17503,23628,29411,
17872,21409, 5485, 832,12992,21550,11636,13535,26589, 1982,
23986,24401,16265, 6424, 6179,32753, 6131,21200,28894, 3760,
31787};
static MPA _LOG10_2 = {
1, /* sign */
-1, /* exp */
0, /* zero */
9864, 4944,20412,32700,25150, 4787,11275,15944,24073,21926,
3156, 7823,19750, 5308,28454,23526, 6386,25869, 8920, 3212,
32431, 8508,23740,14746, 7279, 8786, 5235, 9389,17966, 9276,
22709, 5114,18772,23129,17912, 7151,14345,10937,15516,30952,
25649, 192,11869, 4961, 7359,15586, 756,30152,17574,25266,
11677,24612,13818,19261,12627,27653,16908,30898,16811,16651,
10457,30466,15604,25725,30650,17966,31887,17509,11007,28673,
8538,27699,22356,13473,16244, 6834,27505, 8754,11245,12074,
21096,20692,21790, 2589,26595,16788, 205, 4208,22415, 5090,
15180,21586, 7789,17898,26090,15916,14934,14265,25522,19257,
23490};
static MPA _LOG10_3 = {
1, /* sign */
-1, /* exp */
0, /* zero */
15634,10134,10218,32578, 6240,13370,16653, 2311,12738, 5574,
22112,28094,28847, 7919,12990,10717,24216,27206,16190, 3626,
5157,14593, 75,17134, 478,13272,29969,12380,29797, 3174,
15412, 3543,27158, 3225,20070, 2701, 7420, 8274,30940,17583,
28042,10127, 5460,25587,21840,30275,17686,15558,10906,28797,
1542,17096, 6179,13211, 6994, 926,28519,13106, 2145, 7026,
1613,13493,19277,13285, 6611, 7068,12723,10477, 7065,25566,
8730,20571,13006,10681,10697, 1301,31741,15151,22661, 1341,
31125,23694,22885,11039,21955,22672, 1882, 478, 2726,25437,
15389,22059,31857,32322,26066,28876, 2118, 5257,25522,27684,
14926};
static MPA _G = {
1, /* sign */
0, /* exp */
0, /* zero */
1,27916, 8956, 4221,22918,16374, 5852,25834,26626,19784,
3418,17535,27079, 9014,30210,10345,26723,24208, 5810,17910,
30725,31253, 2284,31390, 8328, 9853,31557,21134,29487,18302,
12090, 8455,30674,29894,30725,28178,15518, 7780, 179, 4761,
29825,20039,17822, 6812,30219,14112,10274,17477, 7835, 5205,
11821,32436,32463,18836,31038,24419,21425, 8187, 6154,26570,
19583,20812,16555,27375,12529, 7705,27350,27464, 6561, 2529,
13254,23754,17092,11300, 695, 4204, 7867, 718, 8737, 2109,
9032,14616,12558, 9649,10586,26472,19403, 4737, 1234,22581,
4242, 4895, 2265,14139,18727, 6541,16158,22938,21457, 4187,
23087};
static MPA _MAX_M_EXP = {
1, /* sign */
1, /* exp */
0, /* zero */
5, 6507,27886,21682,16647,28156, 1120,24498,23029,19071,
4730,10878,27440,14400,11164,27097,17625,12888,25999, 9959,
14131,29546,27019,30141, 7010, 58,13645,20128,23318, 2503,
6013,17957, 7064,11748,31953,16579, 5043,25005,31358, 2805,
1854,28817,11603,11331,29116,28970, 6240,32238, 1065, 7069,
18017,10124,11640,24455,29962,21684,18635,20188, 8746,15036,
4590, 1724,15954, 1875, 8948,20171,25366,25984,23379,11044,
1019,29427,13992,26057, 5293,22502,15237, 9144,15549,28827,
24417,11812, 9279, 6229, 343,17125,12907,13300,12373,16482,
22878,30969, 5252,23911,18225,11726, 9341,15994, 4025,27566,
24727};
static MPA _MAX_M_10 = {
1, /* sign */
1, /* exp */
0, /* zero */
2, 8445, 4315,26331,18397, 5341,24004, 4813, 7047,28564,
9557,25791, 459,26687,10808,29414, 2881,16789,30224,16484,
19760,10710, 3630,26276, 7572,27898,27452,29235,24148, 594,
26016,27490,16785,24725,27644,27438, 6285,30706, 2023,16890,
4838, 720, 2966,11632,30523,14952, 8404, 1004,18957,16757,
23633,27691, 6721, 9487,26246,24683,22545, 6252,14799,23480,
15964,19530, 2550,13997, 2785,29350,15871, 8251,30373, 7085,
27363,21011,28029,30290,29485, 5927, 3273,15266,20599,19298,
2786,31207, 6678,15676, 6289, 4166,27612,26766,16489,25898,
21550, 7850, 6235,20430, 6254,22674,31498,10718, 5888,25509,
18965};
static MPA _MMAX = {
1, /* sign */
16383, /* exp */
0, /* zero */
32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
32767};
static MPA _M0 = {
1, /* sign */
0, /* exp */
1, /* zero */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0};
static MPA _M1 = {
1, /* sign */
0, /* exp */
0, /* zero */
1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0};
static UINT _MAX_KAIJO = 19219;
#endif
|