norlab-ulaval / libpointmatcher

An Iterative Closest Point (ICP) library for 2D and 3D mapping in Robotics
BSD 3-Clause "New" or "Revised" License
1.58k stars 542 forks source link

fix: Change unit tests floating point type to double and add a precision argument to output streams #558

Closed boxanm closed 5 months ago

boxanm commented 5 months ago

Description

The order of floating-point operations led to different results between these debug and release builds on ARM64. This was probably due to different optimizations done by the compiler. I changed the floating-point precision of all tests to double, which solved the failed transformation tests. As a side task, I also had to add a precision argument to all Point cloud save functions to keep IO utests from failing.

Summary:

Fixes https://github.com/norlab-ulaval/libpointmatcher/issues/556

Changes and type of changes (quick overview):


Checklist:

Code related

PR creation related

PR description related

sonarcloud[bot] commented 5 months ago

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

3 New issues
0 Security Hotspots
No data about Coverage
2.5% Duplication on New Code

See analysis details on SonarCloud