Opened 7 years ago
Closed 7 years ago
#3852 closed enhancement (fixed)
float rounding using local hacks
Reported by: | pramsey | Owned by: | pramsey |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 2.4.0 |
Component: | postgis | Version: | master |
Keywords: | Cc: |
Description
There are actually nice, faster system-level functions for nextafterf() (lwgeom_api.c) so we don't need the hacks in our float rounding from many moons ago.
Change History (2)
Note:
See TracTickets
for help on using tickets.
I found a regression failure when I ran my fix for this ticket, but the problem appears to be in the *existing* behavior, not mine…
When adding a box to
POINT(1e+15 1e+15)
, akaPOINT(1000000000000000 1000000000000000)
the regression suite says the result of the ST_BoundingDiagonal should beLINESTRING(999999986991104 999999986991104,999999986991104 999999986991104)
Wait a sec, that box doesn't enclose the original point! Huge fail! My new code does enclose it, with
LINESTRING(999999986991104 999999986991104,1.00000005409997e+15 1.00000005409997e+15)
.I wouldn't ordinarily commit a fix that changes regression so late in the day, but in this case, it seems an improvement. Hopefully the other platforms agree.