OpenMD
3.1
Molecular Dynamics in the Open
Loading...
Searching...
No Matches
Factorials.hpp
1
/***************************************************************************
2
* This program is free software; you can redistribute it and/or modify *
3
* it under the terms of the GNU General Public License as published by *
4
* the Free Software Foundation; either version 3 of the License, or *
5
* (at your option) any later version. *
6
* *
7
* This program is distributed in the hope that it will be useful, *
8
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
9
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
10
* GNU General Public License for more details. *
11
* *
12
* You should have received a copy of the GNU General Public License *
13
* along with this program; if not, see <http://www.gnu.org/licenses/>. *
14
***************************************************************************/
15
#include <config.h>
16
const
int
maxFact = 151;
// Largest factorial computed
17
const
RealType fact[maxFact] = {
18
1.0,
19
1.0,
20
2.0,
21
6.0,
22
24.0,
23
120.0,
24
720.0,
25
5040.0,
26
40320.0,
27
362880.0,
28
3628800.0,
29
39916800.0,
30
479001600.0,
31
6227020800.0,
32
87178291200.0,
33
1307674368000.0,
34
20922789888000.0,
35
355687428096000.0,
36
6402373705728000.0,
37
1.21645100408832e17,
38
2.43290200817664e18,
39
5.109094217170944e19,
40
1.1240007277776077e21,
41
2.5852016738884978e22,
42
6.2044840173323941e23,
43
1.5511210043330986e25,
44
4.0329146112660565e26,
45
1.0888869450418352e28,
46
3.0488834461171384e29,
47
8.8417619937397008e30,
48
2.6525285981219103e32,
49
8.2228386541779224e33,
50
2.6313083693369352e35,
51
8.6833176188118859e36,
52
2.9523279903960412e38,
53
1.0333147966386144e40,
54
3.7199332678990118e41,
55
1.3763753091226343e43,
56
5.2302261746660104e44,
57
2.0397882081197442e46,
58
8.1591528324789768e47,
59
3.3452526613163803e49,
60
1.4050061177528798e51,
61
6.0415263063373834e52,
62
2.6582715747884485e54,
63
1.1962222086548019e56,
64
5.5026221598120885e57,
65
2.5862324151116818e59,
66
1.2413915592536073e61,
67
6.0828186403426752e62,
68
3.0414093201713376e64,
69
1.5511187532873822e66,
70
8.0658175170943877e67,
71
4.2748832840600255e69,
72
2.3084369733924138e71,
73
1.2696403353658276e73,
74
7.1099858780486348e74,
75
4.0526919504877221e76,
76
2.3505613312828789e78,
77
1.3868311854568986e80,
78
8.3209871127413916e81,
79
5.0758021387722484e83,
80
3.1469973260387939e85,
81
1.9826083154044401e87,
82
1.2688693218588417e89,
83
8.2476505920824715e90,
84
5.4434493907744307e92,
85
3.6471110918188683e94,
86
2.4800355424368305e96,
87
1.711224524281413e98,
88
1.197857166996989e100,
89
8.5047858856786218e101,
90
6.1234458376886077e103,
91
4.4701154615126834e105,
92
3.3078854415193856e107,
93
2.4809140811395391e109,
94
1.8854947016660498e111,
95
1.4518309202828584e113,
96
1.1324281178206295e115,
97
8.9461821307829729e116,
98
7.1569457046263779e118,
99
5.7971260207473655e120,
100
4.7536433370128398e122,
101
3.9455239697206569e124,
102
3.314240134565352e126,
103
2.8171041143805494e128,
104
2.4227095383672724e130,
105
2.1077572983795269e132,
106
1.8548264225739836e134,
107
1.6507955160908452e136,
108
1.4857159644817607e138,
109
1.3520015276784023e140,
110
1.24384140546413e142,
111
1.1567725070816409e144,
112
1.0873661566567424e146,
113
1.0329978488239052e148,
114
9.916779348709491e149,
115
9.6192759682482062e151,
116
9.426890448883242e153,
117
9.3326215443944096e155,
118
9.3326215443944102e157,
119
9.4259477598383536e159,
120
9.6144667150351211e161,
121
9.9029007164861754e163,
122
1.0299016745145622e166,
123
1.0813967582402903e168,
124
1.1462805637347078e170,
125
1.2265202031961373e172,
126
1.3246418194518284e174,
127
1.4438595832024928e176,
128
1.5882455415227421e178,
129
1.7629525510902437e180,
130
1.9745068572210728e182,
131
2.2311927486598123e184,
132
2.5435597334721862e186,
133
2.9250936934930141e188,
134
3.3931086844518965e190,
135
3.969937160808719e192,
136
4.6845258497542883e194,
137
5.5745857612076033e196,
138
6.6895029134491239e198,
139
8.09429852527344e200,
140
9.8750442008335976e202,
141
1.2146304367025325e205,
142
1.5061417415111404e207,
143
1.8826771768889254e209,
144
2.3721732428800459e211,
145
3.0126600184576582e213,
146
3.8562048236258025e215,
147
4.9745042224772855e217,
148
6.4668554892204716e219,
149
8.4715806908788174e221,
150
1.1182486511960039e224,
151
1.4872707060906852e226,
152
1.9929427461615181e228,
153
2.6904727073180495e230,
154
3.6590428819525472e232,
155
5.0128887482749898e234,
156
6.9177864726194859e236,
157
9.6157231969410859e238,
158
1.346201247571752e241,
159
1.8981437590761701e243,
160
2.6953641378881614e245,
161
3.8543707171800706e247,
162
5.5502938327393013e249,
163
8.0479260574719866e251,
164
1.1749972043909099e254,
165
1.7272458904546376e256,
166
2.5563239178728637e258,
167
3.8089226376305671e260,
168
5.7133839564458505e262};
// array of precomputed factorials
math
Factorials.hpp
Generated on Wed Jun 26 2024 13:56:40 for OpenMD by
1.11.0