Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#10201 closed Bugs (wontfix)

Use equals_with_epsilon for boost::geometry::equals algorithms

Reported by: smspillaz@… Owned by: Barend Gehrels
Milestone: To Be Determined Component: geometry
Version: Boost 1.54.0 Severity: Problem
Keywords: Cc: smspillaz@…

Description

boost::geometry::detail::disjoint <point_tag, point_tag> seems to be using boost::geometry::math::equals instead of boost::geometry::math::equals_with_epsilon .

It seems like in most cases, the latter would be more appropriate, especially considering that it applies only to floating point numbers.

I'm not sure what the desired behaviour here is.]

Change History (2)

comment:1 by awulkiew, 8 years ago

Resolution: wontfix
Status: newclosed

Thanks!

However everything should be ok here. math::equals() uses scaled machine epsilon to compare floating point numbers. By default math::equals_with_epsilon() uses math::equals().

AFAIK equals_with_epsilon() was used in the past as a workaround in some cases (e.g. it allowed to define comparison differently for user-defined coordinate types) but now after robustness upgrades it's no longer needed.

Do you have any problems with disjoint() because of this? Or did you catch this while reading the code?

Anyway, I'm closing the report.

comment:2 by anonymous, 8 years ago

This was quite long ago, so I can't quite remember what this issue was. I think I had some failing tests due to the use of math::equals instead of math::equals_with_epsilon.

How recently were the robustness upgrades? Maybe this isn't necessary anymore? I remember I ran into problems around this time last year.

Note: See TracTickets for help on using tickets.