15#pragma STDC FP_CONTRACT OFF
26#if defined(ES_ADDR_BASE)
28extern unsigned char *es_memory;
29#define ES_PTR(a) (es_memory + (a))
32#define ES_PTR(a) ((unsigned char *)(a))
40#define ES_EXPORT __declspec(dllexport)
41#elif defined(__GNUC__)
42#define ES_EXPORT __attribute__((visibility("default")))
62#define ES_CMD_DESPAWN 1u
63#define ES_CMD_REMOVE 2u
95 const unsigned char *
mut;
126static inline double es_f32(
const unsigned char *p) {
float v; memcpy(&v, p, 4);
return (
double)v; }
127static inline void es_set_f32(
unsigned char *p,
double v) {
float f = (float)v; memcpy(p, &f, 4); }
128static inline double es_f64(
const unsigned char *p) {
double v; memcpy(&v, p, 8);
return v; }
129static inline void es_set_f64(
unsigned char *p,
double v) { memcpy(p, &v, 8); }
133static inline int es_bool(
const unsigned char *p) {
return *p != 0; }
135static inline int es_bit(
const unsigned char *p,
unsigned bit) {
return (*p >> bit) & 1u; }
136static inline void es_set_bool(
unsigned char *p,
int v) { *p = (
unsigned char)(v ? 1 : 0); }
144static inline double es_abs(
double x) {
return fabs(x); }
145static inline double es_floor(
double x) {
return floor(x); }
146static inline double es_ceil(
double x) {
return ceil(x); }
147static inline double es_trunc(
double x) {
return trunc(x); }
148static inline double es_sqrt(
double x) {
return sqrt(x); }
163#define ES_PIO2_HI 1.5707963267341256
164#define ES_PIO2_LO 6.077100506506192e-11
165#define ES_TWO_OVER_PI 0.6366197723675814
169 double r = -0.16666666666666632 + z * (0.008333333333324894
170 + z * (-0.0001984126982985795 + z * (0.000002755731370707007
171 + z * (-2.505076025340686e-8 + z * 1.58969099521155e-10))));
172 return x + x * z * r;
177 double r = 0.0416666666666666 + z * (-0.001388888888887411
178 + z * (0.00002480158728947673 + z * (-2.7557314351390663e-7
179 + z * (2.087572321298175e-9 + z * -1.1359647557788195e-11))));
180 return 1.0 - 0.5 * z + z * z * r;
188 double q = fmod(n, 4.0);
189 if (q < 0.0) q += 4.0;
194 if (!isfinite(x))
return (
double)NAN;
204 if (!isfinite(x))
return (
double)NAN;
216 if (isnan(x) || x == 0.0)
return x;
217 return x > 0.0 ? 1.0 : -1.0;
225 if (!isfinite(x) || x == 0.0)
return x;
227 double r = (x - f) < 0.5 ? f : f + 1.0;
229 return (r == 0.0 && x < 0.0) ? -0.0 : r;
234static inline double es_min(
double a,
double b) {
235 if (isnan(a) || isnan(b))
return (
double)NAN;
236 if (a == b)
return signbit(a) ? a : b;
237 return a < b ? a : b;
239static inline double es_max(
double a,
double b) {
240 if (isnan(a) || isnan(b))
return (
double)NAN;
241 if (a == b)
return signbit(a) ? b : a;
242 return a > b ? a : b;
246static inline double es_rem(
double a,
double b) {
return fmod(a, b); }
static double es_max(double a, double b)
char es_check_sysctx[sizeof(EsSysCtx)==6 *sizeof(es_addr_t) ? 1 :-1]
static double es_sign(double x)
static double es_min(double a, double b)
static double es_kernel_sin(double x)
static void es_set_f64(unsigned char *p, double v)
char es_check_cmd[sizeof(EsCmd)==4 *4 ? 1 :-1]
char es_check_eventout[sizeof(EsEventOut)==3 *sizeof(es_addr_t) ? 1 :-1]
static double es_abs(double x)
static void es_set_bool(unsigned char *p, int v)
char es_check_rows[sizeof(EsQueryRows)==2 *sizeof(es_addr_t) ? 1 :-1]
static double es_exact_cos(double x)
static double es_kernel_cos(double x)
static void es_set_f32(unsigned char *p, double v)
static int es_bit(const unsigned char *p, unsigned bit)
static double es_ceil(double x)
static double es_f64(const unsigned char *p)
static double es_rem(double a, double b)
static int es_bool(const unsigned char *p)
static double es_trunc(double x)
static double es_trig_quadrant(double x, double *r)
static double es_f32(const unsigned char *p)
static double es_exact_sin(double x)
static double es_floor(double x)
static double es_round(double x)
static double es_sqrt(double x)
const char *const * comps
const unsigned char * mut
const unsigned char * resourcesMut
const char *const * resources
const EsQueryDecl * queries