fix: Change unit tests floating point type to double and add a precision argument to output streams #558
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The order of floating-point operations led to different results between these
debug
andrelease
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 #556
Changes and type of changes (quick overview):
double
Checklist:
Code related
(i.e.: function, class, script header, README.md)
(Check README.md #Contributing
for local testing procedure using libpointmatcher-build-system)
PR creation related
base ref
branch is set to thedevelop
branch(the build-system won't be triggered otherwise)
develop
branch(the build-system will reject it otherwise)
PR description related
# <issue-id>
if changes are of typefix
feat
fix
docs
style
refactor
perf
test
build
ci
chore
revert
<type>!
see commit_msg_reference.md
in the repository root for details