blob: 080e056e15994542981645b9a56bc7facad51632 [file] [log] [blame]
Gael Guennebaudcd221a62016-06-01 17:09:48 +02001namespace Eigen {
2
3/** \eigenManualPage CoeffwiseMathFunctions Catalog of coefficient-wise math functions
4
5
Gael Guennebaudfd057f82016-07-20 12:14:10 +02006<!-- <span style="font-size:300%; color:red; font-weight: 900;">!WORK IN PROGRESS!</span> -->
Gael Guennebaudcd221a62016-06-01 17:09:48 +02007
8This table presents a catalog of the coefficient-wise math functions supported by %Eigen.
9In this table, \c a, \c b, refer to Array objects or expressions, and \c m refers to a linear algebra Matrix/Vector object. Standard scalar types are abbreviated as follows:
Gael Guennebaudfd057f82016-07-20 12:14:10 +020010 - \c int: \c i32
Gael Guennebaudcd221a62016-06-01 17:09:48 +020011 - \c float: \c f
12 - \c double: \c d
13 - \c std::complex<float>: \c cf
14 - \c std::complex<double>: \c cd
15
16For each row, the first column list the equivalent calls for arrays, and matrices when supported. Of course, all functions are available for matrices by first casting it as an array: \c m.array().
17
18The third column gives some hints in the underlying scalar implementation. In most cases, %Eigen does not implement itself the math function but relies on the STL for standard scalar types, or user-provided functions for custom scalar types.
19For instance, some simply calls the respective function of the STL while preserving <a href="http://en.cppreference.com/w/cpp/language/adl">argument-dependent lookup</a> for custom types.
20The following:
21\code
22using std::foo;
23foo(a[i]);
24\endcode
25means that the STL's function \c std::foo will be potentially called if it is compatible with the underlying scalar type. If not, then the user must ensure that an overload of the function foo is available for the given scalar type (usually defined in the same namespace as the given scalar type).
26This also means that, unless specified, if the function \c std::foo is available only in some recent c++ versions (e.g., c++11), then the respective %Eigen's function/method will be usable on standard types only if the compiler support the required c++ version.
27
28<table class="manual-hl">
29<tr>
30<th>API</th><th>Description</th><th>Default scalar implementation</th><th>SIMD</th>
31</tr>
32<tr><td colspan="4"></td></tr>
33<tr><th colspan="4">Basic operations</th></tr>
34<tr>
35 <td class="code">
36 \anchor cwisetable_abs
37 a.\link ArrayBase::abs abs\endlink(); \n
38 \link Eigen::abs abs\endlink(a); \n
39 m.\link MatrixBase::cwiseAbs cwiseAbs\endlink();
40 </td>
41 <td>absolute value (\f$ |a_i| \f$) </td>
42 <td class="code">
43 using <a href="http://en.cppreference.com/w/cpp/numeric/math/fabs">std::abs</a>; \n
44 abs(a[i]);
45 </td>
Gael Guennebaudfd057f82016-07-20 12:14:10 +020046 <td>SSE2, AVX (i32,f,d)</td>
47</tr>
48<tr>
49 <td class="code">
50 \anchor cwisetable_inverse
51 a.\link ArrayBase::inverse inverse\endlink(); \n
52 \link Eigen::inverse inverse\endlink(a); \n
53 m.\link MatrixBase::cwiseInverse cwiseInverse\endlink();
54 </td>
55 <td>inverse value (\f$ 1/a_i \f$) </td>
56 <td class="code">
57 1/a[i];
58 </td>
59 <td>All engines (f,d,fc,fd)</td>
60</tr>
61<tr>
62 <td class="code">
63 \anchor cwisetable_conj
64 a.\link ArrayBase::conjugate conjugate\endlink(); \n
65 \link Eigen::conj conj\endlink(a); \n
Christoph Hertzberg449ff742018-10-19 21:10:28 +020066 m.\link MatrixBase::conjugate conjugate\endlink();
Gael Guennebaudfd057f82016-07-20 12:14:10 +020067 </td>
68 <td><a href="https://en.wikipedia.org/wiki/Complex_conjugate">complex conjugate</a> (\f$ \bar{a_i} \f$),\n
69 no-op for real </td>
70 <td class="code">
71 using <a href="http://en.cppreference.com/w/cpp/numeric/complex/conj">std::conj</a>; \n
72 conj(a[i]);
73 </td>
74 <td>All engines (fc,fd)</td>
Gael Guennebaudcd221a62016-06-01 17:09:48 +020075</tr>
76<tr>
77<th colspan="4">Exponential functions</th>
78</tr>
79<tr>
80 <td class="code">
81 \anchor cwisetable_exp
82 a.\link ArrayBase::exp exp\endlink(); \n
83 \link Eigen::exp exp\endlink(a);
84 </td>
85 <td>\f$ e \f$ raised to the given power (\f$ e^{a_i} \f$) </td>
86 <td class="code">
87 using <a href="http://en.cppreference.com/w/cpp/numeric/math/exp">std::exp</a>; \n
88 exp(a[i]);
89 </td>
90 <td>SSE2, AVX (f,d)</td>
91</tr>
92<tr>
93 <td class="code">
94 \anchor cwisetable_log
95 a.\link ArrayBase::log log\endlink(); \n
96 \link Eigen::log log\endlink(a);
97 </td>
Gael Guennebaudfd057f82016-07-20 12:14:10 +020098 <td>natural (base \f$ e \f$) logarithm (\f$ \ln({a_i}) \f$)</td>
Gael Guennebaudcd221a62016-06-01 17:09:48 +020099 <td class="code">
100 using <a href="http://en.cppreference.com/w/cpp/numeric/math/log">std::log</a>; \n
101 log(a[i]);
102 </td>
Gael Guennebaudfd057f82016-07-20 12:14:10 +0200103 <td>SSE2, AVX (f)</td>
Gael Guennebaudcd221a62016-06-01 17:09:48 +0200104</tr>
105<tr>
106 <td class="code">
107 \anchor cwisetable_log1p
108 a.\link ArrayBase::log1p log1p\endlink(); \n
109 \link Eigen::log1p log1p\endlink(a);
110 </td>
Gael Guennebaudfd057f82016-07-20 12:14:10 +0200111 <td>natural (base \f$ e \f$) logarithm of 1 plus \n the given number (\f$ \ln({1+a_i}) \f$)</td>
Gael Guennebaudcd221a62016-06-01 17:09:48 +0200112 <td>built-in generic implementation based on \c log,\n
113 plus \c using <a href="http://en.cppreference.com/w/cpp/numeric/math/log1p">\c std::log1p </a>; \cpp11</td>
114 <td></td>
115</tr>
116<tr>
Gael Guennebaudfd057f82016-07-20 12:14:10 +0200117 <td class="code">
118 \anchor cwisetable_log10
119 a.\link ArrayBase::log10 log10\endlink(); \n
120 \link Eigen::log10 log10\endlink(a);
121 </td>
122 <td>base 10 logarithm (\f$ \log_{10}({a_i}) \f$)</td>
123 <td class="code">
124 using <a href="http://en.cppreference.com/w/cpp/numeric/math/log10">std::log10</a>; \n
125 log10(a[i]);
126 </td>
127 <td></td>
128</tr>
129<tr>
Gael Guennebaudcd221a62016-06-01 17:09:48 +0200130<th colspan="4">Power functions</th>
131</tr>
132<tr>
Gael Guennebaudfd057f82016-07-20 12:14:10 +0200133 <td class="code">
134 \anchor cwisetable_pow
135 a.\link ArrayBase::pow pow\endlink(b); \n
Christoph Hertzberg449ff742018-10-19 21:10:28 +0200136 \link ArrayBase::pow(const Eigen::ArrayBase< Derived > &x, const Eigen::ArrayBase< ExponentDerived > &exponents) pow\endlink(a,b);
Gael Guennebaudfd057f82016-07-20 12:14:10 +0200137 </td>
Christoph Hertzberg449ff742018-10-19 21:10:28 +0200138 <!-- For some reason Doxygen thinks that pow is in ArrayBase namespace -->
Gael Guennebaudfd057f82016-07-20 12:14:10 +0200139 <td>raises a number to the given power (\f$ a_i ^ {b_i} \f$) \n \c a and \c b can be either an array or scalar.</td>
140 <td class="code">
141 using <a href="http://en.cppreference.com/w/cpp/numeric/math/pow">std::pow</a>; \n
142 pow(a[i],b[i]);\n
143 (plus builtin for integer types)</td>
144 <td></td>
145</tr>
146<tr>
147 <td class="code">
148 \anchor cwisetable_sqrt
149 a.\link ArrayBase::sqrt sqrt\endlink(); \n
150 \link Eigen::sqrt sqrt\endlink(a);\n
151 m.\link MatrixBase::cwiseSqrt cwiseSqrt\endlink();
152 </td>
153 <td>computes square root (\f$ \sqrt a_i \f$)</td>
154 <td class="code">
155 using <a href="http://en.cppreference.com/w/cpp/numeric/math/sqrt">std::sqrt</a>; \n
156 sqrt(a[i]);</td>
157 <td>SSE2, AVX (f,d)</td>
158</tr>
159<tr>
160 <td class="code">
161 \anchor cwisetable_rsqrt
162 a.\link ArrayBase::rsqrt rsqrt\endlink(); \n
163 \link Eigen::rsqrt rsqrt\endlink(a);
164 </td>
165 <td><a href="https://en.wikipedia.org/wiki/Fast_inverse_square_root">reciprocal square root</a> (\f$ 1/{\sqrt a_i} \f$)</td>
166 <td class="code">
167 using <a href="http://en.cppreference.com/w/cpp/numeric/math/sqrt">std::sqrt</a>; \n
168 1/sqrt(a[i]); \n
169 </td>
170 <td>SSE2, AVX, AltiVec, ZVector (f,d)\n
171 (approx + 1 Newton iteration)</td>
172</tr>
173<tr>
174 <td class="code">
175 \anchor cwisetable_square
176 a.\link ArrayBase::square square\endlink(); \n
177 \link Eigen::square square\endlink(a);
178 </td>
179 <td>computes square power (\f$ a_i^2 \f$)</td>
180 <td class="code">
181 a[i]*a[i]</td>
182 <td>All (i32,f,d,cf,cd)</td>
183</tr>
184<tr>
185 <td class="code">
186 \anchor cwisetable_cube
187 a.\link ArrayBase::cube cube\endlink(); \n
188 \link Eigen::cube cube\endlink(a);
189 </td>
190 <td>computes cubic power (\f$ a_i^3 \f$)</td>
191 <td class="code">
192 a[i]*a[i]*a[i]</td>
193 <td>All (i32,f,d,cf,cd)</td>
194</tr>
195<tr>
196 <td class="code">
197 \anchor cwisetable_abs2
198 a.\link ArrayBase::abs2 abs2\endlink(); \n
199 \link Eigen::abs2 abs2\endlink(a);\n
200 m.\link MatrixBase::cwiseAbs2 cwiseAbs2\endlink();
201 </td>
202 <td>computes the squared absolute value (\f$ |a_i|^2 \f$)</td>
203 <td class="code">
204 real: a[i]*a[i] \n
205 complex: real(a[i])*real(a[i]) \n
206 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; + imag(a[i])*imag(a[i])</td>
207 <td>All (i32,f,d)</td>
208</tr>
209<tr>
Gael Guennebaudcd221a62016-06-01 17:09:48 +0200210<th colspan="4">Trigonometric functions</th>
211</tr>
212<tr>
Gael Guennebaudfd057f82016-07-20 12:14:10 +0200213 <td class="code">
214 \anchor cwisetable_sin
215 a.\link ArrayBase::sin sin\endlink(); \n
216 \link Eigen::sin sin\endlink(a);
217 </td>
218 <td>computes sine</td>
219 <td class="code">
220 using <a href="http://en.cppreference.com/w/cpp/numeric/math/sin">std::sin</a>; \n
221 sin(a[i]);</td>
222 <td>SSE2, AVX (f)</td>
223</tr>
224<tr>
225 <td class="code">
226 \anchor cwisetable_cos
227 a.\link ArrayBase::cos cos\endlink(); \n
228 \link Eigen::cos cos\endlink(a);
229 </td>
230 <td>computes cosine</td>
231 <td class="code">
232 using <a href="http://en.cppreference.com/w/cpp/numeric/math/cos">std::cos</a>; \n
233 cos(a[i]);</td>
234 <td>SSE2, AVX (f)</td>
235</tr>
236<tr>
237 <td class="code">
238 \anchor cwisetable_tan
239 a.\link ArrayBase::tan tan\endlink(); \n
240 \link Eigen::tan tan\endlink(a);
241 </td>
242 <td>computes tangent</td>
243 <td class="code">
244 using <a href="http://en.cppreference.com/w/cpp/numeric/math/tan">std::tan</a>; \n
245 tan(a[i]);</td>
246 <td></td>
247</tr>
248<tr>
249 <td class="code">
250 \anchor cwisetable_asin
251 a.\link ArrayBase::asin asin\endlink(); \n
252 \link Eigen::asin asin\endlink(a);
253 </td>
254 <td>computes arc sine (\f$ \sin^{-1} a_i \f$)</td>
255 <td class="code">
256 using <a href="http://en.cppreference.com/w/cpp/numeric/math/asin">std::asin</a>; \n
257 asin(a[i]);</td>
258 <td></td>
259</tr>
260<tr>
261 <td class="code">
262 \anchor cwisetable_acos
263 a.\link ArrayBase::acos acos\endlink(); \n
264 \link Eigen::acos acos\endlink(a);
265 </td>
266 <td>computes arc cosine (\f$ \cos^{-1} a_i \f$)</td>
267 <td class="code">
268 using <a href="http://en.cppreference.com/w/cpp/numeric/math/acos">std::acos</a>; \n
269 acos(a[i]);</td>
270 <td></td>
271</tr>
272<tr>
273 <td class="code">
274 \anchor cwisetable_atan
Gael Guennebaud1dcf5a62018-10-17 09:29:36 +0200275 a.\link ArrayBase::atan atan\endlink(); \n
Gael Guennebaudfd057f82016-07-20 12:14:10 +0200276 \link Eigen::atan atan\endlink(a);
277 </td>
278 <td>computes arc tangent (\f$ \tan^{-1} a_i \f$)</td>
279 <td class="code">
280 using <a href="http://en.cppreference.com/w/cpp/numeric/math/atan">std::atan</a>; \n
281 atan(a[i]);</td>
282 <td></td>
283</tr>
284<tr>
Gael Guennebaudcd221a62016-06-01 17:09:48 +0200285<th colspan="4">Hyperbolic functions</th>
286</tr>
287<tr>
Gael Guennebaudfd057f82016-07-20 12:14:10 +0200288 <td class="code">
289 \anchor cwisetable_sinh
290 a.\link ArrayBase::sinh sinh\endlink(); \n
291 \link Eigen::sinh sinh\endlink(a);
292 </td>
293 <td>computes hyperbolic sine</td>
294 <td class="code">
295 using <a href="http://en.cppreference.com/w/cpp/numeric/math/sinh">std::sinh</a>; \n
296 sinh(a[i]);</td>
297 <td></td>
298</tr>
299<tr>
300 <td class="code">
301 \anchor cwisetable_cosh
302 a.\link ArrayBase::cosh cohs\endlink(); \n
303 \link Eigen::cosh cosh\endlink(a);
304 </td>
305 <td>computes hyperbolic cosine</td>
306 <td class="code">
307 using <a href="http://en.cppreference.com/w/cpp/numeric/math/cosh">std::cosh</a>; \n
308 cosh(a[i]);</td>
309 <td></td>
310</tr>
311<tr>
312 <td class="code">
313 \anchor cwisetable_tanh
314 a.\link ArrayBase::tanh tanh\endlink(); \n
315 \link Eigen::tanh tanh\endlink(a);
316 </td>
317 <td>computes hyperbolic tangent</td>
318 <td class="code">
319 using <a href="http://en.cppreference.com/w/cpp/numeric/math/tanh">std::tanh</a>; \n
320 tanh(a[i]);</td>
321 <td></td>
322</tr>
323<tr>
Rasmus Munk Larsen2c5843d2019-01-14 13:26:34 -0800324 <td class="code">
325 \anchor cwisetable_asinh
326 a.\link ArrayBase::asinh asinh\endlink(); \n
327 \link Eigen::asinh asinh\endlink(a);
328 </td>
329 <td>computes inverse hyperbolic sine</td>
330 <td class="code">
331 using <a href="http://en.cppreference.com/w/cpp/numeric/math/asinh">std::asinh</a>; \n
332 asinh(a[i]);</td>
333 <td></td>
334</tr>
335<tr>
336 <td class="code">
337 \anchor cwisetable_acosh
338 a.\link ArrayBase::acosh cohs\endlink(); \n
339 \link Eigen::acosh acosh\endlink(a);
340 </td>
341 <td>computes hyperbolic cosine</td>
342 <td class="code">
343 using <a href="http://en.cppreference.com/w/cpp/numeric/math/acosh">std::acosh</a>; \n
344 acosh(a[i]);</td>
345 <td></td>
346</tr>
347<tr>
348 <td class="code">
349 \anchor cwisetable_atanh
350 a.\link ArrayBase::atanh atanh\endlink(); \n
351 \link Eigen::atanh atanh\endlink(a);
352 </td>
353 <td>computes hyperbolic tangent</td>
354 <td class="code">
355 using <a href="http://en.cppreference.com/w/cpp/numeric/math/atanh">std::atanh</a>; \n
356 atanh(a[i]);</td>
357 <td></td>
358</tr>
359<tr>
Gael Guennebaudfd057f82016-07-20 12:14:10 +0200360<th colspan="4">Nearest integer floating point operations</th>
361</tr>
362<tr>
363 <td class="code">
364 \anchor cwisetable_ceil
365 a.\link ArrayBase::ceil ceil\endlink(); \n
366 \link Eigen::ceil ceil\endlink(a);
367 </td>
368 <td>nearest integer not less than the given value</td>
369 <td class="code">
370 using <a href="http://en.cppreference.com/w/cpp/numeric/math/ceil">std::ceil</a>; \n
371 ceil(a[i]);</td>
372 <td>SSE4,AVX,ZVector (f,d)</td>
373</tr>
374<tr>
375 <td class="code">
376 \anchor cwisetable_floor
377 a.\link ArrayBase::floor floor\endlink(); \n
378 \link Eigen::floor floor\endlink(a);
379 </td>
380 <td>nearest integer not greater than the given value</td>
381 <td class="code">
382 using <a href="http://en.cppreference.com/w/cpp/numeric/math/floor">std::floor</a>; \n
383 floor(a[i]);</td>
384 <td>SSE4,AVX,ZVector (f,d)</td>
385</tr>
386<tr>
387 <td class="code">
388 \anchor cwisetable_round
389 a.\link ArrayBase::round round\endlink(); \n
390 \link Eigen::round round\endlink(a);
391 </td>
392 <td>nearest integer, \n rounding away from zero in halfway cases</td>
393 <td>built-in generic implementation \n based on \c floor and \c ceil,\n
394 plus \c using <a href="http://en.cppreference.com/w/cpp/numeric/math/round">\c std::round </a>; \cpp11</td>
395 <td>SSE4,AVX,ZVector (f,d)</td>
396</tr>
397<tr>
398<th colspan="4">Floating point manipulation functions</th>
399</tr>
400<tr>
401<th colspan="4">Classification and comparison</th>
402</tr>
403<tr>
404 <td class="code">
405 \anchor cwisetable_isfinite
Gael Guennebaud22997172017-01-04 23:27:33 +0100406 a.\link ArrayBase::isFinite isFinite\endlink(); \n
Gael Guennebaudfd057f82016-07-20 12:14:10 +0200407 \link Eigen::isfinite isfinite\endlink(a);
408 </td>
409 <td>checks if the given number has finite value</td>
410 <td>built-in generic implementation,\n
411 plus \c using <a href="http://en.cppreference.com/w/cpp/numeric/math/isfinite">\c std::isfinite </a>; \cpp11</td>
412 <td></td>
413</tr>
414<tr>
415 <td class="code">
416 \anchor cwisetable_isinf
Gael Guennebaud22997172017-01-04 23:27:33 +0100417 a.\link ArrayBase::isInf isInf\endlink(); \n
Gael Guennebaudfd057f82016-07-20 12:14:10 +0200418 \link Eigen::isinf isinf\endlink(a);
419 </td>
420 <td>checks if the given number is infinite</td>
421 <td>built-in generic implementation,\n
422 plus \c using <a href="http://en.cppreference.com/w/cpp/numeric/math/isinf">\c std::isinf </a>; \cpp11</td>
423 <td></td>
424</tr>
425<tr>
426 <td class="code">
427 \anchor cwisetable_isnan
Gael Guennebaud22997172017-01-04 23:27:33 +0100428 a.\link ArrayBase::isNaN isNaN\endlink(); \n
Gael Guennebaudfd057f82016-07-20 12:14:10 +0200429 \link Eigen::isnan isnan\endlink(a);
430 </td>
431 <td>checks if the given number is not a number</td>
432 <td>built-in generic implementation,\n
433 plus \c using <a href="http://en.cppreference.com/w/cpp/numeric/math/isnan">\c std::isnan </a>; \cpp11</td>
434 <td></td>
435</tr>
436<tr>
Gael Guennebaudcd221a62016-06-01 17:09:48 +0200437<th colspan="4">Error and gamma functions</th>
438</tr>
Gael Guennebaud22997172017-01-04 23:27:33 +0100439<tr> <td colspan="4"> Require \c \#include \c <unsupported/Eigen/SpecialFunctions> </td></tr>
Gael Guennebaudcd221a62016-06-01 17:09:48 +0200440<tr>
441 <td class="code">
442 \anchor cwisetable_erf
443 a.\link ArrayBase::erf erf\endlink(); \n
444 \link Eigen::erf erf\endlink(a);
445 </td>
446 <td>error function</td>
447 <td class="code">
448 using <a href="http://en.cppreference.com/w/cpp/numeric/math/erf">std::erf</a>; \cpp11 \n
449 erf(a[i]);
450 </td>
451 <td></td>
452</tr>
453<tr>
454 <td class="code">
455 \anchor cwisetable_erfc
456 a.\link ArrayBase::erfc erfc\endlink(); \n
457 \link Eigen::erfc erfc\endlink(a);
458 </td>
459 <td>complementary error function</td>
460 <td class="code">
461 using <a href="http://en.cppreference.com/w/cpp/numeric/math/erfc">std::erfc</a>; \cpp11 \n
462 erfc(a[i]);
463 </td>
464 <td></td>
465</tr>
466<tr>
Gael Guennebaudfd057f82016-07-20 12:14:10 +0200467 <td class="code">
468 \anchor cwisetable_lgamma
469 a.\link ArrayBase::lgamma lgamma\endlink(); \n
470 \link Eigen::lgamma lgamma\endlink(a);
471 </td>
472 <td>natural logarithm of the gamma function</td>
473 <td class="code">
474 using <a href="http://en.cppreference.com/w/cpp/numeric/math/lgamma">std::lgamma</a>; \cpp11 \n
475 lgamma(a[i]);
476 </td>
477 <td></td>
Gael Guennebaudcd221a62016-06-01 17:09:48 +0200478</tr>
479<tr>
Gael Guennebaudfd057f82016-07-20 12:14:10 +0200480 <td class="code">
481 \anchor cwisetable_digamma
482 a.\link ArrayBase::digamma digamma\endlink(); \n
483 \link Eigen::digamma digamma\endlink(a);
484 </td>
485 <td><a href="https://en.wikipedia.org/wiki/Digamma_function">logarithmic derivative of the gamma function</a></td>
486 <td>
487 built-in for float and double
488 </td>
489 <td></td>
Gael Guennebaudcd221a62016-06-01 17:09:48 +0200490</tr>
491<tr>
Gael Guennebaudfd057f82016-07-20 12:14:10 +0200492 <td class="code">
493 \anchor cwisetable_igamma
494 \link Eigen::igamma igamma\endlink(a,x);
495 </td>
496 <td><a href="https://en.wikipedia.org/wiki/Incomplete_gamma_function">lower incomplete gamma integral</a>
497 \n \f$ \gamma(a_i,x_i)= \frac{1}{|a_i|} \int_{0}^{x_i}e^{\text{-}t} t^{a_i-1} \mathrm{d} t \f$</td>
498 <td>
499 built-in for float and double,\n but requires \cpp11
500 </td>
501 <td></td>
Gael Guennebaudcd221a62016-06-01 17:09:48 +0200502</tr>
503<tr>
Gael Guennebaudfd057f82016-07-20 12:14:10 +0200504 <td class="code">
505 \anchor cwisetable_igammac
506 \link Eigen::igammac igammac\endlink(a,x);
507 </td>
508 <td><a href="https://en.wikipedia.org/wiki/Incomplete_gamma_function">upper incomplete gamma integral</a>
509 \n \f$ \Gamma(a_i,x_i) = \frac{1}{|a_i|} \int_{x_i}^{\infty}e^{\text{-}t} t^{a_i-1} \mathrm{d} t \f$</td>
510 <td>
511 built-in for float and double,\n but requires \cpp11
512 </td>
513 <td></td>
514</tr>
515<tr>
516<th colspan="4">Special functions</th>
517</tr>
Gael Guennebaud22997172017-01-04 23:27:33 +0100518<tr> <td colspan="4"> Require \c \#include \c <unsupported/Eigen/SpecialFunctions> </td></tr>
Gael Guennebaudfd057f82016-07-20 12:14:10 +0200519<tr>
520 <td class="code">
521 \anchor cwisetable_polygamma
522 \link Eigen::polygamma polygamma\endlink(n,x);
523 </td>
524 <td><a href="https://en.wikipedia.org/wiki/Polygamma_function">n-th derivative of digamma at x</a></td>
525 <td>
526 built-in generic based on\n <a href="#cwisetable_lgamma">\c lgamma </a>,
527 <a href="#cwisetable_digamma"> \c digamma </a>
528 and <a href="#cwisetable_zeta">\c zeta </a>.
529 </td>
530 <td></td>
531</tr>
532<tr>
533 <td class="code">
534 \anchor cwisetable_betainc
535 \link Eigen::betainc betainc\endlink(a,b,x);
536 </td>
537 <td><a href="https://en.wikipedia.org/wiki/Beta_function#Incomplete_beta_function">Incomplete beta function</a></td>
538 <td>
539 built-in for float and double,\n but requires \cpp11
540 </td>
541 <td></td>
Gael Guennebaudcd221a62016-06-01 17:09:48 +0200542</tr>
543<tr>
544 <td class="code">
545 \anchor cwisetable_zeta
Gael Guennebaudfbd6e7b2018-11-09 13:53:42 +0100546 \link Eigen::zeta zeta\endlink(a,b); \n
547 a.\link ArrayBase::zeta zeta\endlink(b);
Gael Guennebaudcd221a62016-06-01 17:09:48 +0200548 </td>
Gael Guennebaudfd057f82016-07-20 12:14:10 +0200549 <td><a href="https://en.wikipedia.org/wiki/Hurwitz_zeta_function">Hurwitz zeta function</a>
550 \n \f$ \zeta(a_i,b_i)=\sum_{k=0}^{\infty}(b_i+k)^{\text{-}a_i} \f$</td>
Gael Guennebaudcd221a62016-06-01 17:09:48 +0200551 <td>
552 built-in for float and double
553 </td>
554 <td></td>
555</tr>
556<tr><td colspan="4"></td></tr>
557</table>
558
559\n
560
561*/
562
Gael Guennebaud22997172017-01-04 23:27:33 +0100563}