28 #include "utils/fmgrprotos.h"
82 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
83 errmsg(
"value out of range: overflow")));
90 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
91 errmsg(
"value out of range: underflow")));
98 (
errcode(ERRCODE_DIVISION_BY_ZERO),
99 errmsg(
"division by zero")));
113 int inf = isinf(
val);
177 const char *type_name,
const char *orig_string,
178 struct Node *escontext)
190 while (*num !=
'\0' && isspace((
unsigned char) *num))
199 (
errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
200 errmsg(
"invalid input syntax for type %s: \"%s\"",
201 type_name, orig_string)));
204 val = strtof(num, &endptr);
207 if (endptr == num || errno != 0)
209 int save_errno = errno;
256 else if (save_errno == ERANGE)
266 #
if !defined(HUGE_VALF)
269 (
val >= HUGE_VALF ||
val <= -HUGE_VALF)
274 char *errnumber =
pstrdup(num);
276 errnumber[endptr - num] =
'\0';
279 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
280 errmsg(
"\"%s\" is out of range for type real",
286 (
errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
287 errmsg(
"invalid input syntax for type %s: \"%s\"",
288 type_name, orig_string)));
292 while (*endptr !=
'\0' && isspace((
unsigned char) *endptr))
298 else if (*endptr !=
'\0')
300 (
errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
301 errmsg(
"invalid input syntax for type %s: \"%s\"",
302 type_name, orig_string)));
389 const char *type_name,
const char *orig_string,
390 struct Node *escontext)
396 while (*num !=
'\0' && isspace((
unsigned char) *num))
405 (
errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
406 errmsg(
"invalid input syntax for type %s: \"%s\"",
407 type_name, orig_string)));
410 val = strtod(num, &endptr);
413 if (endptr == num || errno != 0)
415 int save_errno = errno;
462 else if (save_errno == ERANGE)
475 if (
val == 0.0 ||
val >= HUGE_VAL ||
val <= -HUGE_VAL)
477 char *errnumber =
pstrdup(num);
479 errnumber[endptr - num] =
'\0';
481 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
482 errmsg(
"\"%s\" is out of range for type double precision",
488 (
errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
489 errmsg(
"invalid input syntax for type %s: \"%s\"",
490 type_name, orig_string)));
494 while (*endptr !=
'\0' && isspace((
unsigned char) *endptr))
500 else if (*endptr !=
'\0')
502 (
errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
503 errmsg(
"invalid input syntax for type %s: \"%s\"",
504 type_name, orig_string)));
1033 if (isnan(offset) || offset < 0)
1035 (
errcode(ERRCODE_INVALID_PRECEDING_OR_FOLLOWING_SIZE),
1036 errmsg(
"invalid preceding or following size in window function")));
1050 else if (isnan(base))
1068 if (isinf(offset) && isinf(base) &&
1069 (sub ? base > 0 : base < 0))
1079 sum = base - offset;
1081 sum = base + offset;
1109 if (isnan(offset) || offset < 0)
1111 (
errcode(ERRCODE_INVALID_PRECEDING_OR_FOLLOWING_SIZE),
1112 errmsg(
"invalid preceding or following size in window function")));
1126 else if (isnan(base))
1144 if (isinf(offset) && isinf(base) &&
1145 (sub ? base > 0 : base < 0))
1155 sum = base - offset;
1157 sum = base + offset;
1194 if (
unlikely(isinf(result)) && !isinf(num))
1196 if (
unlikely(result == 0.0f) && num != 0.0)
1221 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
1222 errmsg(
"integer out of range")));
1246 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
1247 errmsg(
"smallint out of range")));
1295 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
1296 errmsg(
"integer out of range")));
1320 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
1321 errmsg(
"smallint out of range")));
1427 result = floor(arg1);
1429 result = -floor(-arg1);
1446 (
errcode(ERRCODE_INVALID_ARGUMENT_FOR_POWER_FUNCTION),
1447 errmsg(
"cannot take square root of a negative number")));
1449 result = sqrt(arg1);
1450 if (
unlikely(isinf(result)) && !isinf(arg1))
1452 if (
unlikely(result == 0.0) && arg1 != 0.0)
1468 result = cbrt(arg1);
1469 if (
unlikely(isinf(result)) && !isinf(arg1))
1471 if (
unlikely(result == 0.0) && arg1 != 0.0)
1496 if (isnan(arg2) || arg2 != 0.0)
1512 if (arg1 == 0 && arg2 < 0)
1514 (
errcode(ERRCODE_INVALID_ARGUMENT_FOR_POWER_FUNCTION),
1515 errmsg(
"zero raised to a negative power is undefined")));
1516 if (arg1 < 0 && floor(arg2) != arg2)
1518 (
errcode(ERRCODE_INVALID_ARGUMENT_FOR_POWER_FUNCTION),
1519 errmsg(
"a negative number raised to a non-integer power yields a complex result")));
1528 float8 absx = fabs(arg1);
1532 else if (arg2 > 0.0)
1547 else if (isinf(arg1))
1551 else if (arg1 > 0.0)
1567 bool yisoddinteger = (floor(halfy) != halfy);
1570 result = yisoddinteger ? arg1 : -arg1;
1572 result = yisoddinteger ? -0.0 : 0.0;
1585 result = pow(arg1, arg2);
1586 if (errno == EDOM || isnan(result))
1603 float8 absx = fabs(arg1);
1607 else if (arg2 >= 0.0 ? (absx > 1.0) : (absx < 1.0))
1613 else if (errno == ERANGE)
1624 if (
unlikely(result == 0.0) && arg1 != 0.0)
1649 else if (isinf(arg1))
1652 result = (arg1 > 0.0) ? arg1 : 0;
1694 (
errcode(ERRCODE_INVALID_ARGUMENT_FOR_LOG),
1695 errmsg(
"cannot take logarithm of zero")));
1698 (
errcode(ERRCODE_INVALID_ARGUMENT_FOR_LOG),
1699 errmsg(
"cannot take logarithm of a negative number")));
1702 if (
unlikely(isinf(result)) && !isinf(arg1))
1704 if (
unlikely(result == 0.0) && arg1 != 1.0)
1727 (
errcode(ERRCODE_INVALID_ARGUMENT_FOR_LOG),
1728 errmsg(
"cannot take logarithm of zero")));
1731 (
errcode(ERRCODE_INVALID_ARGUMENT_FOR_LOG),
1732 errmsg(
"cannot take logarithm of a negative number")));
1734 result = log10(arg1);
1735 if (
unlikely(isinf(result)) && !isinf(arg1))
1737 if (
unlikely(result == 0.0) && arg1 != 1.0)
1762 if (arg1 < -1.0 || arg1 > 1.0)
1764 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
1765 errmsg(
"input is out of range")));
1767 result = acos(arg1);
1793 if (arg1 < -1.0 || arg1 > 1.0)
1795 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
1796 errmsg(
"input is out of range")));
1798 result = asin(arg1);
1824 result = atan(arg1);
1843 if (isnan(arg1) || isnan(arg2))
1850 result = atan2(arg1, arg2);
1888 if (errno != 0 || isinf(arg1))
1890 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
1891 errmsg(
"input is out of range")));
1915 if (errno != 0 || isinf(arg1))
1917 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
1918 errmsg(
"input is out of range")));
1920 result = 1.0 / result;
1943 if (errno != 0 || isinf(arg1))
1945 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
1946 errmsg(
"input is out of range")));
1970 if (errno != 0 || isinf(arg1))
1972 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
1973 errmsg(
"input is out of range")));
2024 #define INIT_DEGREE_CONSTANTS() \
2026 if (!degree_consts_set) \
2027 init_degree_constants(); \
2051 volatile float8 asin_x = asin(
x);
2057 volatile float8 acos_x = acos(
x);
2059 return 90.0 - (acos_x /
acos_0_5) * 60.0;
2084 volatile float8 asin_x = asin(
x);
2086 return 90.0 - (asin_x /
asin_0_5) * 30.0;
2090 volatile float8 acos_x = acos(
x);
2117 if (arg1 < -1.0 || arg1 > 1.0)
2119 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
2120 errmsg(
"input is out of range")));
2154 if (arg1 < -1.0 || arg1 > 1.0)
2156 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
2157 errmsg(
"input is out of range")));
2179 volatile float8 atan_arg1;
2193 atan_arg1 = atan(arg1);
2194 result = (atan_arg1 /
atan_1_0) * 45.0;
2212 volatile float8 atan2_arg1_arg2;
2215 if (isnan(arg1) || isnan(arg2))
2229 atan2_arg1_arg2 = atan2(arg1, arg2);
2230 result = (atan2_arg1_arg2 /
atan_1_0) * 45.0;
2249 return (sin_x /
sin_30) / 2.0;
2326 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
2327 errmsg(
"input is out of range")));
2332 arg1 = fmod(arg1, 360.0);
2343 arg1 = 360.0 - arg1;
2349 arg1 = 180.0 - arg1;
2370 volatile float8 cot_arg1;
2382 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
2383 errmsg(
"input is out of range")));
2388 arg1 = fmod(arg1, 360.0);
2400 arg1 = 360.0 - arg1;
2407 arg1 = 180.0 - arg1;
2447 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
2448 errmsg(
"input is out of range")));
2453 arg1 = fmod(arg1, 360.0);
2465 arg1 = 360.0 - arg1;
2472 arg1 = 180.0 - arg1;
2492 volatile float8 tan_arg1;
2504 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
2505 errmsg(
"input is out of range")));
2510 arg1 = fmod(arg1, 360.0);
2522 arg1 = 360.0 - arg1;
2529 arg1 = 180.0 - arg1;
2597 result = sinh(arg1);
2604 if (errno == ERANGE)
2626 result = cosh(arg1);
2632 if (errno == ERANGE)
2653 result = tanh(arg1);
2673 result = asinh(arg1);
2695 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
2696 errmsg(
"input is out of range")));
2698 result = acosh(arg1);
2717 if (arg1 < -1.0 || arg1 > 1.0)
2719 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
2720 errmsg(
"input is out of range")));
2729 else if (arg1 == 1.0)
2732 result = atanh(arg1);
2773 result = erfc(arg1);
2843 elog(
ERROR,
"%s: expected %d-element float8 array", caller, n);
2876 N1 = transvalues1[0];
2877 Sx1 = transvalues1[1];
2878 Sxx1 = transvalues1[2];
2880 N2 = transvalues2[0];
2881 Sx2 = transvalues2[1];
2882 Sxx2 = transvalues2[2];
2913 tmp = Sx1 / N1 - Sx2 / N2;
2914 Sxx = Sxx1 + Sxx2 + N1 * N2 * tmp * tmp / N;
2915 if (
unlikely(isinf(Sxx)) && !isinf(Sxx1) && !isinf(Sxx2))
2926 transvalues1[0] = N;
2927 transvalues1[1] = Sx;
2928 transvalues1[2] = Sxx;
2934 Datum transdatums[3];
2962 Sx = transvalues[1];
2963 Sxx = transvalues[2];
2971 if (transvalues[0] > 0.0)
2974 Sxx += tmp * tmp / (N * transvalues[0]);
2982 if (isinf(Sx) || isinf(Sxx))
2984 if (!isinf(transvalues[1]) && !isinf(
newval))
3010 transvalues[1] = Sx;
3011 transvalues[2] = Sxx;
3017 Datum transdatums[3];
3047 Sx = transvalues[1];
3048 Sxx = transvalues[2];
3056 if (transvalues[0] > 0.0)
3059 Sxx += tmp * tmp / (N * transvalues[0]);
3067 if (isinf(Sx) || isinf(Sxx))
3069 if (!isinf(transvalues[1]) && !isinf(
newval))
3095 transvalues[1] = Sx;
3096 transvalues[2] = Sxx;
3102 Datum transdatums[3];
3127 Sx = transvalues[1];
3148 Sxx = transvalues[2];
3170 Sxx = transvalues[2];
3192 Sxx = transvalues[2];
3214 Sxx = transvalues[2];
3265 Sx = transvalues[1];
3266 Sxx = transvalues[2];
3267 Sy = transvalues[3];
3268 Syy = transvalues[4];
3269 Sxy = transvalues[5];
3278 if (transvalues[0] > 0.0)
3280 tmpX = newvalX * N - Sx;
3281 tmpY = newvalY * N - Sy;
3282 scale = 1.0 / (N * transvalues[0]);
3283 Sxx += tmpX * tmpX *
scale;
3284 Syy += tmpY * tmpY *
scale;
3285 Sxy += tmpX * tmpY *
scale;
3293 if (isinf(Sx) || isinf(Sxx) || isinf(Sy) || isinf(Syy) || isinf(Sxy))
3295 if (((isinf(Sx) || isinf(Sxx)) &&
3296 !isinf(transvalues[1]) && !isinf(newvalX)) ||
3297 ((isinf(Sy) || isinf(Syy)) &&
3298 !isinf(transvalues[3]) && !isinf(newvalY)) ||
3300 !isinf(transvalues[1]) && !isinf(newvalX) &&
3301 !isinf(transvalues[3]) && !isinf(newvalY)))
3320 if (isnan(newvalX) || isinf(newvalX))
3322 if (isnan(newvalY) || isinf(newvalY))
3334 transvalues[1] = Sx;
3335 transvalues[2] = Sxx;
3336 transvalues[3] = Sy;
3337 transvalues[4] = Syy;
3338 transvalues[5] = Sxy;
3344 Datum transdatums[6];
3401 N1 = transvalues1[0];
3402 Sx1 = transvalues1[1];
3403 Sxx1 = transvalues1[2];
3404 Sy1 = transvalues1[3];
3405 Syy1 = transvalues1[4];
3406 Sxy1 = transvalues1[5];
3408 N2 = transvalues2[0];
3409 Sx2 = transvalues2[1];
3410 Sxx2 = transvalues2[2];
3411 Sy2 = transvalues2[3];
3412 Syy2 = transvalues2[4];
3413 Sxy2 = transvalues2[5];
3453 tmp1 = Sx1 / N1 - Sx2 / N2;
3454 Sxx = Sxx1 + Sxx2 + N1 * N2 * tmp1 * tmp1 / N;
3455 if (
unlikely(isinf(Sxx)) && !isinf(Sxx1) && !isinf(Sxx2))
3458 tmp2 = Sy1 / N1 - Sy2 / N2;
3459 Syy = Syy1 + Syy2 + N1 * N2 * tmp2 * tmp2 / N;
3460 if (
unlikely(isinf(Syy)) && !isinf(Syy1) && !isinf(Syy2))
3462 Sxy = Sxy1 + Sxy2 + N1 * N2 * tmp1 * tmp2 / N;
3463 if (
unlikely(isinf(Sxy)) && !isinf(Sxy1) && !isinf(Sxy2))
3474 transvalues1[0] = N;
3475 transvalues1[1] = Sx;
3476 transvalues1[2] = Sxx;
3477 transvalues1[3] = Sy;
3478 transvalues1[4] = Syy;
3479 transvalues1[5] = Sxy;
3485 Datum transdatums[6];
3514 Sxx = transvalues[2];
3535 Syy = transvalues[4];
3556 Sxy = transvalues[5];
3577 Sx = transvalues[1];
3596 Sy = transvalues[3];
3615 Sxy = transvalues[5];
3634 Sxy = transvalues[5];
3655 Sxx = transvalues[2];
3656 Syy = transvalues[4];
3657 Sxy = transvalues[5];
3666 if (Sxx == 0 || Syy == 0)
3684 Sxx = transvalues[2];
3685 Syy = transvalues[4];
3686 Sxy = transvalues[5];
3716 Sxx = transvalues[2];
3717 Sxy = transvalues[5];
3745 Sx = transvalues[1];
3746 Sxx = transvalues[2];
3747 Sy = transvalues[3];
3748 Sxy = transvalues[5];
3999 (
errcode(ERRCODE_INVALID_ARGUMENT_FOR_WIDTH_BUCKET_FUNCTION),
4000 errmsg(
"count must be greater than zero")));
4002 if (isnan(operand) || isnan(bound1) || isnan(bound2))
4004 (
errcode(ERRCODE_INVALID_ARGUMENT_FOR_WIDTH_BUCKET_FUNCTION),
4005 errmsg(
"operand, lower bound, and upper bound cannot be NaN")));
4008 if (isinf(bound1) || isinf(bound2))
4010 (
errcode(ERRCODE_INVALID_ARGUMENT_FOR_WIDTH_BUCKET_FUNCTION),
4011 errmsg(
"lower and upper bounds must be finite")));
4013 if (bound1 < bound2)
4015 if (operand < bound1)
4017 else if (operand >= bound2)
4021 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
4022 errmsg(
"integer out of range")));
4026 if (!isinf(bound2 - bound1))
4029 result = count * ((operand - bound1) / (bound2 - bound1));
4042 result = count * ((operand / 2 - bound1 / 2) / (bound2 / 2 - bound1 / 2));
4045 if (result >= count)
4051 else if (bound1 > bound2)
4053 if (operand > bound1)
4055 else if (operand <= bound2)
4059 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
4060 errmsg(
"integer out of range")));
4064 if (!isinf(bound1 - bound2))
4065 result = count * ((bound1 - operand) / (bound1 - bound2));
4067 result = count * ((bound1 / 2 - operand / 2) / (bound1 / 2 - bound2 / 2));
4068 if (result >= count)
4076 (
errcode(ERRCODE_INVALID_ARGUMENT_FOR_WIDTH_BUCKET_FUNCTION),
4077 errmsg(
"lower bound cannot equal upper bound")));
#define PG_GETARG_ARRAYTYPE_P(n)
#define PG_RETURN_ARRAYTYPE_P(x)
ArrayType * construct_array(Datum *elems, int nelems, Oid elmtype, int elmlen, bool elmbyval, char elmalign)
#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)
static float8 * check_float8_array(ArrayType *transarray, const char *caller, int n)
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)
char * float8out_internal(double num)
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 double cosd_0_to_60(double x)
Datum float48mul(PG_FUNCTION_ARGS)
Datum float4smaller(PG_FUNCTION_ARGS)
Datum float8_regr_accum(PG_FUNCTION_ARGS)
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)