28#include "utils/fmgrprotos.h"
89 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
90 errmsg(
"value out of range: overflow")));
97 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
98 errmsg(
"value out of range: underflow")));
105 (
errcode(ERRCODE_DIVISION_BY_ZERO),
106 errmsg(
"division by zero")));
120 int inf = isinf(
val);
184 const char *type_name,
const char *orig_string,
185 struct Node *escontext)
197 while (*num !=
'\0' && isspace((
unsigned char) *num))
206 (
errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
207 errmsg(
"invalid input syntax for type %s: \"%s\"",
208 type_name, orig_string)));
211 val = strtof(num, &endptr);
214 if (endptr == num || errno != 0)
216 int save_errno = errno;
263 else if (save_errno == ERANGE)
273#
if !defined(HUGE_VALF)
276 (
val >= HUGE_VALF ||
val <= -HUGE_VALF)
281 char *errnumber =
pstrdup(num);
283 errnumber[endptr - num] =
'\0';
286 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
287 errmsg(
"\"%s\" is out of range for type real",
293 (
errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
294 errmsg(
"invalid input syntax for type %s: \"%s\"",
295 type_name, orig_string)));
299 while (*endptr !=
'\0' && isspace((
unsigned char) *endptr))
305 else if (*endptr !=
'\0')
307 (
errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
308 errmsg(
"invalid input syntax for type %s: \"%s\"",
309 type_name, orig_string)));
396 const char *type_name,
const char *orig_string,
397 struct Node *escontext)
403 while (*num !=
'\0' && isspace((
unsigned char) *num))
412 (
errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
413 errmsg(
"invalid input syntax for type %s: \"%s\"",
414 type_name, orig_string)));
417 val = strtod(num, &endptr);
420 if (endptr == num || errno != 0)
422 int save_errno = errno;
469 else if (save_errno == ERANGE)
482 if (
val == 0.0 ||
val >= HUGE_VAL ||
val <= -HUGE_VAL)
484 char *errnumber =
pstrdup(num);
486 errnumber[endptr - num] =
'\0';
488 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
489 errmsg(
"\"%s\" is out of range for type double precision",
495 (
errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
496 errmsg(
"invalid input syntax for type %s: \"%s\"",
497 type_name, orig_string)));
501 while (*endptr !=
'\0' && isspace((
unsigned char) *endptr))
507 else if (*endptr !=
'\0')
509 (
errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
510 errmsg(
"invalid input syntax for type %s: \"%s\"",
511 type_name, orig_string)));
1040 if (isnan(offset) || offset < 0)
1042 (
errcode(ERRCODE_INVALID_PRECEDING_OR_FOLLOWING_SIZE),
1043 errmsg(
"invalid preceding or following size in window function")));
1057 else if (isnan(base))
1075 if (isinf(offset) && isinf(base) &&
1076 (sub ? base > 0 : base < 0))
1086 sum = base - offset;
1088 sum = base + offset;
1116 if (isnan(offset) || offset < 0)
1118 (
errcode(ERRCODE_INVALID_PRECEDING_OR_FOLLOWING_SIZE),
1119 errmsg(
"invalid preceding or following size in window function")));
1133 else if (isnan(base))
1151 if (isinf(offset) && isinf(base) &&
1152 (sub ? base > 0 : base < 0))
1162 sum = base - offset;
1164 sum = base + offset;
1201 if (
unlikely(isinf(result)) && !isinf(num))
1203 if (
unlikely(result == 0.0f) && num != 0.0)
1228 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
1229 errmsg(
"integer out of range")));
1253 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
1254 errmsg(
"smallint out of range")));
1302 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
1303 errmsg(
"integer out of range")));
1327 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
1328 errmsg(
"smallint out of range")));
1434 result = floor(arg1);
1436 result = -floor(-arg1);
1453 (
errcode(ERRCODE_INVALID_ARGUMENT_FOR_POWER_FUNCTION),
1454 errmsg(
"cannot take square root of a negative number")));
1456 result = sqrt(arg1);
1457 if (
unlikely(isinf(result)) && !isinf(arg1))
1459 if (
unlikely(result == 0.0) && arg1 != 0.0)
1475 result = cbrt(arg1);
1476 if (
unlikely(isinf(result)) && !isinf(arg1))
1478 if (
unlikely(result == 0.0) && arg1 != 0.0)
1503 if (isnan(arg2) || arg2 != 0.0)
1519 if (arg1 == 0 && arg2 < 0)
1521 (
errcode(ERRCODE_INVALID_ARGUMENT_FOR_POWER_FUNCTION),
1522 errmsg(
"zero raised to a negative power is undefined")));
1523 if (arg1 < 0 && floor(arg2) != arg2)
1525 (
errcode(ERRCODE_INVALID_ARGUMENT_FOR_POWER_FUNCTION),
1526 errmsg(
"a negative number raised to a non-integer power yields a complex result")));
1535 float8 absx = fabs(arg1);
1539 else if (arg2 > 0.0)
1554 else if (isinf(arg1))
1558 else if (arg1 > 0.0)
1574 bool yisoddinteger = (floor(halfy) != halfy);
1577 result = yisoddinteger ? arg1 : -arg1;
1579 result = yisoddinteger ? -0.0 : 0.0;
1592 result = pow(arg1, arg2);
1593 if (errno == EDOM || isnan(result))
1610 float8 absx = fabs(arg1);
1614 else if (arg2 >= 0.0 ? (absx > 1.0) : (absx < 1.0))
1620 else if (errno == ERANGE)
1631 if (
unlikely(result == 0.0) && arg1 != 0.0)
1656 else if (isinf(arg1))
1659 result = (arg1 > 0.0) ? arg1 : 0;
1701 (
errcode(ERRCODE_INVALID_ARGUMENT_FOR_LOG),
1702 errmsg(
"cannot take logarithm of zero")));
1705 (
errcode(ERRCODE_INVALID_ARGUMENT_FOR_LOG),
1706 errmsg(
"cannot take logarithm of a negative number")));
1709 if (
unlikely(isinf(result)) && !isinf(arg1))
1711 if (
unlikely(result == 0.0) && arg1 != 1.0)
1734 (
errcode(ERRCODE_INVALID_ARGUMENT_FOR_LOG),
1735 errmsg(
"cannot take logarithm of zero")));
1738 (
errcode(ERRCODE_INVALID_ARGUMENT_FOR_LOG),
1739 errmsg(
"cannot take logarithm of a negative number")));
1741 result = log10(arg1);
1742 if (
unlikely(isinf(result)) && !isinf(arg1))
1744 if (
unlikely(result == 0.0) && arg1 != 1.0)
1769 if (arg1 < -1.0 || arg1 > 1.0)
1771 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
1772 errmsg(
"input is out of range")));
1774 result = acos(arg1);
1800 if (arg1 < -1.0 || arg1 > 1.0)
1802 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
1803 errmsg(
"input is out of range")));
1805 result = asin(arg1);
1831 result = atan(arg1);
1850 if (isnan(arg1) || isnan(arg2))
1857 result = atan2(arg1, arg2);
1895 if (errno != 0 || isinf(arg1))
1897 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
1898 errmsg(
"input is out of range")));
1922 if (errno != 0 || isinf(arg1))
1924 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
1925 errmsg(
"input is out of range")));
1927 result = 1.0 / result;
1950 if (errno != 0 || isinf(arg1))
1952 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
1953 errmsg(
"input is out of range")));
1977 if (errno != 0 || isinf(arg1))
1979 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
1980 errmsg(
"input is out of range")));
2031#define INIT_DEGREE_CONSTANTS() \
2033 if (!degree_consts_set) \
2034 init_degree_constants(); \
2058 volatile float8 asin_x = asin(
x);
2064 volatile float8 acos_x = acos(
x);
2066 return 90.0 - (acos_x /
acos_0_5) * 60.0;
2091 volatile float8 asin_x = asin(
x);
2093 return 90.0 - (asin_x /
asin_0_5) * 30.0;
2097 volatile float8 acos_x = acos(
x);
2124 if (arg1 < -1.0 || arg1 > 1.0)
2126 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
2127 errmsg(
"input is out of range")));
2161 if (arg1 < -1.0 || arg1 > 1.0)
2163 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
2164 errmsg(
"input is out of range")));
2186 volatile float8 atan_arg1;
2200 atan_arg1 = atan(arg1);
2201 result = (atan_arg1 /
atan_1_0) * 45.0;
2219 volatile float8 atan2_arg1_arg2;
2222 if (isnan(arg1) || isnan(arg2))
2236 atan2_arg1_arg2 = atan2(arg1, arg2);
2237 result = (atan2_arg1_arg2 /
atan_1_0) * 45.0;
2256 return (sin_x /
sin_30) / 2.0;
2333 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
2334 errmsg(
"input is out of range")));
2339 arg1 = fmod(arg1, 360.0);
2350 arg1 = 360.0 - arg1;
2356 arg1 = 180.0 - arg1;
2377 volatile float8 cot_arg1;
2389 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
2390 errmsg(
"input is out of range")));
2395 arg1 = fmod(arg1, 360.0);
2407 arg1 = 360.0 - arg1;
2414 arg1 = 180.0 - arg1;
2454 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
2455 errmsg(
"input is out of range")));
2460 arg1 = fmod(arg1, 360.0);
2472 arg1 = 360.0 - arg1;
2479 arg1 = 180.0 - arg1;
2499 volatile float8 tan_arg1;
2511 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
2512 errmsg(
"input is out of range")));
2517 arg1 = fmod(arg1, 360.0);
2529 arg1 = 360.0 - arg1;
2536 arg1 = 180.0 - arg1;
2604 result = sinh(arg1);
2611 if (errno == ERANGE)
2633 result = cosh(arg1);
2639 if (errno == ERANGE)
2660 result = tanh(arg1);
2680 result = asinh(arg1);
2702 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
2703 errmsg(
"input is out of range")));
2705 result = acosh(arg1);
2724 if (arg1 < -1.0 || arg1 > 1.0)
2726 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
2727 errmsg(
"input is out of range")));
2736 else if (arg1 == 1.0)
2739 result = atanh(arg1);
2780 result = erfc(arg1);
2807 else if (isinf(arg1))
2829 result = tgamma(arg1);
2831 if (errno != 0 || isinf(result) || isnan(result))
2838 else if (result == 0.0)
2861 result = lgamma(arg1);
2870 if (errno == ERANGE || (isinf(result) && !isinf(arg1)))
2938 elog(
ERROR,
"%s: expected %d-element float8 array", caller, n);
2971 N1 = transvalues1[0];
2972 Sx1 = transvalues1[1];
2973 Sxx1 = transvalues1[2];
2975 N2 = transvalues2[0];
2976 Sx2 = transvalues2[1];
2977 Sxx2 = transvalues2[2];
3008 tmp = Sx1 / N1 - Sx2 / N2;
3009 Sxx = Sxx1 + Sxx2 + N1 * N2 * tmp * tmp / N;
3010 if (
unlikely(isinf(Sxx)) && !isinf(Sxx1) && !isinf(Sxx2))
3021 transvalues1[0] = N;
3022 transvalues1[1] = Sx;
3023 transvalues1[2] = Sxx;
3029 Datum transdatums[3];
3055 Sx = transvalues[1];
3056 Sxx = transvalues[2];
3064 if (transvalues[0] > 0.0)
3067 Sxx += tmp * tmp / (N * transvalues[0]);
3075 if (isinf(Sx) || isinf(Sxx))
3077 if (!isinf(transvalues[1]) && !isinf(
newval))
3103 transvalues[1] = Sx;
3104 transvalues[2] = Sxx;
3110 Datum transdatums[3];
3138 Sx = transvalues[1];
3139 Sxx = transvalues[2];
3147 if (transvalues[0] > 0.0)
3150 Sxx += tmp * tmp / (N * transvalues[0]);
3158 if (isinf(Sx) || isinf(Sxx))
3160 if (!isinf(transvalues[1]) && !isinf(
newval))
3186 transvalues[1] = Sx;
3187 transvalues[2] = Sxx;
3193 Datum transdatums[3];
3216 Sx = transvalues[1];
3237 Sxx = transvalues[2];
3259 Sxx = transvalues[2];
3281 Sxx = transvalues[2];
3303 Sxx = transvalues[2];
3354 Sx = transvalues[1];
3355 Sxx = transvalues[2];
3356 Sy = transvalues[3];
3357 Syy = transvalues[4];
3358 Sxy = transvalues[5];
3367 if (transvalues[0] > 0.0)
3369 tmpX = newvalX * N - Sx;
3370 tmpY = newvalY * N - Sy;
3371 scale = 1.0 / (N * transvalues[0]);
3372 Sxx += tmpX * tmpX *
scale;
3373 Syy += tmpY * tmpY *
scale;
3374 Sxy += tmpX * tmpY *
scale;
3382 if (isinf(Sx) || isinf(Sxx) || isinf(Sy) || isinf(Syy) || isinf(Sxy))
3384 if (((isinf(Sx) || isinf(Sxx)) &&
3385 !isinf(transvalues[1]) && !isinf(newvalX)) ||
3386 ((isinf(Sy) || isinf(Syy)) &&
3387 !isinf(transvalues[3]) && !isinf(newvalY)) ||
3389 !isinf(transvalues[1]) && !isinf(newvalX) &&
3390 !isinf(transvalues[3]) && !isinf(newvalY)))
3409 if (isnan(newvalX) || isinf(newvalX))
3411 if (isnan(newvalY) || isinf(newvalY))
3423 transvalues[1] = Sx;
3424 transvalues[2] = Sxx;
3425 transvalues[3] = Sy;
3426 transvalues[4] = Syy;
3427 transvalues[5] = Sxy;
3433 Datum transdatums[6];
3488 N1 = transvalues1[0];
3489 Sx1 = transvalues1[1];
3490 Sxx1 = transvalues1[2];
3491 Sy1 = transvalues1[3];
3492 Syy1 = transvalues1[4];
3493 Sxy1 = transvalues1[5];
3495 N2 = transvalues2[0];
3496 Sx2 = transvalues2[1];
3497 Sxx2 = transvalues2[2];
3498 Sy2 = transvalues2[3];
3499 Syy2 = transvalues2[4];
3500 Sxy2 = transvalues2[5];
3540 tmp1 = Sx1 / N1 - Sx2 / N2;
3541 Sxx = Sxx1 + Sxx2 + N1 * N2 * tmp1 * tmp1 / N;
3542 if (
unlikely(isinf(Sxx)) && !isinf(Sxx1) && !isinf(Sxx2))
3545 tmp2 = Sy1 / N1 - Sy2 / N2;
3546 Syy = Syy1 + Syy2 + N1 * N2 * tmp2 * tmp2 / N;
3547 if (
unlikely(isinf(Syy)) && !isinf(Syy1) && !isinf(Syy2))
3549 Sxy = Sxy1 + Sxy2 + N1 * N2 * tmp1 * tmp2 / N;
3550 if (
unlikely(isinf(Sxy)) && !isinf(Sxy1) && !isinf(Sxy2))
3561 transvalues1[0] = N;
3562 transvalues1[1] = Sx;
3563 transvalues1[2] = Sxx;
3564 transvalues1[3] = Sy;
3565 transvalues1[4] = Syy;
3566 transvalues1[5] = Sxy;
3572 Datum transdatums[6];
3599 Sxx = transvalues[2];
3620 Syy = transvalues[4];
3641 Sxy = transvalues[5];
3662 Sx = transvalues[1];
3681 Sy = transvalues[3];
3700 Sxy = transvalues[5];
3719 Sxy = transvalues[5];
3740 Sxx = transvalues[2];
3741 Syy = transvalues[4];
3742 Sxy = transvalues[5];
3751 if (Sxx == 0 || Syy == 0)
3769 Sxx = transvalues[2];
3770 Syy = transvalues[4];
3771 Sxy = transvalues[5];
3801 Sxx = transvalues[2];
3802 Sxy = transvalues[5];
3830 Sx = transvalues[1];
3831 Sxx = transvalues[2];
3832 Sy = transvalues[3];
3833 Sxy = transvalues[5];
4084 (
errcode(ERRCODE_INVALID_ARGUMENT_FOR_WIDTH_BUCKET_FUNCTION),
4085 errmsg(
"count must be greater than zero")));
4087 if (isnan(operand) || isnan(bound1) || isnan(bound2))
4089 (
errcode(ERRCODE_INVALID_ARGUMENT_FOR_WIDTH_BUCKET_FUNCTION),
4090 errmsg(
"operand, lower bound, and upper bound cannot be NaN")));
4093 if (isinf(bound1) || isinf(bound2))
4095 (
errcode(ERRCODE_INVALID_ARGUMENT_FOR_WIDTH_BUCKET_FUNCTION),
4096 errmsg(
"lower and upper bounds must be finite")));
4098 if (bound1 < bound2)
4100 if (operand < bound1)
4102 else if (operand >= bound2)
4106 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
4107 errmsg(
"integer out of range")));
4111 if (!isinf(bound2 - bound1))
4114 result = count * ((operand - bound1) / (bound2 - bound1));
4127 result = count * ((operand / 2 - bound1 / 2) / (bound2 / 2 - bound1 / 2));
4130 if (result >= count)
4136 else if (bound1 > bound2)
4138 if (operand > bound1)
4140 else if (operand <= bound2)
4144 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
4145 errmsg(
"integer out of range")));
4149 if (!isinf(bound1 - bound2))
4150 result = count * ((bound1 - operand) / (bound1 - bound2));
4152 result = count * ((bound1 / 2 - operand / 2) / (bound1 / 2 - bound2 / 2));
4153 if (result >= count)
4161 (
errcode(ERRCODE_INVALID_ARGUMENT_FOR_WIDTH_BUCKET_FUNCTION),
4162 errmsg(
"lower bound cannot equal upper bound")));
#define PG_GETARG_ARRAYTYPE_P(n)
#define PG_RETURN_ARRAYTYPE_P(x)
ArrayType * construct_array_builtin(Datum *elems, int nelems, Oid elmtype)
#define FLOAT4_FITS_IN_INT32(num)
#define FLOAT8_FITS_IN_INT32(num)
#define FLOAT4_FITS_IN_INT16(num)
#define FLOAT8_FITS_IN_INT16(num)
int double_to_shortest_decimal_buf(double f, char *result)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereturn(context, dummy_value,...)
#define ereport(elevel,...)
int float_to_shortest_decimal_buf(float f, char *result)
float8 float8in_internal(char *num, char **endptr_p, const char *type_name, const char *orig_string, struct Node *escontext)
Datum float4lt(PG_FUNCTION_ARGS)
Datum dceil(PG_FUNCTION_ARGS)
Datum btfloat4cmp(PG_FUNCTION_ARGS)
Datum float84gt(PG_FUNCTION_ARGS)
Datum dasinh(PG_FUNCTION_ARGS)
Datum float84mi(PG_FUNCTION_ARGS)
static double sind_0_to_30(double x)
Datum dtof(PG_FUNCTION_ARGS)
Datum radians(PG_FUNCTION_ARGS)
pg_noinline void float_zero_divide_error(void)
pg_noinline void float_overflow_error(void)
Datum width_bucket_float8(PG_FUNCTION_ARGS)
Datum dasind(PG_FUNCTION_ARGS)
Datum float8_var_samp(PG_FUNCTION_ARGS)
Datum btfloat84cmp(PG_FUNCTION_ARGS)
Datum ftoi4(PG_FUNCTION_ARGS)
Datum dsind(PG_FUNCTION_ARGS)
Datum datan2(PG_FUNCTION_ARGS)
Datum derfc(PG_FUNCTION_ARGS)
Datum float8div(PG_FUNCTION_ARGS)
Datum float8_regr_syy(PG_FUNCTION_ARGS)
Datum float48gt(PG_FUNCTION_ARGS)
Datum degrees(PG_FUNCTION_ARGS)
Datum btfloat4sortsupport(PG_FUNCTION_ARGS)
Datum dlgamma(PG_FUNCTION_ARGS)
Datum dacosd(PG_FUNCTION_ARGS)
static double acosd_q1(double x)
Datum float8_regr_r2(PG_FUNCTION_ARGS)
Datum float8_regr_combine(PG_FUNCTION_ARGS)
Datum float8_regr_slope(PG_FUNCTION_ARGS)
Datum float8eq(PG_FUNCTION_ARGS)
Datum dtanh(PG_FUNCTION_ARGS)
static double cosd_q1(double x)
Datum dlog10(PG_FUNCTION_ARGS)
Datum float84mul(PG_FUNCTION_ARGS)
static bool degree_consts_set
Datum datanh(PG_FUNCTION_ARGS)
Datum dcosd(PG_FUNCTION_ARGS)
static int btfloat8fastcmp(Datum x, Datum y, SortSupport ssup)
Datum derf(PG_FUNCTION_ARGS)
Datum float4up(PG_FUNCTION_ARGS)
Datum float48pl(PG_FUNCTION_ARGS)
Datum dsinh(PG_FUNCTION_ARGS)
Datum float8_combine(PG_FUNCTION_ARGS)
Datum float8_avg(PG_FUNCTION_ARGS)
Datum float8_covar_pop(PG_FUNCTION_ARGS)
Datum dtan(PG_FUNCTION_ARGS)
Datum float8ge(PG_FUNCTION_ARGS)
Datum float8_stddev_pop(PG_FUNCTION_ARGS)
static double asind_q1(double x)
Datum dround(PG_FUNCTION_ARGS)
Datum float4um(PG_FUNCTION_ARGS)
Datum dlog1(PG_FUNCTION_ARGS)
Datum datan2d(PG_FUNCTION_ARGS)
Datum float4abs(PG_FUNCTION_ARGS)
Datum ftod(PG_FUNCTION_ARGS)
Datum float4mul(PG_FUNCTION_ARGS)
Datum float4le(PG_FUNCTION_ARGS)
Datum dcos(PG_FUNCTION_ARGS)
Datum float8_regr_intercept(PG_FUNCTION_ARGS)
Datum float8out(PG_FUNCTION_ARGS)
Datum float84le(PG_FUNCTION_ARGS)
Datum dexp(PG_FUNCTION_ARGS)
Datum float8pl(PG_FUNCTION_ARGS)
Datum float8lt(PG_FUNCTION_ARGS)
Datum float4gt(PG_FUNCTION_ARGS)
Datum float4out(PG_FUNCTION_ARGS)
#define INIT_DEGREE_CONSTANTS()
Datum dsign(PG_FUNCTION_ARGS)
Datum float8recv(PG_FUNCTION_ARGS)
Datum float4send(PG_FUNCTION_ARGS)
Datum float4ne(PG_FUNCTION_ARGS)
Datum float84eq(PG_FUNCTION_ARGS)
Datum float84lt(PG_FUNCTION_ARGS)
Datum float48mi(PG_FUNCTION_ARGS)
Datum float8le(PG_FUNCTION_ARGS)
Datum dtrunc(PG_FUNCTION_ARGS)
Datum btfloat8cmp(PG_FUNCTION_ARGS)
Datum float8in(PG_FUNCTION_ARGS)
Datum float8ne(PG_FUNCTION_ARGS)
Datum dpow(PG_FUNCTION_ARGS)
Datum float8mi(PG_FUNCTION_ARGS)
static double sind_q1(double x)
Datum ftoi2(PG_FUNCTION_ARGS)
Datum float4mi(PG_FUNCTION_ARGS)
Datum float8_accum(PG_FUNCTION_ARGS)
Datum float48eq(PG_FUNCTION_ARGS)
Datum i2tof(PG_FUNCTION_ARGS)
static float8 one_minus_cos_60
Datum float84pl(PG_FUNCTION_ARGS)
Datum btfloat48cmp(PG_FUNCTION_ARGS)
Datum float48ge(PG_FUNCTION_ARGS)
Datum float84div(PG_FUNCTION_ARGS)
Datum dcotd(PG_FUNCTION_ARGS)
pg_noinline void float_underflow_error(void)
Datum float8smaller(PG_FUNCTION_ARGS)
float8 degree_c_forty_five
Datum dsqrt(PG_FUNCTION_ARGS)
Datum float84ge(PG_FUNCTION_ARGS)
Datum float8_stddev_samp(PG_FUNCTION_ARGS)
Datum datand(PG_FUNCTION_ARGS)
Datum float8larger(PG_FUNCTION_ARGS)
Datum dcbrt(PG_FUNCTION_ARGS)
Datum float4in(PG_FUNCTION_ARGS)
static int btfloat4fastcmp(Datum x, Datum y, SortSupport ssup)
Datum float8_regr_sxy(PG_FUNCTION_ARGS)
Datum float8_var_pop(PG_FUNCTION_ARGS)
Datum float48div(PG_FUNCTION_ARGS)
Datum float84ne(PG_FUNCTION_ARGS)
Datum float4_accum(PG_FUNCTION_ARGS)
Datum float8up(PG_FUNCTION_ARGS)
int float4_cmp_internal(float4 a, float4 b)
Datum float48le(PG_FUNCTION_ARGS)
Datum float8_regr_sxx(PG_FUNCTION_ARGS)
Datum float8_corr(PG_FUNCTION_ARGS)
Datum float4recv(PG_FUNCTION_ARGS)
Datum in_range_float8_float8(PG_FUNCTION_ARGS)
Datum float48ne(PG_FUNCTION_ARGS)
Datum dpi(PG_FUNCTION_ARGS)
float4 float4in_internal(char *num, char **endptr_p, const char *type_name, const char *orig_string, struct Node *escontext)
Datum dacos(PG_FUNCTION_ARGS)
Datum float48lt(PG_FUNCTION_ARGS)
static void init_degree_constants(void)
Datum dgamma(PG_FUNCTION_ARGS)
Datum float8mul(PG_FUNCTION_ARGS)
Datum float4div(PG_FUNCTION_ARGS)
Datum in_range_float4_float8(PG_FUNCTION_ARGS)
Datum dtand(PG_FUNCTION_ARGS)
Datum float8abs(PG_FUNCTION_ARGS)
Datum i4tod(PG_FUNCTION_ARGS)
int is_infinite(double val)
Datum i2tod(PG_FUNCTION_ARGS)
Datum dfloor(PG_FUNCTION_ARGS)
Datum btfloat8sortsupport(PG_FUNCTION_ARGS)
Datum dcosh(PG_FUNCTION_ARGS)
Datum dacosh(PG_FUNCTION_ARGS)
Datum float4ge(PG_FUNCTION_ARGS)
Datum dasin(PG_FUNCTION_ARGS)
Datum i4tof(PG_FUNCTION_ARGS)
Datum datan(PG_FUNCTION_ARGS)
Datum float8gt(PG_FUNCTION_ARGS)
Datum float8_regr_avgx(PG_FUNCTION_ARGS)
Datum float8um(PG_FUNCTION_ARGS)
Datum float8_regr_avgy(PG_FUNCTION_ARGS)
Datum dcot(PG_FUNCTION_ARGS)
Datum dsin(PG_FUNCTION_ARGS)
Datum dtoi4(PG_FUNCTION_ARGS)
Datum float4pl(PG_FUNCTION_ARGS)
Datum float8_covar_samp(PG_FUNCTION_ARGS)
Datum float8send(PG_FUNCTION_ARGS)
Datum float4larger(PG_FUNCTION_ARGS)
Datum dtoi2(PG_FUNCTION_ARGS)
static float8 * check_float8_array(ArrayType *transarray, const char *caller, int n)
static double cosd_0_to_60(double x)
Datum float48mul(PG_FUNCTION_ARGS)
Datum float4smaller(PG_FUNCTION_ARGS)
Datum float8_regr_accum(PG_FUNCTION_ARGS)
char * float8out_internal(double num)
int float8_cmp_internal(float8 a, float8 b)
Datum float4eq(PG_FUNCTION_ARGS)
static float8 float8_mul(const float8 val1, const float8 val2)
static float4 float4_div(const float4 val1, const float4 val2)
#define RADIANS_PER_DEGREE
static float4 get_float4_infinity(void)
static bool float4_lt(const float4 val1, const float4 val2)
static float8 float8_pl(const float8 val1, const float8 val2)
static float8 float8_mi(const float8 val1, const float8 val2)
static bool float4_ge(const float4 val1, const float4 val2)
static float4 get_float4_nan(void)
static bool float8_ne(const float8 val1, const float8 val2)
static bool float4_ne(const float4 val1, const float4 val2)
static float4 float4_pl(const float4 val1, const float4 val2)
static bool float4_eq(const float4 val1, const float4 val2)
static float4 float4_mul(const float4 val1, const float4 val2)
static float8 get_float8_infinity(void)
static bool float8_ge(const float8 val1, const float8 val2)
static float4 float4_mi(const float4 val1, const float4 val2)
static bool float8_le(const float8 val1, const float8 val2)
static bool float4_gt(const float4 val1, const float4 val2)
static bool float8_eq(const float8 val1, const float8 val2)
static bool float4_le(const float4 val1, const float4 val2)
static float8 get_float8_nan(void)
static float8 float8_div(const float8 val1, const float8 val2)
static bool float8_lt(const float8 val1, const float8 val2)
static bool float8_gt(const float8 val1, const float8 val2)
#define PG_RETURN_BYTEA_P(x)
#define PG_GETARG_FLOAT8(n)
#define PG_RETURN_FLOAT8(x)
#define PG_GETARG_POINTER(n)
#define PG_RETURN_CSTRING(x)
#define PG_GETARG_CSTRING(n)
#define PG_RETURN_INT16(x)
#define PG_RETURN_INT32(x)
#define PG_GETARG_INT32(n)
#define PG_GETARG_BOOL(n)
#define PG_GETARG_FLOAT4(n)
#define PG_RETURN_FLOAT4(x)
#define PG_RETURN_BOOL(x)
#define PG_GETARG_INT16(n)
static bool pg_add_s32_overflow(int32 a, int32 b, int32 *result)
char * pstrdup(const char *in)
int AggCheckCallContext(FunctionCallInfo fcinfo, MemoryContext *aggcontext)
Datum ascii(PG_FUNCTION_ARGS)
int pg_strfromd(char *str, size_t count, int precision, double value)
int pg_strncasecmp(const char *s1, const char *s2, size_t n)
static float4 DatumGetFloat4(Datum X)
#define Float8GetDatumFast(X)
static float8 DatumGetFloat8(Datum X)
struct SortSupportData * SortSupport
StringInfoData * StringInfo
int(* comparator)(Datum x, Datum y, SortSupport ssup)