6 #ifndef THEORETICA_SPECIAL_H
7 #define THEORETICA_SPECIAL_H
49 ? fact<uint64_t>(k / 2 - 1)
50 : double_fact<uint64_t>(k - 2) *
SQRTPI / (1 << ((k - 1) / 2));
65 if(
floor(-x) % 2 == 0) {
88 for (
int i = 1; i < 7; ++i)
89 A5 += c[i] / (x + i - 1);
91 return (x - 0.5) * (
ln(x + 4.5) - 1)
112 return gamma((
unsigned int) x);
117 if(x < 0 &&
floor(-x) % 2 == 0)
Mathematical constants and default algorithm parameters.
#define TH_MATH_ERROR(F_NAME, VALUE, EXCEPTION)
TH_MATH_ERROR is a macro which throws exceptions or modifies errno (depending on which compiling opti...
Definition: error.h:219
real beta(real x1, real x2)
Beta special function of real argument.
Definition: special.h:141
real pi(real x)
Pi special function of real argument.
Definition: special.h:131
real half_gamma(unsigned int k)
Half Gamma special function, defined as HG(n) = Gamma(n / 2) for any positive integer n.
Definition: special.h:41
real lngamma(real x)
Log Gamma special function of real argument.
Definition: special.h:59
real gamma(unsigned int k)
Gamma special function of positive integer argument.
Definition: special.h:23
Main namespace of the library which contains all functions and objects.
Definition: algebra.h:27
double real
A real number, defined as a floating point type.
Definition: constants.h:188
dual2 ln(dual2 x)
Compute the natural logarithm of a second order dual number.
Definition: dual2_functions.h:139
real inf()
Return positive infinity in floating point representation.
Definition: error.h:76
constexpr real SQRTPI
The square root of Pi.
Definition: constants.h:224
dual2 exp(dual2 x)
Compute the exponential of a second order dual number.
Definition: dual2_functions.h:130
real fract(real x)
Compute the fractional part of a real number.
Definition: real_analysis.h:288
TH_CONSTEXPR IntType fact(unsigned int n)
Compute the factorial of n.
Definition: real_analysis.h:671
constexpr real MACH_EPSILON
Machine epsilon for the real type.
Definition: constants.h:197
dual2 sin(dual2 x)
Compute the sine of a second order dual number.
Definition: dual2_functions.h:70
constexpr real SQRT2
The square root of 2.
Definition: constants.h:251
constexpr real PI
The Pi mathematical constant.
Definition: constants.h:206
real nan()
Return a quiet NaN number in floating point representation.
Definition: error.h:54
TH_CONSTEXPR int floor(real x)
Compute the floor of x Computes the maximum integer number that is smaller than x.
Definition: real_analysis.h:271