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);
2850 elog(
ERROR,
"%s: expected %d-element float8 array", caller, n);
2883 N1 = transvalues1[0];
2884 Sx1 = transvalues1[1];
2885 Sxx1 = transvalues1[2];
2887 N2 = transvalues2[0];
2888 Sx2 = transvalues2[1];
2889 Sxx2 = transvalues2[2];
2920 tmp = Sx1 / N1 - Sx2 / N2;
2921 Sxx = Sxx1 + Sxx2 + N1 * N2 * tmp * tmp / N;
2922 if (
unlikely(isinf(Sxx)) && !isinf(Sxx1) && !isinf(Sxx2))
2933 transvalues1[0] = N;
2934 transvalues1[1] = Sx;
2935 transvalues1[2] = Sxx;
2941 Datum transdatums[3];
2967 Sx = transvalues[1];
2968 Sxx = transvalues[2];
2976 if (transvalues[0] > 0.0)
2979 Sxx += tmp * tmp / (N * transvalues[0]);
2987 if (isinf(Sx) || isinf(Sxx))
2989 if (!isinf(transvalues[1]) && !isinf(
newval))
3015 transvalues[1] = Sx;
3016 transvalues[2] = Sxx;
3022 Datum transdatums[3];
3050 Sx = transvalues[1];
3051 Sxx = transvalues[2];
3059 if (transvalues[0] > 0.0)
3062 Sxx += tmp * tmp / (N * transvalues[0]);
3070 if (isinf(Sx) || isinf(Sxx))
3072 if (!isinf(transvalues[1]) && !isinf(
newval))
3098 transvalues[1] = Sx;
3099 transvalues[2] = Sxx;
3105 Datum transdatums[3];
3128 Sx = transvalues[1];
3149 Sxx = transvalues[2];
3171 Sxx = transvalues[2];
3193 Sxx = transvalues[2];
3215 Sxx = transvalues[2];
3266 Sx = transvalues[1];
3267 Sxx = transvalues[2];
3268 Sy = transvalues[3];
3269 Syy = transvalues[4];
3270 Sxy = transvalues[5];
3279 if (transvalues[0] > 0.0)
3281 tmpX = newvalX * N - Sx;
3282 tmpY = newvalY * N - Sy;
3283 scale = 1.0 / (N * transvalues[0]);
3284 Sxx += tmpX * tmpX *
scale;
3285 Syy += tmpY * tmpY *
scale;
3286 Sxy += tmpX * tmpY *
scale;
3294 if (isinf(Sx) || isinf(Sxx) || isinf(Sy) || isinf(Syy) || isinf(Sxy))
3296 if (((isinf(Sx) || isinf(Sxx)) &&
3297 !isinf(transvalues[1]) && !isinf(newvalX)) ||
3298 ((isinf(Sy) || isinf(Syy)) &&
3299 !isinf(transvalues[3]) && !isinf(newvalY)) ||
3301 !isinf(transvalues[1]) && !isinf(newvalX) &&
3302 !isinf(transvalues[3]) && !isinf(newvalY)))
3321 if (isnan(newvalX) || isinf(newvalX))
3323 if (isnan(newvalY) || isinf(newvalY))
3335 transvalues[1] = Sx;
3336 transvalues[2] = Sxx;
3337 transvalues[3] = Sy;
3338 transvalues[4] = Syy;
3339 transvalues[5] = Sxy;
3345 Datum transdatums[6];
3400 N1 = transvalues1[0];
3401 Sx1 = transvalues1[1];
3402 Sxx1 = transvalues1[2];
3403 Sy1 = transvalues1[3];
3404 Syy1 = transvalues1[4];
3405 Sxy1 = transvalues1[5];
3407 N2 = transvalues2[0];
3408 Sx2 = transvalues2[1];
3409 Sxx2 = transvalues2[2];
3410 Sy2 = transvalues2[3];
3411 Syy2 = transvalues2[4];
3412 Sxy2 = transvalues2[5];
3452 tmp1 = Sx1 / N1 - Sx2 / N2;
3453 Sxx = Sxx1 + Sxx2 + N1 * N2 * tmp1 * tmp1 / N;
3454 if (
unlikely(isinf(Sxx)) && !isinf(Sxx1) && !isinf(Sxx2))
3457 tmp2 = Sy1 / N1 - Sy2 / N2;
3458 Syy = Syy1 + Syy2 + N1 * N2 * tmp2 * tmp2 / N;
3459 if (
unlikely(isinf(Syy)) && !isinf(Syy1) && !isinf(Syy2))
3461 Sxy = Sxy1 + Sxy2 + N1 * N2 * tmp1 * tmp2 / N;
3462 if (
unlikely(isinf(Sxy)) && !isinf(Sxy1) && !isinf(Sxy2))
3473 transvalues1[0] = N;
3474 transvalues1[1] = Sx;
3475 transvalues1[2] = Sxx;
3476 transvalues1[3] = Sy;
3477 transvalues1[4] = Syy;
3478 transvalues1[5] = Sxy;
3484 Datum transdatums[6];
3511 Sxx = transvalues[2];
3532 Syy = transvalues[4];
3553 Sxy = transvalues[5];
3574 Sx = transvalues[1];
3593 Sy = transvalues[3];
3612 Sxy = transvalues[5];
3631 Sxy = transvalues[5];
3652 Sxx = transvalues[2];
3653 Syy = transvalues[4];
3654 Sxy = transvalues[5];
3663 if (Sxx == 0 || Syy == 0)
3681 Sxx = transvalues[2];
3682 Syy = transvalues[4];
3683 Sxy = transvalues[5];
3713 Sxx = transvalues[2];
3714 Sxy = transvalues[5];
3742 Sx = transvalues[1];
3743 Sxx = transvalues[2];
3744 Sy = transvalues[3];
3745 Sxy = transvalues[5];
3996 (
errcode(ERRCODE_INVALID_ARGUMENT_FOR_WIDTH_BUCKET_FUNCTION),
3997 errmsg(
"count must be greater than zero")));
3999 if (isnan(operand) || isnan(bound1) || isnan(bound2))
4001 (
errcode(ERRCODE_INVALID_ARGUMENT_FOR_WIDTH_BUCKET_FUNCTION),
4002 errmsg(
"operand, lower bound, and upper bound cannot be NaN")));
4005 if (isinf(bound1) || isinf(bound2))
4007 (
errcode(ERRCODE_INVALID_ARGUMENT_FOR_WIDTH_BUCKET_FUNCTION),
4008 errmsg(
"lower and upper bounds must be finite")));
4010 if (bound1 < bound2)
4012 if (operand < bound1)
4014 else if (operand >= bound2)
4018 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
4019 errmsg(
"integer out of range")));
4023 if (!isinf(bound2 - bound1))
4026 result = count * ((operand - bound1) / (bound2 - bound1));
4039 result = count * ((operand / 2 - bound1 / 2) / (bound2 / 2 - bound1 / 2));
4042 if (result >= count)
4048 else if (bound1 > bound2)
4050 if (operand > bound1)
4052 else if (operand <= bound2)
4056 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
4057 errmsg(
"integer out of range")));
4061 if (!isinf(bound1 - bound2))
4062 result = count * ((bound1 - operand) / (bound1 - bound2));
4064 result = count * ((bound1 / 2 - operand / 2) / (bound1 / 2 - bound2 / 2));
4065 if (result >= count)
4073 (
errcode(ERRCODE_INVALID_ARGUMENT_FOR_WIDTH_BUCKET_FUNCTION),
4074 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 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 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)