1#ifndef SPECIAL_GENERIC_H
2#define SPECIAL_GENERIC_H
75double K0exp(
double x,
double z);
76double K1exp(
double x,
double z);
77double K2exp(
double x,
double z);
85double kron(
int x,
int y);
93template <
typename T>
int sgn(
T val) {
94 return (
T(0) < val) -(val<
T(0));
106std::enable_if_t<not std::numeric_limits<T>::is_integer,
bool>
108 const T m = std::min(std::fabs(x), std::fabs(y));
109 const int exp = m < std::numeric_limits<T>::min()
110 ? std::numeric_limits<T>::min_exponent - 1
112 return std::fabs(x - y) <= n * std::ldexp(std::numeric_limits<T>::epsilon(), exp);
double T(double x)
Wilson coefficient T(x).
scalar_t CLi2(scalar_t x)
Computes the complex dilogarithm function.
double K0exp(double x, double z)
double Cl2(double x)
Computes the Clausen function Cl2(x).
int sgn(T val)
Returns the sign of a value.
double Ei(double x)
Computes the exponential integral function Ei(x).
double K2exp(double x, double z)
double Cl3(double x)
Computes the Clausen function Cl3(x).
double Li3(double x)
Computes the trilogarithm function Li3(x).
double K1exp(double x, double z)
std::enable_if_t< not std::numeric_limits< T >::is_integer, bool > fpeq(T x, T y, std::size_t n)
Compares two floating point numbers with a given precision.
scalar_t CLi3(scalar_t x)
Computes the complex trilogarithm function.
scalar_t CLi4(scalar_t x)
Computes the complex quadrilogarithm function.
double kron(int x, int y)
Kronecker delta function.
double Li2(double x)
Computes the dilogarithm function Li2(x).