// Note: the following functions aren't really overloadable but it's very useful having the FrontEnd generate uninterpreted Boogie prototypes.

/* TABLE C-1 */
__device__ float __attribute__((overloadable)) rsqrtf(float x);
__device__ float __attribute__((overloadable)) sqrtf(float x);
__device__ float __attribute__((overloadable)) cbrtf(float x);
__device__ float __attribute__((overloadable)) rcbrtf(float x);
__device__ float __attribute__((overloadable)) hypotf(float x, float y);
__device__ float __attribute__((overloadable)) expf(float x);
__device__ float __attribute__((overloadable)) exp2f(float x);
__device__ float __attribute__((overloadable)) exp10f(float x);
__device__ float __attribute__((overloadable)) expm1f(float x);
__device__ float __attribute__((overloadable)) logf(float x);
__device__ float __attribute__((overloadable)) log2f(float x);
__device__ float __attribute__((overloadable)) log10f(float x);
__device__ float __attribute__((overloadable)) log1pf(float x);
__device__ float __attribute__((overloadable)) sinf(float x);
__device__ float __attribute__((overloadable)) cosf(float x);
__device__ float __attribute__((overloadable)) tanf(float x);
__device__ void  __attribute__((overloadable)) sincosf(float x, float *sptr, float *cptr);
__device__ float __attribute__((overloadable)) sinpif(float x);
__device__ float __attribute__((overloadable)) cospif(float x);
__device__ float __attribute__((overloadable)) asinf(float x);
__device__ float __attribute__((overloadable)) acosf(float x);
__device__ float __attribute__((overloadable)) atanf(float x);
__device__ float __attribute__((overloadable)) atan2f(float y, float x);
__device__ float __attribute__((overloadable)) sinhf(float x);
__device__ float __attribute__((overloadable)) coshf(float x);
__device__ float __attribute__((overloadable)) tanhf(float x);
__device__ float __attribute__((overloadable)) asinhf(float x);
__device__ float __attribute__((overloadable)) acoshf(float x);
__device__ float __attribute__((overloadable)) atanhf(float x);
__device__ float __attribute__((overloadable)) powf(float x, float y);
__device__ float __attribute__((overloadable)) erff(float x);
__device__ float __attribute__((overloadable)) erfcf(float x);
__device__ float __attribute__((overloadable)) erfinvf(float x);
__device__ float __attribute__((overloadable)) erfcinvf(float x);
__device__ float __attribute__((overloadable)) erfcxf(float x);
__device__ float __attribute__((overloadable)) lgammaf(float x);
__device__ float __attribute__((overloadable)) tgammaf(float x);
__device__ float __attribute__((overloadable)) fmaf(float x, float y, float z);
__device__ float __attribute__((overloadable)) frexpf(float x, float exp);
__device__ float __attribute__((overloadable)) ldexpf(float x, float exp);
__device__ float __attribute__((overloadable)) scalbnf(float x, int n);
__device__ float __attribute__((overloadable)) scalblnf(float x, int l);
__device__ float __attribute__((overloadable)) logbf(float x);
__device__ int   __attribute__((overloadable)) ilogbf(float x);
__device__ float __attribute__((overloadable)) j0f(float x);
__device__ float __attribute__((overloadable)) j1f(float x);
__device__ float __attribute__((overloadable)) jnf(float x);
__device__ float __attribute__((overloadable)) y0f(float x);
__device__ float __attribute__((overloadable)) y1f(float x);
__device__ float __attribute__((overloadable)) ynf(int x, float y);
__device__ float __attribute__((overloadable)) fmodf(float x, float y);
__device__ float __attribute__((overloadable)) remainderf(float x, float y);
__device__ float __attribute__((overloadable)) remquof(float x, float y, int *iptr);
__device__ float __attribute__((overloadable)) modff(float x, float *iptr);
__device__ float __attribute__((overloadable)) fdimf(float x, float y);
__device__ float __attribute__((overloadable)) truncf(float x);
__device__ float __attribute__((overloadable)) roundf(float x);
__device__ float __attribute__((overloadable)) rintf(float x);
__device__ float __attribute__((overloadable)) nearbyintf(float x);
__device__ float __attribute__((overloadable)) ceilf(float x);
__device__ float __attribute__((overloadable)) floorf(float x);
__device__ long int __attribute__((overloadable)) lrintf(float x);
__device__ long int  __attribute__((overloadable)) lroundf(float x);
__device__ long long int __attribute__((overloadable)) llrintf(float x);
__device__ long long int __attribute__((overloadable)) llroundf(float x);

