|
PostgreSQL Source Code git master
|
#include "postgres.h"#include <ctype.h>#include <float.h>#include <math.h>#include <limits.h>#include "catalog/pg_type.h"#include "common/int.h"#include "common/shortest_dec.h"#include "libpq/pqformat.h"#include "utils/array.h"#include "utils/fmgrprotos.h"#include "utils/sortsupport.h"
Go to the source code of this file.
Macros | |
| #define | INIT_DEGREE_CONSTANTS() |
Variables | |
| int | extra_float_digits = 1 |
| static bool | degree_consts_set = false |
| static float8 | sin_30 = 0 |
| static float8 | one_minus_cos_60 = 0 |
| static float8 | asin_0_5 = 0 |
| static float8 | acos_0_5 = 0 |
| static float8 | atan_1_0 = 0 |
| static float8 | tan_45 = 0 |
| static float8 | cot_45 = 0 |
| float8 | degree_c_thirty = 30.0 |
| float8 | degree_c_forty_five = 45.0 |
| float8 | degree_c_sixty = 60.0 |
| float8 | degree_c_one_half = 0.5 |
| float8 | degree_c_one = 1.0 |
Definition at line 2122 of file float.c.
References acos_0_5, asin_0_5, fb(), and x.
Referenced by dacosd().
Definition at line 2089 of file float.c.
| Datum btfloat48cmp | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1042 of file float.c.
References fb(), float8_cmp_internal(), PG_GETARG_FLOAT4, PG_GETARG_FLOAT8, and PG_RETURN_INT32.
| Datum btfloat4cmp | ( | PG_FUNCTION_ARGS | ) |
Definition at line 921 of file float.c.
References fb(), float4_cmp_internal(), PG_GETARG_FLOAT4, and PG_RETURN_INT32.
|
static |
Definition at line 930 of file float.c.
References DatumGetFloat4(), fb(), float4_cmp_internal(), x, and y.
Referenced by btfloat4sortsupport().
| Datum btfloat4sortsupport | ( | PG_FUNCTION_ARGS | ) |
Definition at line 939 of file float.c.
References btfloat4fastcmp(), SortSupportData::comparator, PG_GETARG_POINTER, and PG_RETURN_VOID.
| Datum btfloat84cmp | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1052 of file float.c.
References fb(), float8_cmp_internal(), PG_GETARG_FLOAT4, PG_GETARG_FLOAT8, and PG_RETURN_INT32.
| Datum btfloat8cmp | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1015 of file float.c.
References fb(), float8_cmp_internal(), PG_GETARG_FLOAT8, and PG_RETURN_INT32.
|
static |
Definition at line 1024 of file float.c.
References DatumGetFloat8(), fb(), float8_cmp_internal(), x, and y.
Referenced by btfloat8sortsupport().
| Datum btfloat8sortsupport | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1033 of file float.c.
References btfloat8fastcmp(), SortSupportData::comparator, PG_GETARG_POINTER, and PG_RETURN_VOID.
Definition at line 2974 of file float.c.
References ARR_DATA_PTR, ARR_DIMS, ARR_ELEMTYPE, ARR_HASNULL, ARR_NDIM, elog, ERROR, and fb().
Referenced by float4_accum(), float8_accum(), float8_avg(), float8_combine(), float8_corr(), float8_covar_pop(), float8_covar_samp(), float8_regr_accum(), float8_regr_avgx(), float8_regr_avgy(), float8_regr_combine(), float8_regr_intercept(), float8_regr_r2(), float8_regr_slope(), float8_regr_sxx(), float8_regr_sxy(), float8_regr_syy(), float8_stddev_pop(), float8_stddev_samp(), float8_var_pop(), and float8_var_samp().
Definition at line 2307 of file float.c.
References fb(), one_minus_cos_60, RADIANS_PER_DEGREE, and x.
Definition at line 2340 of file float.c.
References cosd_0_to_60(), sind_0_to_30(), and x.
Referenced by dcosd(), dcotd(), dtand(), and init_degree_constants().
| Datum dacos | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1796 of file float.c.
References ereport, errcode(), errmsg, ERROR, fb(), float_overflow_error(), get_float8_nan(), PG_GETARG_FLOAT8, PG_RETURN_FLOAT8, result, and unlikely.
| Datum dacosd | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2149 of file float.c.
References acosd_q1(), asind_q1(), ereport, errcode(), errmsg, ERROR, fb(), float_overflow_error(), get_float8_nan(), INIT_DEGREE_CONSTANTS, PG_GETARG_FLOAT8, PG_RETURN_FLOAT8, result, and unlikely.
| Datum dacosh | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2730 of file float.c.
References ereport, errcode(), errmsg, ERROR, fb(), PG_GETARG_FLOAT8, PG_RETURN_FLOAT8, and result.
| Datum dasin | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1827 of file float.c.
References ereport, errcode(), errmsg, ERROR, fb(), float_overflow_error(), get_float8_nan(), PG_GETARG_FLOAT8, PG_RETURN_FLOAT8, result, and unlikely.
| Datum dasind | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2186 of file float.c.
References asind_q1(), ereport, errcode(), errmsg, ERROR, fb(), float_overflow_error(), get_float8_nan(), INIT_DEGREE_CONSTANTS, PG_GETARG_FLOAT8, PG_RETURN_FLOAT8, result, and unlikely.
| Datum dasinh | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2713 of file float.c.
References fb(), PG_GETARG_FLOAT8, PG_RETURN_FLOAT8, and result.
| Datum datan | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1858 of file float.c.
References fb(), float_overflow_error(), get_float8_nan(), PG_GETARG_FLOAT8, PG_RETURN_FLOAT8, result, and unlikely.
| Datum datan2 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1884 of file float.c.
References fb(), float_overflow_error(), get_float8_nan(), PG_GETARG_FLOAT8, PG_RETURN_FLOAT8, result, and unlikely.
| Datum datan2d | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2255 of file float.c.
References atan_1_0, fb(), float_overflow_error(), get_float8_nan(), INIT_DEGREE_CONSTANTS, PG_GETARG_FLOAT8, PG_RETURN_FLOAT8, result, and unlikely.
| Datum datand | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2223 of file float.c.
References atan_1_0, fb(), float_overflow_error(), get_float8_nan(), INIT_DEGREE_CONSTANTS, PG_GETARG_FLOAT8, PG_RETURN_FLOAT8, result, and unlikely.
| Datum datanh | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2755 of file float.c.
References ereport, errcode(), errmsg, ERROR, fb(), get_float8_infinity(), PG_GETARG_FLOAT8, PG_RETURN_FLOAT8, and result.
| Datum dcbrt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1511 of file float.c.
References fb(), float_overflow_error(), float_underflow_error(), PG_GETARG_FLOAT8, PG_RETURN_FLOAT8, result, and unlikely.
| Datum dceil | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1421 of file float.c.
References fb(), PG_GETARG_FLOAT8, and PG_RETURN_FLOAT8.
| Datum dcos | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1910 of file float.c.
References ereport, errcode(), errmsg, ERROR, fb(), float_overflow_error(), get_float8_nan(), PG_GETARG_FLOAT8, PG_RETURN_FLOAT8, result, and unlikely.
| Datum dcosd | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2359 of file float.c.
References cosd_q1(), ereport, errcode(), errmsg, ERROR, fb(), float_overflow_error(), get_float8_nan(), INIT_DEGREE_CONSTANTS, PG_GETARG_FLOAT8, PG_RETURN_FLOAT8, result, sign, and unlikely.
| Datum dcosh | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2668 of file float.c.
References fb(), float_underflow_error(), get_float8_infinity(), PG_GETARG_FLOAT8, PG_RETURN_FLOAT8, result, and unlikely.
| Datum dcot | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1951 of file float.c.
References ereport, errcode(), errmsg, ERROR, fb(), get_float8_nan(), PG_GETARG_FLOAT8, PG_RETURN_FLOAT8, and result.
| Datum dcotd | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2414 of file float.c.
References cosd_q1(), cot_45, ereport, errcode(), errmsg, ERROR, fb(), get_float8_nan(), INIT_DEGREE_CONSTANTS, PG_GETARG_FLOAT8, PG_RETURN_FLOAT8, result, sign, and sind_q1().
| Datum degrees | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2602 of file float.c.
References fb(), float8_div(), PG_GETARG_FLOAT8, PG_RETURN_FLOAT8, and RADIANS_PER_DEGREE.
Referenced by degtorad().
| Datum derf | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2793 of file float.c.
References fb(), float_overflow_error(), PG_GETARG_FLOAT8, PG_RETURN_FLOAT8, result, and unlikely.
| Datum derfc | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2813 of file float.c.
References fb(), float_overflow_error(), PG_GETARG_FLOAT8, PG_RETURN_FLOAT8, result, and unlikely.
| Datum dexp | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1685 of file float.c.
References fb(), float_overflow_error(), float_underflow_error(), PG_GETARG_FLOAT8, PG_RETURN_FLOAT8, result, and unlikely.
| Datum dfloor | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1433 of file float.c.
References fb(), PG_GETARG_FLOAT8, and PG_RETURN_FLOAT8.
| Datum dgamma | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2837 of file float.c.
References fb(), float_overflow_error(), float_underflow_error(), get_float8_nan(), PG_GETARG_FLOAT8, PG_RETURN_FLOAT8, and result.
| Datum dlgamma | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2891 of file float.c.
References fb(), float_overflow_error(), PG_GETARG_FLOAT8, PG_RETURN_FLOAT8, and result.
| Datum dlog1 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1731 of file float.c.
References ereport, errcode(), errmsg, ERROR, fb(), float_overflow_error(), float_underflow_error(), PG_GETARG_FLOAT8, PG_RETURN_FLOAT8, result, and unlikely.
| Datum dlog10 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1763 of file float.c.
References ereport, errcode(), errmsg, ERROR, fb(), float_overflow_error(), float_underflow_error(), PG_GETARG_FLOAT8, PG_RETURN_FLOAT8, result, and unlikely.
| Datum dpi | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2614 of file float.c.
References M_PI, and PG_RETURN_FLOAT8.
| Datum dpow | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1530 of file float.c.
References ereport, errcode(), errmsg, ERROR, fb(), float_overflow_error(), float_underflow_error(), get_float8_nan(), PG_GETARG_FLOAT8, PG_RETURN_FLOAT8, result, and unlikely.
| Datum dround | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1409 of file float.c.
References fb(), PG_GETARG_FLOAT8, and PG_RETURN_FLOAT8.
| Datum dsign | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1446 of file float.c.
References fb(), PG_GETARG_FLOAT8, PG_RETURN_FLOAT8, and result.
| Datum dsin | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1979 of file float.c.
References ereport, errcode(), errmsg, ERROR, fb(), float_overflow_error(), get_float8_nan(), PG_GETARG_FLOAT8, PG_RETURN_FLOAT8, result, and unlikely.
| Datum dsind | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2480 of file float.c.
References ereport, errcode(), errmsg, ERROR, fb(), float_overflow_error(), get_float8_nan(), INIT_DEGREE_CONSTANTS, PG_GETARG_FLOAT8, PG_RETURN_FLOAT8, result, sign, sind_q1(), and unlikely.
| Datum dsinh | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2639 of file float.c.
References fb(), get_float8_infinity(), PG_GETARG_FLOAT8, PG_RETURN_FLOAT8, and result.
| Datum dsqrt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1487 of file float.c.
References ereport, errcode(), errmsg, ERROR, fb(), float_overflow_error(), float_underflow_error(), PG_GETARG_FLOAT8, PG_RETURN_FLOAT8, result, and unlikely.
| Datum dtan | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2006 of file float.c.
References ereport, errcode(), errmsg, ERROR, fb(), get_float8_nan(), PG_GETARG_FLOAT8, PG_RETURN_FLOAT8, and result.
| Datum dtand | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2536 of file float.c.
References cosd_q1(), ereport, errcode(), errmsg, ERROR, fb(), get_float8_nan(), INIT_DEGREE_CONSTANTS, PG_GETARG_FLOAT8, PG_RETURN_FLOAT8, result, sign, sind_q1(), and tan_45.
| Datum dtanh | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2693 of file float.c.
References fb(), float_overflow_error(), PG_GETARG_FLOAT8, PG_RETURN_FLOAT8, result, and unlikely.
| Datum dtof | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1236 of file float.c.
References fb(), float_overflow_error_ext(), float_underflow_error_ext(), PG_GETARG_FLOAT8, PG_RETURN_FLOAT4, result, and unlikely.
| Datum dtoi2 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1280 of file float.c.
References ereturn, errcode(), errmsg, fb(), FLOAT8_FITS_IN_INT16, PG_GETARG_FLOAT8, PG_RETURN_INT16, and unlikely.
| Datum dtoi4 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1255 of file float.c.
References ereturn, errcode(), errmsg, fb(), FLOAT8_FITS_IN_INT32, PG_GETARG_FLOAT8, PG_RETURN_INT32, and unlikely.
| Datum dtrunc | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1469 of file float.c.
References fb(), PG_GETARG_FLOAT8, PG_RETURN_FLOAT8, and result.
| Datum float48div | ( | PG_FUNCTION_ARGS | ) |
Definition at line 4043 of file float.c.
References fb(), float8_div(), PG_GETARG_FLOAT4, PG_GETARG_FLOAT8, and PG_RETURN_FLOAT8.
| Datum float48eq | ( | PG_FUNCTION_ARGS | ) |
Definition at line 4103 of file float.c.
References fb(), float8_eq(), PG_GETARG_FLOAT4, PG_GETARG_FLOAT8, and PG_RETURN_BOOL.
| Datum float48ge | ( | PG_FUNCTION_ARGS | ) |
Definition at line 4148 of file float.c.
References fb(), float8_ge(), PG_GETARG_FLOAT4, PG_GETARG_FLOAT8, and PG_RETURN_BOOL.
| Datum float48gt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 4139 of file float.c.
References fb(), float8_gt(), PG_GETARG_FLOAT4, PG_GETARG_FLOAT8, and PG_RETURN_BOOL.
| Datum float48le | ( | PG_FUNCTION_ARGS | ) |
Definition at line 4130 of file float.c.
References fb(), float8_le(), PG_GETARG_FLOAT4, PG_GETARG_FLOAT8, and PG_RETURN_BOOL.
| Datum float48lt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 4121 of file float.c.
References fb(), float8_lt(), PG_GETARG_FLOAT4, PG_GETARG_FLOAT8, and PG_RETURN_BOOL.
| Datum float48mi | ( | PG_FUNCTION_ARGS | ) |
Definition at line 4025 of file float.c.
References fb(), float8_mi(), PG_GETARG_FLOAT4, PG_GETARG_FLOAT8, and PG_RETURN_FLOAT8.
| Datum float48mul | ( | PG_FUNCTION_ARGS | ) |
Definition at line 4034 of file float.c.
References fb(), float8_mul(), PG_GETARG_FLOAT4, PG_GETARG_FLOAT8, and PG_RETURN_FLOAT8.
| Datum float48ne | ( | PG_FUNCTION_ARGS | ) |
Definition at line 4112 of file float.c.
References fb(), float8_ne(), PG_GETARG_FLOAT4, PG_GETARG_FLOAT8, and PG_RETURN_BOOL.
| Datum float48pl | ( | PG_FUNCTION_ARGS | ) |
Definition at line 4016 of file float.c.
References fb(), float8_pl(), PG_GETARG_FLOAT4, PG_GETARG_FLOAT8, and PG_RETURN_FLOAT8.
| Datum float4_accum | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3171 of file float.c.
References AggCheckCallContext(), check_float8_array(), construct_array_builtin(), fb(), Float8GetDatumFast, float_overflow_error(), get_float8_nan(), newval, PG_GETARG_ARRAYTYPE_P, PG_GETARG_FLOAT4, PG_RETURN_ARRAYTYPE_P, and result.
Definition at line 857 of file float.c.
References a, b, float4_gt(), and float4_lt().
Referenced by btfloat4cmp(), btfloat4fastcmp(), and gbt_float4_ssup_cmp().
| Datum float4abs | ( | PG_FUNCTION_ARGS | ) |
Definition at line 632 of file float.c.
References fb(), PG_GETARG_FLOAT4, and PG_RETURN_FLOAT4.
| Datum float4div | ( | PG_FUNCTION_ARGS | ) |
Definition at line 796 of file float.c.
References fb(), float4_div(), PG_GETARG_FLOAT4, and PG_RETURN_FLOAT4.
| Datum float4eq | ( | PG_FUNCTION_ARGS | ) |
Definition at line 867 of file float.c.
References fb(), float4_eq(), PG_GETARG_FLOAT4, and PG_RETURN_BOOL.
| Datum float4ge | ( | PG_FUNCTION_ARGS | ) |
Definition at line 912 of file float.c.
References fb(), float4_ge(), PG_GETARG_FLOAT4, and PG_RETURN_BOOL.
| Datum float4gt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 903 of file float.c.
References fb(), float4_gt(), PG_GETARG_FLOAT4, and PG_RETURN_BOOL.
| Datum float4in | ( | PG_FUNCTION_ARGS | ) |
Definition at line 205 of file float.c.
References fb(), float4in_internal(), PG_GETARG_CSTRING, and PG_RETURN_FLOAT4.
Referenced by import_pg_statistic(), and numeric_float4().
| float4 float4in_internal | ( | char * | num, |
| char ** | endptr_p, | ||
| const char * | type_name, | ||
| const char * | orig_string, | ||
| struct Node * | escontext | ||
| ) |
Definition at line 224 of file float.c.
References ereturn, errcode(), errmsg, fb(), get_float4_infinity(), get_float4_nan(), pg_strncasecmp(), pstrdup(), and val.
Referenced by float4in().
| Datum float4larger | ( | PG_FUNCTION_ARGS | ) |
Definition at line 661 of file float.c.
References fb(), float4_gt(), PG_GETARG_FLOAT4, PG_RETURN_FLOAT4, and result.
| Datum float4le | ( | PG_FUNCTION_ARGS | ) |
Definition at line 894 of file float.c.
References fb(), float4_le(), PG_GETARG_FLOAT4, and PG_RETURN_BOOL.
| Datum float4lt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 885 of file float.c.
References fb(), float4_lt(), PG_GETARG_FLOAT4, and PG_RETURN_BOOL.
| Datum float4mi | ( | PG_FUNCTION_ARGS | ) |
Definition at line 778 of file float.c.
References fb(), float4_mi(), PG_GETARG_FLOAT4, and PG_RETURN_FLOAT4.
| Datum float4mul | ( | PG_FUNCTION_ARGS | ) |
Definition at line 787 of file float.c.
References fb(), float4_mul(), PG_GETARG_FLOAT4, and PG_RETURN_FLOAT4.
| Datum float4ne | ( | PG_FUNCTION_ARGS | ) |
Definition at line 876 of file float.c.
References fb(), float4_ne(), PG_GETARG_FLOAT4, and PG_RETURN_BOOL.
| Datum float4out | ( | PG_FUNCTION_ARGS | ) |
Definition at line 360 of file float.c.
References ascii(), extra_float_digits, fb(), float_to_shortest_decimal_buf(), palloc(), PG_GETARG_FLOAT4, PG_RETURN_CSTRING, and pg_strfromd().
| Datum float4pl | ( | PG_FUNCTION_ARGS | ) |
Definition at line 769 of file float.c.
References fb(), float4_pl(), PG_GETARG_FLOAT4, and PG_RETURN_FLOAT4.
| Datum float4recv | ( | PG_FUNCTION_ARGS | ) |
Definition at line 380 of file float.c.
References buf, PG_GETARG_POINTER, PG_RETURN_FLOAT4, and pq_getmsgfloat4().
| Datum float4send | ( | PG_FUNCTION_ARGS | ) |
Definition at line 391 of file float.c.
References buf, PG_GETARG_FLOAT4, PG_RETURN_BYTEA_P, pq_begintypsend(), pq_endtypsend(), and pq_sendfloat4().
| Datum float4smaller | ( | PG_FUNCTION_ARGS | ) |
Definition at line 675 of file float.c.
References fb(), float4_lt(), PG_GETARG_FLOAT4, PG_RETURN_FLOAT4, and result.
| Datum float4um | ( | PG_FUNCTION_ARGS | ) |
Definition at line 643 of file float.c.
References fb(), PG_GETARG_FLOAT4, PG_RETURN_FLOAT4, and result.
| Datum float4up | ( | PG_FUNCTION_ARGS | ) |
Definition at line 653 of file float.c.
References arg, PG_GETARG_FLOAT4, and PG_RETURN_FLOAT4.
| Datum float84div | ( | PG_FUNCTION_ARGS | ) |
Definition at line 4085 of file float.c.
References fb(), float8_div(), PG_GETARG_FLOAT4, PG_GETARG_FLOAT8, and PG_RETURN_FLOAT8.
| Datum float84eq | ( | PG_FUNCTION_ARGS | ) |
Definition at line 4160 of file float.c.
References fb(), float8_eq(), PG_GETARG_FLOAT4, PG_GETARG_FLOAT8, and PG_RETURN_BOOL.
| Datum float84ge | ( | PG_FUNCTION_ARGS | ) |
Definition at line 4205 of file float.c.
References fb(), float8_ge(), PG_GETARG_FLOAT4, PG_GETARG_FLOAT8, and PG_RETURN_BOOL.
| Datum float84gt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 4196 of file float.c.
References fb(), float8_gt(), PG_GETARG_FLOAT4, PG_GETARG_FLOAT8, and PG_RETURN_BOOL.
| Datum float84le | ( | PG_FUNCTION_ARGS | ) |
Definition at line 4187 of file float.c.
References fb(), float8_le(), PG_GETARG_FLOAT4, PG_GETARG_FLOAT8, and PG_RETURN_BOOL.
| Datum float84lt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 4178 of file float.c.
References fb(), float8_lt(), PG_GETARG_FLOAT4, PG_GETARG_FLOAT8, and PG_RETURN_BOOL.
| Datum float84mi | ( | PG_FUNCTION_ARGS | ) |
Definition at line 4067 of file float.c.
References fb(), float8_mi(), PG_GETARG_FLOAT4, PG_GETARG_FLOAT8, and PG_RETURN_FLOAT8.
| Datum float84mul | ( | PG_FUNCTION_ARGS | ) |
Definition at line 4076 of file float.c.
References fb(), float8_mul(), PG_GETARG_FLOAT4, PG_GETARG_FLOAT8, and PG_RETURN_FLOAT8.
| Datum float84ne | ( | PG_FUNCTION_ARGS | ) |
Definition at line 4169 of file float.c.
References fb(), float8_ne(), PG_GETARG_FLOAT4, PG_GETARG_FLOAT8, and PG_RETURN_BOOL.
| Datum float84pl | ( | PG_FUNCTION_ARGS | ) |
Definition at line 4058 of file float.c.
References fb(), float8_pl(), PG_GETARG_FLOAT4, PG_GETARG_FLOAT8, and PG_RETURN_FLOAT8.
| Datum float8_accum | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3090 of file float.c.
References AggCheckCallContext(), check_float8_array(), construct_array_builtin(), fb(), Float8GetDatumFast, float_overflow_error(), get_float8_nan(), newval, PG_GETARG_ARRAYTYPE_P, PG_GETARG_FLOAT8, PG_RETURN_ARRAYTYPE_P, and result.
| Datum float8_avg | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3254 of file float.c.
References check_float8_array(), fb(), PG_GETARG_ARRAYTYPE_P, PG_RETURN_FLOAT8, and PG_RETURN_NULL.
Definition at line 951 of file float.c.
References a, b, float8_gt(), and float8_lt().
Referenced by btfloat48cmp(), btfloat84cmp(), btfloat8cmp(), btfloat8fastcmp(), common_entry_cmp(), gbt_float8_ssup_cmp(), interval_cmp_lower(), interval_cmp_upper(), and pairingheap_GISTSearchItem_cmp().
| Datum float8_combine | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2998 of file float.c.
References AggCheckCallContext(), check_float8_array(), construct_array_builtin(), fb(), float8_pl(), Float8GetDatumFast, float_overflow_error(), PG_GETARG_ARRAYTYPE_P, PG_RETURN_ARRAYTYPE_P, result, and unlikely.
| Datum float8_corr | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3858 of file float.c.
References check_float8_array(), fb(), PG_GETARG_ARRAYTYPE_P, PG_RETURN_FLOAT8, PG_RETURN_NULL, and result.
| Datum float8_covar_pop | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3820 of file float.c.
References check_float8_array(), fb(), PG_GETARG_ARRAYTYPE_P, PG_RETURN_FLOAT8, and PG_RETURN_NULL.
| Datum float8_covar_samp | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3839 of file float.c.
References check_float8_array(), fb(), PG_GETARG_ARRAYTYPE_P, PG_RETURN_FLOAT8, and PG_RETURN_NULL.
| Datum float8_regr_accum | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3395 of file float.c.
References AggCheckCallContext(), check_float8_array(), construct_array_builtin(), fb(), Float8GetDatumFast, float_overflow_error(), get_float8_nan(), PG_GETARG_ARRAYTYPE_P, PG_GETARG_FLOAT8, PG_RETURN_ARRAYTYPE_P, result, and scale.
| Datum float8_regr_avgx | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3770 of file float.c.
References check_float8_array(), fb(), PG_GETARG_ARRAYTYPE_P, PG_RETURN_FLOAT8, and PG_RETURN_NULL.
| Datum float8_regr_avgy | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3795 of file float.c.
References check_float8_array(), fb(), PG_GETARG_ARRAYTYPE_P, PG_RETURN_FLOAT8, and PG_RETURN_NULL.
| Datum float8_regr_combine | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3549 of file float.c.
References AggCheckCallContext(), check_float8_array(), construct_array_builtin(), fb(), float8_eq(), float8_pl(), Float8GetDatumFast, float_overflow_error(), get_float8_nan(), PG_GETARG_ARRAYTYPE_P, PG_RETURN_ARRAYTYPE_P, result, and unlikely.
| Datum float8_regr_intercept | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3972 of file float.c.
References check_float8_array(), fb(), PG_GETARG_ARRAYTYPE_P, PG_RETURN_FLOAT8, and PG_RETURN_NULL.
| Datum float8_regr_r2 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3912 of file float.c.
References check_float8_array(), fb(), PG_GETARG_ARRAYTYPE_P, PG_RETURN_FLOAT8, and PG_RETURN_NULL.
| Datum float8_regr_slope | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3945 of file float.c.
References check_float8_array(), fb(), PG_GETARG_ARRAYTYPE_P, PG_RETURN_FLOAT8, and PG_RETURN_NULL.
| Datum float8_regr_sxx | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3707 of file float.c.
References check_float8_array(), fb(), PG_GETARG_ARRAYTYPE_P, PG_RETURN_FLOAT8, and PG_RETURN_NULL.
| Datum float8_regr_sxy | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3749 of file float.c.
References check_float8_array(), fb(), PG_GETARG_ARRAYTYPE_P, PG_RETURN_FLOAT8, and PG_RETURN_NULL.
| Datum float8_regr_syy | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3728 of file float.c.
References check_float8_array(), fb(), PG_GETARG_ARRAYTYPE_P, PG_RETURN_FLOAT8, and PG_RETURN_NULL.
| Datum float8_stddev_pop | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3318 of file float.c.
References check_float8_array(), fb(), PG_GETARG_ARRAYTYPE_P, PG_RETURN_FLOAT8, and PG_RETURN_NULL.
| Datum float8_stddev_samp | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3340 of file float.c.
References check_float8_array(), fb(), PG_GETARG_ARRAYTYPE_P, PG_RETURN_FLOAT8, and PG_RETURN_NULL.
| Datum float8_var_pop | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3274 of file float.c.
References check_float8_array(), fb(), PG_GETARG_ARRAYTYPE_P, PG_RETURN_FLOAT8, and PG_RETURN_NULL.
| Datum float8_var_samp | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3296 of file float.c.
References check_float8_array(), fb(), PG_GETARG_ARRAYTYPE_P, PG_RETURN_FLOAT8, and PG_RETURN_NULL.
| Datum float8abs | ( | PG_FUNCTION_ARGS | ) |
Definition at line 698 of file float.c.
References fb(), PG_GETARG_FLOAT8, and PG_RETURN_FLOAT8.
| Datum float8div | ( | PG_FUNCTION_ARGS | ) |
Definition at line 838 of file float.c.
References fb(), float8_div(), PG_GETARG_FLOAT8, and PG_RETURN_FLOAT8.
| Datum float8eq | ( | PG_FUNCTION_ARGS | ) |
Definition at line 961 of file float.c.
References fb(), float8_eq(), PG_GETARG_FLOAT8, and PG_RETURN_BOOL.
| Datum float8ge | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1006 of file float.c.
References fb(), float8_ge(), PG_GETARG_FLOAT8, and PG_RETURN_BOOL.
| Datum float8gt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 997 of file float.c.
References fb(), float8_gt(), PG_GETARG_FLOAT8, and PG_RETURN_BOOL.
| Datum float8in | ( | PG_FUNCTION_ARGS | ) |
Definition at line 405 of file float.c.
References fb(), float8in_internal(), PG_GETARG_CSTRING, and PG_RETURN_FLOAT8.
Referenced by numeric_float8().
| float8 float8in_internal | ( | char * | num, |
| char ** | endptr_p, | ||
| const char * | type_name, | ||
| const char * | orig_string, | ||
| struct Node * | escontext | ||
| ) |
Definition at line 436 of file float.c.
References ereturn, errcode(), errmsg, fb(), get_float8_infinity(), get_float8_nan(), pg_strncasecmp(), pstrdup(), and val.
Referenced by dependencies_scalar(), executeItemOptUnwrapTarget(), float8in(), and single_decode().
| Datum float8larger | ( | PG_FUNCTION_ARGS | ) |
Definition at line 728 of file float.c.
References fb(), float8_gt(), PG_GETARG_FLOAT8, PG_RETURN_FLOAT8, and result.
| Datum float8le | ( | PG_FUNCTION_ARGS | ) |
Definition at line 988 of file float.c.
References fb(), float8_le(), PG_GETARG_FLOAT8, and PG_RETURN_BOOL.
| Datum float8lt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 979 of file float.c.
References fb(), float8_lt(), PG_GETARG_FLOAT8, and PG_RETURN_BOOL.
| Datum float8mi | ( | PG_FUNCTION_ARGS | ) |
Definition at line 820 of file float.c.
References fb(), float8_mi(), PG_GETARG_FLOAT8, and PG_RETURN_FLOAT8.
| Datum float8mul | ( | PG_FUNCTION_ARGS | ) |
Definition at line 829 of file float.c.
References fb(), float8_mul(), PG_GETARG_FLOAT8, and PG_RETURN_FLOAT8.
| Datum float8ne | ( | PG_FUNCTION_ARGS | ) |
Definition at line 970 of file float.c.
References fb(), float8_ne(), PG_GETARG_FLOAT8, and PG_RETURN_BOOL.
| Datum float8out | ( | PG_FUNCTION_ARGS | ) |
Definition at line 563 of file float.c.
References float8out_internal(), PG_GETARG_FLOAT8, and PG_RETURN_CSTRING.
Definition at line 578 of file float.c.
References ascii(), double_to_shortest_decimal_buf(), extra_float_digits, fb(), palloc(), and pg_strfromd().
Referenced by cube_out(), float8out(), line_out(), pair_encode(), and single_encode().
| Datum float8pl | ( | PG_FUNCTION_ARGS | ) |
Definition at line 811 of file float.c.
References fb(), float8_pl(), PG_GETARG_FLOAT8, and PG_RETURN_FLOAT8.
| Datum float8recv | ( | PG_FUNCTION_ARGS | ) |
Definition at line 597 of file float.c.
References buf, PG_GETARG_POINTER, PG_RETURN_FLOAT8, and pq_getmsgfloat8().
| Datum float8send | ( | PG_FUNCTION_ARGS | ) |
Definition at line 608 of file float.c.
References buf, PG_GETARG_FLOAT8, PG_RETURN_BYTEA_P, pq_begintypsend(), pq_endtypsend(), and pq_sendfloat8().
| Datum float8smaller | ( | PG_FUNCTION_ARGS | ) |
Definition at line 742 of file float.c.
References fb(), float8_lt(), PG_GETARG_FLOAT8, PG_RETURN_FLOAT8, and result.
| Datum float8um | ( | PG_FUNCTION_ARGS | ) |
Definition at line 710 of file float.c.
References fb(), PG_GETARG_FLOAT8, PG_RETURN_FLOAT8, and result.
| Datum float8up | ( | PG_FUNCTION_ARGS | ) |
Definition at line 720 of file float.c.
References arg, PG_GETARG_FLOAT8, and PG_RETURN_FLOAT8.
| pg_noinline void float_overflow_error | ( | void | ) |
Definition at line 103 of file float.c.
References ereport, errcode(), errmsg, ERROR, and fb().
Referenced by dacos(), dacosd(), dasin(), dasind(), datan(), datan2(), datan2d(), datand(), dcbrt(), dcos(), dcosd(), derf(), derfc(), dexp(), dgamma(), dlgamma(), dlog1(), dlog10(), dpow(), dsin(), dsind(), dsqrt(), dtanh(), float4_accum(), float4_dist(), float4_div(), float4_mi(), float4_mul(), float4_pl(), float8_accum(), float8_combine(), float8_dist(), float8_regr_accum(), float8_regr_combine(), and gbt_float8_dist().
Definition at line 127 of file float.c.
References ereturn, errcode(), errmsg, and fb().
Referenced by dtof(), float8_div_safe(), float8_mi_safe(), float8_mul_safe(), and float8_pl_safe().
| pg_noinline void float_underflow_error | ( | void | ) |
Definition at line 135 of file float.c.
References ereturn, errcode(), errmsg, and fb().
Referenced by dtof(), float8_div_safe(), and float8_mul_safe().
| pg_noinline void float_zero_divide_error | ( | void | ) |
| Datum ftod | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1224 of file float.c.
References PG_GETARG_FLOAT4, and PG_RETURN_FLOAT8.
| Datum ftoi2 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1354 of file float.c.
References ereturn, errcode(), errmsg, fb(), FLOAT4_FITS_IN_INT16, PG_GETARG_FLOAT4, PG_RETURN_INT16, and unlikely.
| Datum ftoi4 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1329 of file float.c.
References ereturn, errcode(), errmsg, fb(), FLOAT4_FITS_IN_INT32, PG_GETARG_FLOAT4, PG_RETURN_INT32, and unlikely.
| Datum i2tod | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1317 of file float.c.
References PG_GETARG_INT16, and PG_RETURN_FLOAT8.
| Datum i2tof | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1391 of file float.c.
References PG_GETARG_INT16, and PG_RETURN_FLOAT4.
| Datum i4tod | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1305 of file float.c.
References PG_GETARG_INT32, and PG_RETURN_FLOAT8.
| Datum i4tof | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1379 of file float.c.
References PG_GETARG_INT32, and PG_RETURN_FLOAT4.
| Datum in_range_float4_float8 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1144 of file float.c.
References ereport, errcode(), errmsg, ERROR, fb(), PG_GETARG_BOOL, PG_GETARG_FLOAT4, PG_GETARG_FLOAT8, PG_RETURN_BOOL, and val.
| Datum in_range_float8_float8 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1068 of file float.c.
References ereport, errcode(), errmsg, ERROR, fb(), PG_GETARG_BOOL, PG_GETARG_FLOAT8, PG_RETURN_BOOL, and val.
Definition at line 2060 of file float.c.
References acos_0_5, asin_0_5, atan_1_0, cosd_q1(), cot_45, degree_c_forty_five, degree_c_one, degree_c_one_half, degree_c_sixty, degree_c_thirty, degree_consts_set, fb(), one_minus_cos_60, RADIANS_PER_DEGREE, sin_30, sind_q1(), and tan_45.
| Datum radians | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2624 of file float.c.
References fb(), float8_mul(), PG_GETARG_FLOAT8, PG_RETURN_FLOAT8, and RADIANS_PER_DEGREE.
Definition at line 2320 of file float.c.
References cosd_0_to_60(), sind_0_to_30(), and x.
Referenced by dcotd(), dsind(), dtand(), and init_degree_constants().
| Datum width_bucket_float8 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 4229 of file float.c.
References ereport, errcode(), errmsg, ERROR, fb(), pg_add_s32_overflow(), PG_GETARG_FLOAT8, PG_GETARG_INT32, PG_RETURN_INT32, and result.
|
static |
Definition at line 64 of file float.c.
Referenced by acosd_q1(), asind_q1(), and init_degree_constants().
|
static |
Definition at line 63 of file float.c.
Referenced by acosd_q1(), asind_q1(), and init_degree_constants().
|
static |
Definition at line 65 of file float.c.
Referenced by datan2d(), datand(), and init_degree_constants().
|
static |
Definition at line 67 of file float.c.
Referenced by dcotd(), and init_degree_constants().
| float8 degree_c_forty_five = 45.0 |
Definition at line 84 of file float.c.
Referenced by init_degree_constants().
| float8 degree_c_one = 1.0 |
Definition at line 87 of file float.c.
Referenced by init_degree_constants().
| float8 degree_c_one_half = 0.5 |
Definition at line 86 of file float.c.
Referenced by init_degree_constants().
| float8 degree_c_sixty = 60.0 |
Definition at line 85 of file float.c.
Referenced by init_degree_constants().
| float8 degree_c_thirty = 30.0 |
Definition at line 83 of file float.c.
Referenced by init_degree_constants().
Definition at line 60 of file float.c.
Referenced by init_degree_constants().
| int extra_float_digits = 1 |
Definition at line 57 of file float.c.
Referenced by float4out(), float8out_internal(), and set_transmission_modes().
|
static |
Definition at line 62 of file float.c.
Referenced by cosd_0_to_60(), and init_degree_constants().
|
static |
Definition at line 61 of file float.c.
Referenced by init_degree_constants(), and sind_0_to_30().
|
static |
Definition at line 66 of file float.c.
Referenced by dtand(), and init_degree_constants().