aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistproc.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2020-11-21 17:24:07 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2020-11-21 17:24:07 -0500
commit9fe649ea295f00baf6d0f0c1f9b0cb1298f64fb9 (patch)
treeac2742cd9c375dd25b9a5ba973daa50c39cde1e2 /src/backend/access/gist/gistproc.c
parent8597a48d01b6cc0b09ff626253ac93c67e5516d5 (diff)
downloadpostgresql-9fe649ea295f00baf6d0f0c1f9b0cb1298f64fb9.tar.gz
postgresql-9fe649ea295f00baf6d0f0c1f9b0cb1298f64fb9.zip
In geo_ops.c, represent infinite slope as Infinity, not DBL_MAX.
Since we're assuming IEEE floats these days, there seems little reason not to do this. It has the advantage that when the slope is computed as infinite due to the presence of Inf coordinates, we get saner behavior than before from line_construct(), and thence also in some dependent operations such as finding the closest point. Also fix line_construct() to special-case slope zero. The previous coding got the right answer in most cases, but it could compute C as NaN when the point has Inf coordinates. Discussion: https://postgr.es/m/CAGf+fX70rWFOk5cd00uMfa__0yP+vtQg5ck7c2Onb-Yczp0URA@mail.gmail.com
Diffstat (limited to 'src/backend/access/gist/gistproc.c')
0 files changed, 0 insertions, 0 deletions