/* TABLE C-2 */
__device__ double __attribute__((overloadable)) rsqrt(double x);
__device__ double __attribute__((overloadable)) sqrt(double x);
__device__ double __attribute__((overloadable)) cbrt(double x);
__device__ double __attribute__((overloadable)) rcbrt(double x);
__device__ double __attribute__((overloadable)) hypot(double x, double y);
__device__ double __attribute__((overloadable)) exp(double x);
__device__ double __attribute__((overloadable)) exp2(double x);
__device__ double __attribute__((overloadable)) exp10(double x);
__device__ double __attribute__((overloadable)) expm1(double x);
__device__ double __attribute__((overloadable)) log(double x);
__device__ double __attribute__((overloadable)) log2(double x);
__device__ double __attribute__((overloadable)) log10(double x);
__device__ double __attribute__((overloadable)) log1p(double x);
__device__ double __attribute__((overloadable)) sin(double x);
__device__ double __attribute__((overloadable)) cos(double x);
__device__ double __attribute__((overloadable)) tan(double x);
__device__ void   __attribute__((overloadable)) sincos(double x, double *sptr, double *cptr);
__device__ double __attribute__((overloadable)) sinpi(double x);
__device__ double __attribute__((overloadable)) cospi(double x);
__device__ double __attribute__((overloadable)) asin(double x);
__device__ double __attribute__((overloadable)) acos(double x);
__device__ double __attribute__((overloadable)) atan(double x);
__device__ double __attribute__((overloadable)) atan2(double y, double x);
__device__ double __attribute__((overloadable)) sinh(double x);
__device__ double __attribute__((overloadable)) cosh(double x);
__device__ double __attribute__((overloadable)) tanh(double x);
__device__ double __attribute__((overloadable)) asinh(double x);
__device__ double __attribute__((overloadable)) acosh(double x);
__device__ double __attribute__((overloadable)) atanh(double x);
__device__ double __attribute__((overloadable)) pow(double x, double y);
__device__ double __attribute__((overloadable)) erf(double x);
__device__ double __attribute__((overloadable)) erfc(double x);
__device__ double __attribute__((overloadable)) erfinv(double x);
__device__ double __attribute__((overloadable)) erfcinv(double x);
__device__ double __attribute__((overloadable)) erfcx(double x);
__device__ double __attribute__((overloadable)) lgamma(double x);
__device__ double __attribute__((overloadable)) tgamma(double x);
__device__ double __attribute__((overloadable)) fma(double x, double y, double z);
__device__ double __attribute__((overloadable)) frexp(double x, double exp);
__device__ double __attribute__((overloadable)) ldexp(double x, double exp);
__device__ double __attribute__((overloadable)) scalbn(double x, int n);
__device__ double __attribute__((overloadable)) scalbln(double x, int l);
__device__ double __attribute__((overloadable)) logb(double x);
__device__ int    __attribute__((overloadable)) ilogb(double x);
__device__ double __attribute__((overloadable)) j0(double x);
__device__ double __attribute__((overloadable)) j1(double x);
__device__ double __attribute__((overloadable)) jn(double x);
__device__ double __attribute__((overloadable)) y0(double x);
__device__ double __attribute__((overloadable)) y1(double x);
__device__ double __attribute__((overloadable)) yn(int x, double y);
__device__ double __attribute__((overloadable)) fmod(double x, double y);
__device__ double __attribute__((overloadable)) remainder(double x, double y);
__device__ double __attribute__((overloadable)) remquo(double x, double y, int *iptr);
__device__ double __attribute__((overloadable)) modf(double x, double *iptr);
__device__ double __attribute__((overloadable)) fdim(double x, double y);
__device__ double __attribute__((overloadable)) trunc(double x);
__device__ double __attribute__((overloadable)) round(double x);
__device__ double __attribute__((overloadable)) rint(double x);
__device__ double __attribute__((overloadable)) nearbyint(double x);
__device__ double __attribute__((overloadable)) ceil(double x);
__device__ double __attribute__((overloadable)) floor(double x);
__device__ long int __attribute__((overloadable)) lrint(double x);
__device__ long int  __attribute__((overloadable)) lround(double x);
__device__ long long int __attribute__((overloadable)) llrint(double x);
__device__ long long int __attribute__((overloadable)) llround(double x);

