PostgreSQL Source Code
git master
|
#include <math.h>
Go to the source code of this file.
Macros | |
#define | M_PI 3.14159265358979323846 |
#define | RADIANS_PER_DEGREE 0.0174532925199432957692 |
Functions | |
void | float_overflow_error (void) pg_attribute_noreturn() |
void | float_underflow_error (void) pg_attribute_noreturn() |
void | float_zero_divide_error (void) pg_attribute_noreturn() |
int | is_infinite (float8 val) |
float8 | float8in_internal (char *num, char **endptr_p, const char *type_name, const char *orig_string) |
float8 | float8in_internal_opt_error (char *num, char **endptr_p, const char *type_name, const char *orig_string, bool *have_error) |
char * | float8out_internal (float8 num) |
int | float4_cmp_internal (float4 a, float4 b) |
int | float8_cmp_internal (float8 a, float8 b) |
static float4 | get_float4_infinity (void) |
static float8 | get_float8_infinity (void) |
static float4 | get_float4_nan (void) |
static float8 | get_float8_nan (void) |
static float4 | float4_pl (const float4 val1, const float4 val2) |
static float8 | float8_pl (const float8 val1, const float8 val2) |
static float4 | float4_mi (const float4 val1, const float4 val2) |
static float8 | float8_mi (const float8 val1, const float8 val2) |
static float4 | float4_mul (const float4 val1, const float4 val2) |
static float8 | float8_mul (const float8 val1, const float8 val2) |
static float4 | float4_div (const float4 val1, const float4 val2) |
static float8 | float8_div (const float8 val1, const float8 val2) |
static bool | float4_eq (const float4 val1, const float4 val2) |
static bool | float8_eq (const float8 val1, const float8 val2) |
static bool | float4_ne (const float4 val1, const float4 val2) |
static bool | float8_ne (const float8 val1, const float8 val2) |
static bool | float4_lt (const float4 val1, const float4 val2) |
static bool | float8_lt (const float8 val1, const float8 val2) |
static bool | float4_le (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_gt (const float8 val1, const float8 val2) |
static bool | float4_ge (const float4 val1, const float4 val2) |
static bool | float8_ge (const float8 val1, const float8 val2) |
static float4 | float4_min (const float4 val1, const float4 val2) |
static float8 | float8_min (const float8 val1, const float8 val2) |
static float4 | float4_max (const float4 val1, const float4 val2) |
static float8 | float8_max (const float8 val1, const float8 val2) |
Variables | |
PGDLLIMPORT int | extra_float_digits |
#define RADIANS_PER_DEGREE 0.0174532925199432957692 |
Definition at line 26 of file float.h.
Referenced by cosd_0_to_60(), degrees(), init_degree_constants(), radians(), and sind_0_to_30().
Definition at line 820 of file float.c.
References float4_gt(), and float4_lt().
Referenced by btfloat4cmp(), and btfloat4fastcmp().
Definition at line 221 of file float.h.
References float_overflow_error(), float_underflow_error(), float_zero_divide_error(), and unlikely.
Referenced by float4div(), and g_box_consider_split().
Definition at line 261 of file float.h.
Referenced by float4eq().
Definition at line 321 of file float.h.
Referenced by float4ge().
Definition at line 309 of file float.h.
Referenced by float4_cmp_internal(), float4_max(), float4gt(), and float4larger().
Definition at line 297 of file float.h.
Referenced by float4le().
Definition at line 285 of file float.h.
Referenced by float4_cmp_internal(), float4_min(), float4lt(), and float4smaller().
Definition at line 169 of file float.h.
References float_overflow_error(), and unlikely.
Referenced by float4mi().
Definition at line 193 of file float.h.
References float_overflow_error(), float_underflow_error(), and unlikely.
Referenced by float4mul().
Definition at line 273 of file float.h.
Referenced by float4ne().
Definition at line 145 of file float.h.
References float_overflow_error(), and unlikely.
Referenced by float4pl().
Definition at line 914 of file float.c.
References float8_gt(), and float8_lt().
Referenced by btfloat48cmp(), btfloat84cmp(), btfloat8cmp(), btfloat8fastcmp(), common_entry_cmp(), interval_cmp_lower(), interval_cmp_upper(), and pairingheap_GISTSearchItem_cmp().
Definition at line 237 of file float.h.
References float_overflow_error(), float_underflow_error(), float_zero_divide_error(), and unlikely.
Referenced by box_circle(), box_cn(), circle_box(), circle_div_pt(), circle_poly(), degrees(), float48div(), float84div(), float8div(), g_box_consider_split(), line_distance(), line_eq(), line_interpt_line(), line_invsl(), line_perp(), line_sl(), lseg_center(), lseg_inside_poly(), path_area(), point_div_point(), point_invsl(), point_sl(), and poly_to_circle().
Definition at line 267 of file float.h.
Referenced by float48eq(), float84eq(), float8eq(), gist_box_picksplit(), gist_box_same(), line_eq(), and point_eq_point().
Definition at line 327 of file float.h.
Referenced by float48ge(), float84ge(), float8ge(), and gist_box_picksplit().
Definition at line 315 of file float.h.
Referenced by adjustBox(), box_construct(), float48gt(), float84gt(), float8_cmp_internal(), float8_max(), float8gt(), float8larger(), gist_box_picksplit(), and make_bound_box().
Definition at line 303 of file float.h.
Referenced by float48le(), float84le(), float8le(), gist_box_picksplit(), and size_box().
Definition at line 291 of file float.h.
Referenced by adjustBox(), box_closept_lseg(), box_closept_point(), box_in(), box_recv(), close_sl(), dist_ppath_internal(), dist_ppoly_internal(), float48lt(), float84lt(), float8_cmp_internal(), float8_min(), float8lt(), float8smaller(), gist_box_picksplit(), lseg_closept_lseg(), make_bound_box(), and path_distance().
Definition at line 351 of file float.h.
References float8_gt().
Referenced by box_interpt_lseg(), box_intersect(), boxes_bound_box(), path_inter(), and rt_box_union().
Definition at line 181 of file float.h.
References float_overflow_error(), and unlikely.
Referenced by box_ht(), box_penalty(), box_wd(), circle_above(), circle_below(), circle_box(), circle_contain(), circle_contained(), circle_distance(), circle_left(), circle_overabove(), circle_overright(), circle_poly(), circle_right(), computeDistance(), dist_cpoint(), dist_cpoly_internal(), dist_pc(), float48mi(), float84mi(), float8mi(), g_box_consider_split(), gist_box_picksplit(), gist_circle_compress(), gist_circle_consistent(), line_construct(), line_distance(), line_interpt_line(), lseg_crossing(), path_area(), point_div_point(), point_dt(), point_inside(), point_invsl(), point_mul_point(), point_sl(), point_sub_point(), and size_box().
Definition at line 339 of file float.h.
References float8_lt().
Referenced by box_interpt_lseg(), box_intersect(), boxes_bound_box(), path_inter(), and rt_box_union().
Definition at line 207 of file float.h.
References float_overflow_error(), float_underflow_error(), and unlikely.
Referenced by box_ar(), circle_ar(), circle_diameter(), circle_mul_pt(), circle_poly(), float48mul(), float84mul(), float8mul(), line_construct(), line_contain_point(), line_distance(), line_eq(), line_interpt_line(), line_perp(), lseg_crossing(), path_area(), point_div_point(), point_mul_point(), radians(), and size_box().
Definition at line 279 of file float.h.
Referenced by float48ne(), float84ne(), and float8ne().
Definition at line 157 of file float.h.
References float_overflow_error(), and unlikely.
Referenced by box_circle(), box_cn(), circle_above(), circle_below(), circle_box(), circle_distance(), circle_left(), circle_overbelow(), circle_overlap(), circle_overleft(), circle_poly(), circle_right(), float48pl(), float84pl(), float8_combine(), float8_regr_combine(), float8pl(), gist_circle_compress(), gist_circle_consistent(), line_contain_point(), line_interpt_line(), lseg_center(), lseg_inside_poly(), on_ppath(), path_area(), path_length(), point_add_point(), point_div_point(), point_mul_point(), and poly_to_circle().
float8 float8in_internal | ( | char * | num, |
char ** | endptr_p, | ||
const char * | type_name, | ||
const char * | orig_string | ||
) |
Definition at line 513 of file float.c.
References float8in_internal_opt_error().
Referenced by float8in(), pair_decode(), and single_decode().
float8 float8in_internal_opt_error | ( | char * | num, |
char ** | endptr_p, | ||
const char * | type_name, | ||
const char * | orig_string, | ||
bool * | have_error | ||
) |
Definition at line 379 of file float.c.
References ereport, errcode(), errmsg(), ERROR, get_float8_infinity(), get_float8_nan(), pg_strncasecmp(), pstrdup(), RETURN_ERROR, and val.
Referenced by executeItemOptUnwrapTarget(), and float8in_internal().
char* float8out_internal | ( | float8 | num | ) |
Definition at line 541 of file float.c.
References ascii(), double_to_shortest_decimal_buf(), extra_float_digits, palloc(), and pg_strfromd().
Referenced by cube_out(), float8out(), line_out(), pair_encode(), and single_encode().
void float_overflow_error | ( | void | ) |
Definition at line 84 of file float.c.
References ereport, errcode(), errmsg(), ERROR, and pg_noinline.
Referenced by dacos(), dacosd(), dasin(), dasind(), datan(), datan2(), datan2d(), datand(), dcbrt(), dcos(), dcosd(), dexp(), dlog1(), dlog10(), dpow(), dsin(), dsind(), dsqrt(), dtanh(), dtof(), float4_accum(), float4_div(), float4_mi(), float4_mul(), float4_pl(), float8_accum(), float8_combine(), float8_div(), float8_mi(), float8_mul(), float8_pl(), float8_regr_accum(), float8_regr_combine(), and pg_hypot().
void float_underflow_error | ( | void | ) |
Definition at line 92 of file float.c.
References ereport, errcode(), errmsg(), ERROR, and pg_noinline.
Referenced by dcbrt(), dcosh(), dexp(), dlog1(), dlog10(), dpow(), dsqrt(), dtof(), float4_div(), float4_mul(), float8_div(), float8_mul(), and pg_hypot().
void float_zero_divide_error | ( | void | ) |
Definition at line 100 of file float.c.
References ereport, errcode(), errmsg(), and ERROR.
Referenced by float4_div(), and float8_div().
|
inlinestatic |
Definition at line 73 of file float.h.
Referenced by float4in(), gistpenalty(), leftmostvalue_float4(), numeric_float4(), and range_gist_penalty().
|
inlinestatic |
Definition at line 110 of file float.h.
Referenced by float4in(), and numeric_float4().
|
inlinestatic |
Definition at line 93 of file float.h.
Referenced by compute_range_stats(), datanh(), dcosh(), dsinh(), float8in_internal_opt_error(), gbt_ts_dist(), get_distance(), gistindex_keytest(), initRectBox(), leftmostvalue_float8(), line_invsl(), line_sl(), NonFiniteTimestampTzPart(), numeric_float8(), pg_hypot(), point_invsl(), point_sl(), size_box(), spg_kd_inner_consistent(), spg_quad_inner_consistent(), and spgbeginscan().
|
inlinestatic |
Definition at line 122 of file float.h.
Referenced by dacos(), dacosd(), dasin(), dasind(), datan(), datan2(), datan2d(), datand(), dcos(), dcosd(), dcot(), dcotd(), dpow(), dsin(), dsind(), dtan(), dtand(), float4_accum(), float8_accum(), float8_regr_accum(), float8in_internal_opt_error(), line_closept_point(), numeric_float8(), numeric_float8_no_overflow(), pg_hypot(), and point_box_distance().
int is_infinite | ( | float8 | val | ) |
PGDLLIMPORT int extra_float_digits |
Definition at line 42 of file float.c.
Referenced by float4out(), float8out_internal(), and set_transmission_modes().