1#ifndef STAN_MATH_OPENCL_DOUBLE_D_HPP
2#define STAN_MATH_OPENCL_DOUBLE_D_HPP
14#define STRINGIFY2(A) \
59 const double C = (2 << 26) + 1;
66 double hx = a - p + p;
74 double hy = b - p + p;
77 double q = hx * ty + tx * hy;
80 res.
low = p - res.
high + q + tx * ty;
89static constexpr const char* double_d_src =
STRINGIFY(
129 res.
high = high + low;
130 res.
low = high - res.
high + low;
140 double high = a.
high + b;
144 low = a.
high - high + b;
146 low = b - high + a.
high;
149 res.
high = high + low;
150 res.
low = high - res.
high + low;
206 res.
high = high + low;
207 res.
low = high - res.
high + low;
217 double high = a.
high / b;
222 res.
high = high + low;
223 res.
low = high - res.
high + low;
232 double high = a / b.
high;
237 res.
high = high + low;
238 res.
low = high - res.
high + low;
#define STRINGIFY2(A)
Alternative stringify, that also exposes the code for use in C++ host code.
isfinite_< as_operation_cl_t< T > > isfinite(T &&a)
double_d operator*(double_d a, double b)
bool le_dd_d(double_d a, double b)
double_d operator/(double_d a, double b)
double_d div_dd_dd(double_d a, double_d b)
double_d mul_dd_d(double_d a, double b)
double_d sub_d_dd(double a, double_d b)
double_d mul_d_d(double a, double b)
double_d abs_dd(double_d a)
double_d add_dd_dd(double_d a, double_d b)
bool lt_d_dd(double a, double_d b)
bool operator>(double_d a, double_d b)
double_d sub_dd_dd(double_d a, double_d b)
double_d operator-(double a, double_d b)
double_d operator+(double_d a, double b)
double_d sub_dd_d(double_d a, double b)
bool le_d_dd(double a, double_d b)
bool operator<=(double_d a, double_d b)
double copysign(double a, double_d b)
double_d div_dd_d(double_d a, double b)
bool gt_dd_d(double_d a, double b)
bool operator<(double_d a, double_d b)
double_d div_d_dd(double a, double_d b)
bool isinf_dd(double_d a)
double copysign_d_dd(double a, double_d b)
bool isnan_dd(double_d a)
double_d mul_dd_dd(double_d a, double_d b)
bool lt_dd_dd(double_d a, double_d b)
bool ge_d_dd(double a, double_d b)
bool gt_d_dd(double a, double_d b)
bool ge_dd_d(double_d a, double b)
bool ge_dd_dd(double_d a, double_d b)
bool le_dd_dd(double_d a, double_d b)
double_d add_dd_d(double_d a, double b)
bool lt_dd_d(double_d a, double b)
bool operator>=(double_d a, double_d b)
bool gt_dd_dd(double_d a, double_d b)
fvar< return_type_t< T1, T2, T3 > > fma(const fvar< T1 > &x1, const fvar< T2 > &x2, const fvar< T3 > &x3)
The fused multiply-add operation (C99).
fvar< T > fabs(const fvar< T > &x)
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
bool isnan(const stan::math::var &a)
Checks if the given number is NaN.
bool isinf(const stan::math::var &a)
Return 1 if the specified argument is positive infinity or negative infinity and 0 otherwise.
double_d(double h, double l)
Double double - a 128 bit floating point number defined as an exact sum of 2 doubles.