/* Table C-3 and C-4 */
__device__ float __attribute__((overloadable)) __fdividef(float x, float y);
__device__ float __attribute__((overloadable)) __sinf(float x);
__device__ float __attribute__((overloadable)) __cosf(float x);
__device__ float __attribute__((overloadable)) __tanf(float x);
__device__ float __attribute__((overloadable)) __sincosf(float x, float *sptr, float *cptr);
__device__ float __attribute__((overloadable)) __logf(float x);
__device__ float __attribute__((overloadable)) __log2f(float x);
__device__ float __attribute__((overloadable)) __log10f(float x);
__device__ float __attribute__((overloadable)) __expf(float x);
__device__ float __attribute__((overloadable)) __exp10f(float x);
__device__ float __attribute__((overloadable)) __powf(float x, float y);

__device__ float __attribute__((overloadable)) __fadd_rn(float x, float y);
__device__ float __attribute__((overloadable)) __fadd_rz(float x, float y);
__device__ float __attribute__((overloadable)) __fadd_ru(float x, float y);
__device__ float __attribute__((overloadable)) __fadd_rd(float x, float y);
__device__ float __attribute__((overloadable)) __fmul_rn(float x, float y);
__device__ float __attribute__((overloadable)) __fmul_rz(float x, float y);
__device__ float __attribute__((overloadable)) __fmul_ru(float x, float y);
__device__ float __attribute__((overloadable)) __fmul_rd(float x, float y);
__device__ float __attribute__((overloadable)) __fmaf_rn(float x, float y, float z);
__device__ float __attribute__((overloadable)) __fmaf_rz(float x, float y, float z);
__device__ float __attribute__((overloadable)) __fmaf_ru(float x, float y, float z);
__device__ float __attribute__((overloadable)) __fmaf_rd(float x, float y, float z);
__device__ float __attribute__((overloadable)) __frcp_rn(float x);
__device__ float __attribute__((overloadable)) __frcp_rz(float x);
__device__ float __attribute__((overloadable)) __frcp_ru(float x);
__device__ float __attribute__((overloadable)) __frcp_rd(float x);
__device__ float __attribute__((overloadable)) __fsqrt_rn(float x);
__device__ float __attribute__((overloadable)) __fsqrt_rz(float x);
__device__ float __attribute__((overloadable)) __fsqrt_ru(float x);
__device__ float __attribute__((overloadable)) __fsqrt_rd(float x);
__device__ float __attribute__((overloadable)) __fdiv_rn(float x, float y);
__device__ float __attribute__((overloadable)) __fdiv_rz(float x, float y);
__device__ float __attribute__((overloadable)) __fdiv_ru(float x, float y);
__device__ float __attribute__((overloadable)) __fdiv_rd(float x, float y);
// __dividef above
// __expf above
// __exp10f above
// __logf above
// __log2f above
// __log10f above
// __sinf above
// __cosf above
// __sincosf above
// __tanf above
// __powf above

/* Table C-5 */
__device__ double __attribute__((overloadable)) __dadd_rn(double x, double y);
__device__ double __attribute__((overloadable)) __dadd_rz(double x, double y);
__device__ double __attribute__((overloadable)) __dadd_ru(double x, double y);
__device__ double __attribute__((overloadable)) __dadd_rd(double x, double y);
__device__ double __attribute__((overloadable)) __dmul_rn(double x, double y);
__device__ double __attribute__((overloadable)) __dmul_rz(double x, double y);
__device__ double __attribute__((overloadable)) __dmul_ru(double x, double y);
__device__ double __attribute__((overloadable)) __dmul_rd(double x, double y);
__device__ double __attribute__((overloadable)) __fma_rn(double x, double y, double z);
__device__ double __attribute__((overloadable)) __fma_rz(double x, double y, double z);
__device__ double __attribute__((overloadable)) __fma_ru(double x, double y, double z);
__device__ double __attribute__((overloadable)) __fma_rd(double x, double y, double z);
__device__ double __attribute__((overloadable)) __ddiv_rn(double x, double y);
__device__ double __attribute__((overloadable)) __ddiv_rz(double x, double y);
__device__ double __attribute__((overloadable)) __ddiv_ru(double x, double y);
__device__ double __attribute__((overloadable)) __ddiv_rd(double x, double y);
__device__ double __attribute__((overloadable)) __drcp_rn(double x);
__device__ double __attribute__((overloadable)) __drcp_rz(double x);
__device__ double __attribute__((overloadable)) __drcp_ru(double x);
__device__ double __attribute__((overloadable)) __drcp_rd(double x);
__device__ double __attribute__((overloadable)) __dsqrt_rn(double x);
__device__ double __attribute__((overloadable)) __dsqrt_rz(double x);
__device__ double __attribute__((overloadable)) __dsqrt_ru(double x);
__device__ double __attribute__((overloadable)) __dsqrt_rd(double x);
