[postgis-tickets] [PostGIS] #3852: float rounding using local hacks

PostGIS trac at osgeo.org
Tue Sep 19 13:58:50 PDT 2017


#3852: float rounding using local hacks
--------------------------+---------------------------
  Reporter:  pramsey      |      Owner:  pramsey
      Type:  enhancement  |     Status:  new
  Priority:  medium       |  Milestone:  PostGIS 2.4.0
 Component:  postgis      |    Version:  trunk
Resolution:               |   Keywords:
--------------------------+---------------------------

Comment (by pramsey):

 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), aka POINT(1000000000000000
 1000000000000000) the regression suite says the result of the
 ST_BoundingDiagonal should be LINESTRING(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.

--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3852#comment:1>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list